9 Replies Latest reply on Feb 18, 2010 4:30 AM by kapitanpetko

    Can't build numberguess, plz help!

    asookazian

      I built successfully last night using weld-1.0.1.CR2 (same distro).


      Now I get this when I do mvn clean install:


      C:\java\weld-1.0.1-CR2\examples\jsf\numberguess>mvn clean install
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Weld Examples: Numberguess
      [INFO]    task-segment: [clean, install]
      [INFO] ------------------------------------------------------------------------
      [INFO] [clean:clean {execution: default-clean}]
      [INFO] Deleting file set: C:\java\weld-1.0.1-CR2\examples\jsf\numberguess\target
       (included: [**], excluded: [])
      [INFO] Deleting file set: C:\java\weld-1.0.1-CR2\examples\jsf\numberguess\src\ma
      in\webapp (included: [WEB-INF/classes/**, WEB-INF/lib/**, META-INF/context.xml,
      WEB-INF/web.xml, WEB-INF/jetty-env.xml, WEB-INF/appengine-web.xml, WEB-INF/loggi
      ng.properties], excluded: [])
      [INFO] [junction:unlink {execution: unlink}]
      [INFO] [enforcer:enforce {execution: enforce}]
      [INFO] [build-helper:maven-version {execution: default}]
      [INFO] [build-helper:parse-version {execution: default}]
      [INFO] [buildnumber:create {execution: set-build-properties}]
      [INFO] Checking for local modifications: skipped.
      [INFO] Updating project files from SCM: skipped.
      [INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
      [INFO] Working directory: C:\java\weld-1.0.1-CR2\examples\jsf\numberguess
      Provider message:
      The svn command failed.
      Command output:
      svn: '.' is not a working copy
      
      [WARNING] Cannot get the revision information from the scm repository, proceedin
      g with revision of unavailable :
      Error!
      [INFO] Storing buildNumber: unavailable at timestamp: February 11, 2010 9:28:40
      AM PST
      [INFO] [resources:resources {execution: default-resources}]
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory C:\java\weld-1.0.1-CR2\examples\jsf\n
      umberguess\src\main\resources
      [INFO] [compiler:compile {execution: default-compile}]
      [INFO] Compiling 6 source files to C:\java\weld-1.0.1-CR2\examples\jsf\numbergue
      ss\target\classes
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Compilation failure
      
      C:\java\weld-1.0.1-CR2\examples\jsf\numberguess\src\main\java\org\jboss\weld\exa
      mples\numberguess\ArbiTestBeanLocal.java:[3,16] package javax.ejb does not exist
      
      
      C:\java\weld-1.0.1-CR2\examples\jsf\numberguess\src\main\java\org\jboss\weld\exa
      mples\numberguess\ArbiTestBeanLocal.java:[5,1] cannot find symbol
      symbol: class Local
      @Local
      
      
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2 seconds
      [INFO] Finished at: Thu Feb 11 09:28:41 PST 2010
      [INFO] Final Memory: 24M/43M
      [INFO] ------------------------------------------------------------------------



      I had to download and install the following version of svn b/c previously it was complaining it could not find the svn client apparently:


      C:\java\weld-1.0.1-CR2\examples\jsf\numberguess>svn --version
      svn, version 1.6.9 (r901367)
         compiled Jan 21 2010, 22:00:47



      What's the problem here??  I did not modify any of the pom.xml files.

        • 1. Re: Can't build numberguess, plz help!
          asookazian

          Problem is this:


          cmd.exe /X /C "svn --non-interactive info"



          what exactly is this doing?  how is it triggered (by pom.xml?)

          • 2. Re: Can't build numberguess, plz help!
            asookazian

            on the same machine, mvn clean install is successful for weld-1.0.0.SP1.

            • 3. Re: Can't build numberguess, plz help!
              asookazian

              The problem seems to be a classpath issue, but not sure why one is having it and the other is not...

              • 4. Re: Can't build numberguess, plz help!
                asookazian

                In weld-1.0.1-CR2, I just successfully exec'd 'mvn clean install' on the login and translator apps.


                So the problem seems to be isolated to the numberguess app somehow.


                After viewing the translator pom.xml, the problem most likely has to do with the fact that I am trying to do a mvn build on a project that now has a SFSB and the pom.xml is not written/configured properly anymore.


                Something like this is now required in the numberguess's pom.xml:


                <modules>
                      <module>war</module>
                      <module>ejb</module>
                      <module>ear</module>
                   </modules>
                
                   <dependencyManagement>
                      <dependencies>
                         <dependency>
                            <groupId>org.jboss.weld.examples.jsf.translator</groupId>
                            <artifactId>weld-jsf-translator-war</artifactId>
                            <version>${project.version}</version>
                            <type>war</type>
                         </dependency>
                         <dependency>
                            <groupId>org.jboss.weld.examples.jsf.translator</groupId>
                            <artifactId>weld-jsf-translator-ear</artifactId>
                            <version>${project.version}</version>
                         </dependency>
                         <dependency>
                            <groupId>org.jboss.weld.examples.jsf.translator</groupId>
                            <artifactId>weld-jsf-translator-ejb</artifactId>
                            <version>${project.version}</version>
                            <type>ejb</type>
                         </dependency>
                      </dependencies>
                   </dependencyManagement>
                



                which means the project now becomes a multi-module maven project...


                I am getting around this problem by manually copying new versions of the .class and .xhtml files to the exploded format of the war.

                • 5. Re: Can't build numberguess, plz help!

                  Maven is so great! ;-)

                  • 6. Re: Can't build numberguess, plz help!
                    asookazian

                    LOL!!


                    this is a good example of shitty feedback (or at least I can't immediately tell what to do to fix) from maven.


                    hurrah!

                    • 7. Re: Can't build numberguess, plz help!
                      kapitanpetko

                      svn: '.' is not a working copy


                      The build expect a SVN checkout, and this is not one. This is triggered by the buildnumber plugin (hint: [INFO] [buildnumber:create {execution: set-build-properties}]). So, either check out from SVN or find the pom that used buildnubmer (grep) and comment it out.



                      • 8. Re: Can't build numberguess, plz help!
                        pmuir

                        The build isn't failing for due to the svn build number check (which I need to remove for non-development builds), but due to you missing dependencies.

                        • 9. Re: Can't build numberguess, plz help!
                          kapitanpetko

                          Pete Muir wrote on Feb 17, 2010 13:07:


                          The build isn't failing for due to the svn build number check (which I need to remove for non-development builds), but due to you missing dependencies.


                          Oh, I see now, the buildnumber is just a warning. It used to fail the build in previous versions, I guess they've fixed it. package javax.ejb does not exist is indeed kind of critical :)