6 Replies Latest reply on Jan 25, 2008 8:32 AM by Adrian Brock

    Maven build broken again - Microcontainer

    Adrian Brock Master

      I just resynched with the MC trunk.

      It said it couldn't find jdocbook

      Downloading: http://repo1.maven.org/maven2/org/jboss/maven/plugins/maven-jdocbook-plugin/2.0.0/maven-jdocbook-plugin-2.0.0.pom
      [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
      Downloading: http://repo1.maven.org/maven2/org/jboss/maven/plugins/maven-jdocbook-plugin/2.0.0/maven-jdocbook-plugin-2.0.0.pom
      [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.
      
      GroupId: org.jboss.maven.plugins
      ArtifactId: maven-jdocbook-plugin
      Version: 2.0.0
      
      Reason: Unable to download the artifact from any repository
      
       org.jboss.maven.plugins:maven-jdocbook-plugin:pom:2.0.0
      
      from the specified remote repositories:
       central (http://repo1.maven.org/maven2)
      


      I thought it was my repository broken again, so I nuked it
      and then I got

      Downloading: http://repo1.maven.org/maven2/org/jboss/jboss-parent/3/jboss-parent-3.pom
      [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.
      
      GroupId: org.jboss
      ArtifactId: jboss-parent
      Version: 3
      
      Reason: Unable to download the artifact from any repository
      
       org.jboss:jboss-parent:pom:3
      
      from the specified remote repositories:
       central (http://repo1.maven.org/maven2)
      


      Which told me it wasn't even looking at the jboss repository(ies).

      Adding the repositories into the root pom.xml as well a the build/pom.xml
      seems to have fixed the problem, but this is either:

      1) Somebody updating the poms without testing it properly
      2) Maven showing different results for different people

        • 1. Re: Maven build broken again - Microcontainer
          Adrian Brock Master

           

          "adrian@jboss.org" wrote:


          Adding the repositories into the root pom.xml as well a the build/pom.xml
          seems to have fixed the problem, but this is either:


          Nope. Still can't find jdocbook. It isn't looking the jboss repository for some reason?

          Downloading: http://repository.jboss.org/maven2//commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar
          220K downloaded
          Downloading: http://repo1.maven.org/maven2/org/jboss/maven/plugins/maven-jdocbook-plugin/2.0.0/maven-jdocbook-plugin-2.0.0.pom
          [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
          Downloading: http://repo1.maven.org/maven2/org/jboss/maven/plugins/maven-jdocbook-plugin/2.0.0/maven-jdocbook-plugin-2.0.0.pom
          [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD ERROR
          [INFO] ------------------------------------------------------------------------
          [INFO] Failed to resolve artifact.
          
          GroupId: org.jboss.maven.plugins
          ArtifactId: maven-jdocbook-plugin
          Version: 2.0.0
          
          Reason: Unable to download the artifact from any repository
          
           org.jboss.maven.plugins:maven-jdocbook-plugin:pom:2.0.0
          
          from the specified remote repositories:
           central (http://repo1.maven.org/maven2)
          


          If somebody knows how to fix it, let me know. Then I can get on with my work.
          Cheers.

          • 2. Re: Maven build broken again - Microcontainer
            Paul Gier Master

            Add the jboss repositories to your maven settings.xml.
            http://wiki.jboss.org/wiki/Wiki.jsp?page=MavenSettings

            I have removed the repositories from the poms so that if we ever decide to change the url of the repository, there won't be a problem building old releases.

            • 3. Re: Maven build broken again - Microcontainer
              Scott Stark Master

              I'm building ok, and I'll I have in my settings.xml is:

              [starksm@succubus 19435]$ cat ~/.m2/settings.xml
              <settings>
               <!-- This could point to the svn checkout of the
               repository.jboss.com/maven2 contents, or a separate local
               maven repo
               -->
               <localRepository>/home/svn/repository.jboss.com/maven2</localRepository>
              
               <servers>
               <server>
               <id>snapshots.jboss.org</id>
               <username>scott.stark@jboss.org</username>
               <password>x</password>
               </server>
               </servers>
              
               <profiles>
               <profile>
               <id>local-properties</id>
               <properties>
               <!-- This must point to the cvs or svn checkout of the jboss repository -->
               <jboss.repository.root>/home/svn/repository.jboss.com</jboss.repository.root>
               <maven.repository.root>/home/svn/repository.jboss.com</maven.repository.root>
               <!-- This must point to the cvs checkout of the
               repository.jboss.com/maven2 contents
               -->
               <maven.cvs.root>/home/svn/repository.jboss.com/maven2</maven.cvs.root>
               </properties>
               </profile>
               </profiles>
              
               <activeProfiles>
               <activeProfile>local-properties</activeProfile>
               </activeProfiles>
              </settings>
              


              I do maven-jdocbook-plugin in my local repo though, so maybe its from a previous build with the repo specified in a pom.xml.
              [starksm@succubus SyncroSVNClient-v3.0]$ ls /home/svn/repository.jboss.com/maven2/org/jboss/maven/plugins/maven-jdocbook-plugin
              2.0.0/ maven-metadata.xml maven-metadata.xml.md5 maven-metadata.xml.sha1


              • 4. Re: Maven build broken again - Microcontainer
                Adrian Brock Master

                 

                "pgier" wrote:
                Add the jboss repositories to your maven settings.xml.
                http://wiki.jboss.org/wiki/Wiki.jsp?page=MavenSettings

                I have removed the repositories from the poms so that if we ever decide to change the url of the repository, there won't be a problem building old releases.


                Yes there will, because the repository is no longer versioned in svn
                we've go no idea which repository to use to recreate a build!

                • 5. Re: Maven build broken again - Microcontainer
                  Adrian Brock Master

                  I managed to hack the pom to remove the jdocbook requirement locally.
                  This let me build the project.

                  I need to figure out how to build it properly.

                  I also fixed the eclipse classpaths since it looks like we don't need
                  oswego concurrent anymore (thanks to Alex fixing JBossXB)
                  but it broke all the .classpath files when Maven didn't download it :-)

                  I'm also still seeing these spurious NPEs.
                  This error actually represents a ClassNotFoundException
                  in a testcase, but its not very informative unless you do a
                  clean build when it shows the real the error in the compilation stage.

                  Where's the maven equivalent of the up-to-date task that ant
                  has to remove obsolete/stale classes?

                  [INFO] ------------------------------------------------------------------------
                  [ERROR] FATAL ERROR
                  [INFO] ------------------------------------------------------------------------
                  [INFO] null
                  [INFO] ------------------------------------------------------------------------
                  [DEBUG] Trace
                  java.lang.NullPointerException
                   at org.apache.maven.plugin.surefire.SurefirePlugin.constructSurefireBooter(SurefirePlugin.java:594)
                   at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:391)
                   at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
                   at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
                  


                  • 6. Re: Maven build broken again - Microcontainer
                    Adrian Brock Master

                    If anybody else sees this problem, I managed to get this working by
                    adding the following to my ~/.m2/settings.xml

                     <profile>
                     <id>jboss.repository</id>
                     <activation>
                     <property>
                     <name>!jboss.repository.off</name>
                     </property>
                     </activation>
                     <repositories>
                     <repository>
                     <id>snapshots.jboss.org</id>
                     <url>http://snapshots.jboss.org/maven2</url>
                     <snapshots>
                     <enabled>true</enabled>
                     </snapshots>
                     </repository>
                     <repository>
                     <id>repository.jboss.org</id>
                     <url>http://repository.jboss.org/maven2</url>
                     <snapshots>
                     <enabled>false</enabled>
                     </snapshots>
                     </repository>
                     </repositories>
                     <pluginRepositories>
                     <pluginRepository>
                     <id>repository.jboss.org</id>
                     <url>http://repository.jboss.org/maven2</url>
                     <snapshots>
                     <enabled>false</enabled>
                     </snapshots>
                     </pluginRepository>
                     <pluginRepository>
                     <id>snapshots.jboss.org</id>
                     <url>http://snapshots.jboss.org/maven2</url>
                     <snapshots>
                     <enabled>true</enabled>
                     </snapshots>
                     </pluginRepository>
                     </pluginRepositories>
                     </profile>
                    


                    I also had to upgrade to the latest maven (2.0.8 at time of writiing).

                    I've verified this works with a clean build and deleting my entire local maven repository.