13 Replies Latest reply on Oct 20, 2007 1:38 PM by bdlink

    Problems with Seam-gen (and maven i guess)

    eethyo

      Hi I am using Seam 2.0.0.CR2.

      If i want to run seam-gen i get the following error:


      Buildfile: C:\rhdevstudio\jboss-eap\jboss-seam-2.0.0.CR2\seam-gen\build.xml
      init:
      [artifact:dependencies] Downloading: org/jboss/seam/jboss-seam-gen/2.0.0.CR2/jboss-seam-gen-2.0.0.CR2.pom
      [artifact:dependencies] Downloading: org/jboss/seam/jboss-seam-gen/2.0.0.CR2/jboss-seam-gen-2.0.0.CR2.jar
      [artifact:dependencies] An error has occurred while processing the Maven artifact tasks.
      [artifact:dependencies] Diagnosis:
      [artifact:dependencies]
      [artifact:dependencies] Unable to resolve artifact: Missing:
      [artifact:dependencies] ----------
      [artifact:dependencies] 1) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
      [artifact:dependencies]
      [artifact:dependencies] Try downloading the file manually from the project website.
      [artifact:dependencies]
      [artifact:dependencies] Then, install it using the command:
      [artifact:dependencies] mvn install:install-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen \
      [artifact:dependencies] -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file
      [artifact:dependencies] Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen \
      [artifact:dependencies] -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file \
      [artifact:dependencies] -Durl=[url] -DrepositoryId=[id]
      [artifact:dependencies]
      [artifact:dependencies] Path to dependency:
      [artifact:dependencies] 1) unspecified:unspecified:jar:0.0
      [artifact:dependencies] 2) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
      [artifact:dependencies]
      [artifact:dependencies] ----------
      [artifact:dependencies] 1 required artifact is missing.
      [artifact:dependencies]
      [artifact:dependencies] for artifact:
      [artifact:dependencies] unspecified:unspecified:jar:0.0
      [artifact:dependencies]
      [artifact:dependencies] from the specified remote repositories:
      [artifact:dependencies] central (http://repo1.maven.org/maven2)
      [artifact:dependencies]
      [artifact:dependencies]
      
      BUILD FAILED
      C:\rhdevstudio\jboss-eap\jboss-seam-2.0.0.CR2\seam-gen\build.xml:14: Unable to resolve artifact: Missing:
      ----------
      1) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
      
       Try downloading the file manually from the project website.
      
       Then, install it using the command:
       mvn install:install-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen \
       -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file
      Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen \
       -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file \
       -Durl=[url] -DrepositoryId=[id]
      
       Path to dependency:
       1) unspecified:unspecified:jar:0.0
       2) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
      
      ----------
      1 required artifact is missing.
      
      for artifact:
       unspecified:unspecified:jar:0.0
      
      from the specified remote repositories:
       central (http://repo1.maven.org/maven2)
      
      
      Total time: 3 seconds



      if I run the "ant" in the seam-gen directory i get:



      C:\rhdevstudio\jboss-eap\jboss-seam-2.0.0.CR2\seam-gen>ant
      Buildfile: build.xml
      
      init:
      [artifact:dependencies] Downloading: org/jboss/seam/jboss-seam-gen/2.0.0.CR2/jbo
      ss-seam-gen-2.0.0.CR2.pom
      [artifact:dependencies] Downloading: org/jboss/seam/jboss-seam-gen/2.0.0.CR2/jbo
      ss-seam-gen-2.0.0.CR2.jar
      [artifact:dependencies] An error has occurred while processing the Maven artifac
      t tasks.
      [artifact:dependencies] Diagnosis:
      [artifact:dependencies]
      [artifact:dependencies] Unable to resolve artifact: Missing:
      [artifact:dependencies] ----------
      [artifact:dependencies] 1) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
      [artifact:dependencies]
      [artifact:dependencies] Try downloading the file manually from the project web
      site.
      [artifact:dependencies]
      [artifact:dependencies] Then, install it using the command:
      [artifact:dependencies] mvn install:install-file -DgroupId=org.jboss.seam
      -DartifactId=jboss-seam-gen \
      [artifact:dependencies] -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/pa
      th/to/file
      [artifact:dependencies] Alternatively, if you host your own repository you can d
      eploy the file there: mvn deploy:deploy-file -DgroupId=org.jboss.seam -Dar
      tifactId=jboss-seam-gen \
      [artifact:dependencies] -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/pa
      th/to/file \
      [artifact:dependencies] -Durl=[url] -DrepositoryId=[id]
      [artifact:dependencies]
      [artifact:dependencies] Path to dependency:
      [artifact:dependencies] 1) unspecified:unspecified:jar:0.0
      [artifact:dependencies] 2) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
      [artifact:dependencies]
      [artifact:dependencies] ----------
      [artifact:dependencies] 1 required artifact is missing.
      [artifact:dependencies]
      [artifact:dependencies] for artifact:
      [artifact:dependencies] unspecified:unspecified:jar:0.0
      [artifact:dependencies]
      [artifact:dependencies] from the specified remote repositories:
      [artifact:dependencies] central (http://repo1.maven.org/maven2)
      [artifact:dependencies]
      [artifact:dependencies]
      
      BUILD FAILED
      C:\rhdevstudio\jboss-eap\jboss-seam-2.0.0.CR2\seam-gen\build.xml:14: Unable to r
      esolve artifact: Missing:
      ----------
      1) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
      
       Try downloading the file manually from the project website.
      
       Then, install it using the command:
       mvn install:install-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-
      gen \
       -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file
      Alternatively, if you host your own repository you can deploy the file there:
       mvn deploy:deploy-file -DgroupId=org.jboss.seam -DartifactId=jboss-seam-gen
      \
       -Dversion=2.0.0.CR2 -Dpackaging=jar -Dfile=/path/to/file \
       -Durl=[url] -DrepositoryId=[id]
      
       Path to dependency:
       1) unspecified:unspecified:jar:0.0
       2) org.jboss.seam:jboss-seam-gen:jar:2.0.0.CR2
      
      ----------
      1 required artifact is missing.
      
      for artifact:
       unspecified:unspecified:jar:0.0
      
      from the specified remote repositories:
       central (http://repo1.maven.org/maven2)
      
      
      Total time: 4 seconds
      C:\rhdevstudio\jboss-eap\jboss-seam-2.0.0.CR2\seam-gen>



      whats the mistake?
      i didnt change anything and i dont have any idea about maven... yet ;)

        • 1. Re: Problems with Seam-gen (and maven i guess)
          pmuir
          • 2. Re: Problems with Seam-gen (and maven i guess)
            deepsix

            Okay.. hope this helps.. I had the same error for me when i tried building jboss-seam module. It helps if you have an internet connection and let the build process download its required jar files. Once i did that, the build was a success.

            • 3. Re: Problems with Seam-gen (and maven i guess)
              eethyo

              i deepsix, could you explain me how to do this for seam and seam-gen?
              i really dont have any idea about maven.

              thanks alot

              • 4. Re: Problems with Seam-gen (and maven i guess)
                deepsix

                Neither do i.. ;)
                But i did not do anything special for this.
                Just ensure that you have a direct internet connection so that when the build process wants to download the jars, it can go ahead and download it.

                • 5. Re: Problems with Seam-gen (and maven i guess)
                  eethyo

                  my problem is, i cant even build in the root directory of seam-gen.

                  the error above is still there (second error).

                  you just unzipped the seam build (CR2) and then you ran "ant" in the seam-gen directory?
                  doesnt work here...

                  • 6. Re: Problems with Seam-gen (and maven i guess)
                    deepsix

                    I think the seam-gen directory exists in the jboss-seam directory. I built that one. But after this error, i tried building the seam-gen directory. This worked out fine without any problems.

                    Not sure what is happening here ... (me too started with seam just today!) But all i can say is, the build is not able to download the appropriate jars and hence its timing out and giving you the error.

                    If you have a proxy connection to the internet, that may be one of the causes.. I wasnt able to get the build working when i had my proxy on.

                    • 7. Re: Problems with Seam-gen (and maven i guess)
                      eethyo

                      ok it seems that this is the problem... i am using a proxy.
                      i gonna try it from @ home once more...

                      thanks for your help...

                      • 8. Re: Problems with Seam-gen (and maven i guess)
                        kassper

                        I have the following exception when trying to do ant build:

                        jarui:
                         [copy] Copying 1 file to c:\java\jboss-seam-2.0.0.CR2\ui
                         [java] [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
                         [java] org.apache.maven.surefire.booter.SurefireExecutionException: Unable to instantiate and execute Surefire; nested exception is java.lang.ClassNotFoundException: org.apache.maven.surefire.Surefire
                         [java] java.lang.ClassNotFoundException: org.apache.maven.surefire.Surefire
                         [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
                         [java] at java.security.AccessController.doPrivileged(Native Method)
                         [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                         [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                         [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
                         [java] at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:103)
                         [java] at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:281)
                         [java] at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
                         [java] [ERROR] BUILD FAILURE
                         [java] Java Result: 1
                         [delete] Deleting: c:\java\jboss-seam-2.0.0.CR2\ui\pom.xml
                        
                        BUILD FAILED
                        c:\java\jboss-seam-2.0.0.CR2\build.xml:280: Warning: Could not find file c:\java\jboss-seam-2.0.0.CR2\ui\target\jboss-seam-ui.jar to copy.
                        


                        I have Ant 1.7.0 and JDK 1.5.0_12. Any ideas?

                        • 9. Re: Problems with Seam-gen (and maven i guess)
                          pmuir

                          Clean out your local maven cache - rm -rf ~/.m2/repository/org/apache/maven

                          • 10. Re: Problems with Seam-gen (and maven i guess)
                            kassper

                            Problem solved by moving maven repository to c:\java\repository (path without ".m2"). Looks like this problem is caused by http://jira.codehaus.org/browse/SUREFIRE-341.

                            • 11. Re: Problems with Seam-gen (and maven i guess)
                              pmuir

                              Gah. Stupid surefire. I'll remove the dependence on surefire soon I think.

                              • 12. Re: Problems with Seam-gen (and maven i guess)
                                bdlink

                                Same problem happening to me. Trying to run seam-gen, in particular "seam setup" and get error message during the init phase:

                                1 required artifact is missing.

                                for artifact:
                                unspecified:unspecified:jar:0.0

                                from the specified remote repositories:
                                central (http://repo1.maven.org/maven2)


                                How do you change the maven repository for seam-gen?

                                I do not generally use maven, too many problems :-).

                                thanks

                                • 13. Re: Problems with Seam-gen (and maven i guess)
                                  bdlink

                                  OK, I figured it out. In tiny mouse print in the blog referenced in the second post, it says to run "ant build". I saw that when I reread the blog.

                                  When I run "ant build" in the top seam directory, it fixes the problem.