5 Replies Latest reply on Feb 20, 2007 5:22 PM by starksm64

    MC maven build

    starksm64

      I'm trying the mvn build in the following MC branch:
      https://svn.jboss.org/repos/jbossas/projects/microcontainer/branches/2_0/

      and its not finding the parent pom:

      mvn install
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------[ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------[INFO] Failed to resolve artifact.
      
      GroupId: jboss
      ArtifactId: jboss-microcontainer
      Version: 2.0.0-SNAPSHOT
      
      Reason: Unable to download the artifact from any repository
      
       jboss:jboss-microcontainer:pom:2.0.0-SNAPSHOT
      
      from the specified remote repositories:
       central (http://repo1.maven.org/maven2)
      
      
      [INFO] ------------------------------------------------------------------------[INFO] Trace
      org.apache.maven.reactor.MavenExecutionException: Cannot find parent: jboss:jboss-microcontainer for project: null:jboss-container:jar:null
       at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:278)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: jboss:jboss-microcontainer for project: null:jboss-container:jar:null
       at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1161)
       at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:674)
       at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:416)
       at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:192)
       at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:515)
       at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:447) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:491) at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:351)
       ... 11 more
      Caused by: org.apache.maven.project.ProjectBuildingException: POM 'jboss:jboss-microcontainer' not found in repository: Unable to download the artifact from any repository
      
       jboss:jboss-microcontainer:pom:2.0.0-SNAPSHOT
      
      from the specified remote repositories:
       central (http://repo1.maven.org/maven2)
      
       at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:513)
       at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1157)
       ... 18 more
      Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
      
       jboss:jboss-microcontainer:pom:2.0.0-SNAPSHOT
      
      from the specified remote repositories:
       central (http://repo1.maven.org/maven2)
      
       at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:136)
       at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:63)
       at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:467)
       ... 19 more
      Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
       at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:260)
       at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:124)
       ... 21 more
      [INFO] ------------------------------------------------------------------------[INFO] Total time: < 1 second
      [INFO] Finished at: Tue Feb 20 08:10:35 PST 2007
      [INFO] Final Memory: 1M/66M
      [INFO] ------------------------------------------------------------------------[starksm@succubus build]$
      


      I do see this under http://repository.jboss.com/maven2/jboss/jboss-parent/1/. The build is also not referring to the jboss repository it appears, even though its defined in the build/pom.xml as well as my ~/.m2/settings.xml.


        • 1. Re: MC maven build
          pgier

          The spring-int pom.xml was still pointing to the other version (2.0.0-SNAPSHOT). I changed it and committed it. Now the build is getting farther, but it looks like there is a new dependency in deployers. I will see if I can figure out what's missing.

          In this case it doesn't find the 2.0.0-SNAPSHOT version in the repository because the child poms are all pointing to the relative path "../build".

          A few other things to note:
          I made "install" the default goal, so you can just type "mvn" at the command line, and it will run a mvn install.
          Once we are able to do releases with maven, you won't have to manually change the version numbers in the pom.xml files. The pom.xml files can always be set to -SNAPSHOT. Then when you use the maven release plugin you specify the release version you want, and the new SNAPSHOT version and the poms will be updated automatically. I think for branching, the only difference is that your release version would be a SNAPSHOT version.

          What version should trunk be on now? 3.0.0-SNAPSHOT?

          • 2. Re: MC maven build
            pgier

             

            "pgier" wrote:
            Now the build is getting farther, but it looks like there is a new dependency in deployers. I will see if I can figure out what's missing.



            Deployers now depends on dependency. I added this to the pom.xml, and it seems to be building ok now.

            • 3. Re: MC maven build
              starksm64

              I would set the trunk version to 2.2.0-snapshot. The trunk is now building for me so I'll migrate these changes to the 2_0 branch.

              • 4. Re: MC maven build
                pgier

                 

                "scott.stark@jboss.org" wrote:
                I would set the trunk version to 2.2.0-snapshot. The trunk is now building for me so I'll migrate these changes to the 2_0 branch.


                Ok, I will change the trunk if you haven't already. The maven deploy plugin only treats the build as a snapshot if it is all upper case. Is it a problem if we start using upper case "SNAPSHOT" instead of lower case?

                • 5. Re: MC maven build
                  starksm64

                  Uppercase is fine.