3 Replies Latest reply on Oct 17, 2007 9:01 AM by Adrian Brock

    Maven build broken again - Microcontainer

    Adrian Brock Master

      Why is Maven trying to download snapshots for artifacts in the same project?

      [INFO] ----------------------------------------------------------------------------
      [INFO] Building JBoss Deployers Impl
      [INFO] task-segment: [install]
      [INFO] ----------------------------------------------------------------------------
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] snapshot org.jboss.microcontainer:jboss-container:2.0.0-SNAPSHOT: checking for updates from snapshots.jboss.org
      [INFO] snapshot org.jboss.microcontainer:jboss-container:2.0.0-SNAPSHOT: checking for updates from jboss-snapshots
      Downloading: http://snapshots.jboss.org/maven2//org/jboss/microcontainer/jboss-container/2.0.0-SNAPSHOT/jboss-container-2.0.0-20071003.213349-8.jar
      324K downloaded
      [INFO] snapshot org.jboss.microcontainer:jboss-dependency:2.0.0-SNAPSHOT: checking for updates from snapshots.jboss.org
      [INFO] snapshot org.jboss.microcontainer:jboss-dependency:2.0.0-SNAPSHOT: checking for updates from jboss-snapshots
      Downloading: http://snapshots.jboss.org/maven2//org/jboss/microcontainer/jboss-dependency/2.0.0-SNAPSHOT/jboss-dependency-2.0.0-20071003.213349-8.jar
      56K downloaded
      [INFO] [compiler:compile]
      [INFO] Compiling 1 source file to /home/ejort/microcontainer/deployers-impl/target/classes
      [WARNING] /home/ejort/microcontainer/deployers-impl/src/main/org/jboss/deployers/plugins/main/MainDeployerImpl.java:[161,28] [deprecation] getDeploymentContext(java.lang.String,boolean) in org.jboss.deployers.structure.spi.main.MainDeployerStructure has been deprecated
      
      [WARNING] /home/ejort/microcontainer/deployers-impl/src/main/org/jboss/deployers/plugins/main/MainDeployerImpl.java:[154,28] [deprecation] getDeploymentContext(java.lang.String) in org.jboss.deployers.structure.spi.main.MainDeployerStructure has been deprecated
      
      [INFO] [resources:testResources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:testCompile]
      [INFO] Compiling 1 source file to /home/ejort/microcontainer/deployers-impl/target/tests-classes
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Compilation failure
      
      /home/ejort/microcontainer/deployers-impl/src/tests/org/jboss/test/deployers/deployer/support/TestServiceMetaDataICF.java:[39,67] type org.jboss.managed.spi.factory.InstanceClassFactory does not take parameters
      
      /home/ejort/microcontainer/deployers-impl/src/tests/org/jboss/test/deployers/deployer/support/TestServiceMetaDataICF.java:[88,41] cannot find symbol
      symbol : method unwrap(org.jboss.metatype.api.values.MetaValue,java.lang.Class)
      location: class org.jboss.metatype.api.values.MetaValueFactory
      


      The class does exist in the Microcontainer's managed project, but it obviously
      doesn't exist in the snapshot.

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

          Did you build from the deployers-impl directory? If so, maven doesn't have a way to know where the managed module is located, so it tries to download it instead.
          If you build from the parent directory (aggregator) then it should be able to find the classes directory of the sibling modules. Or if you just rebuild (install) the managed project, then it will get it from the local repository.

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

             

            "pgier" wrote:
            Did you build from the deployers-impl directory? If so, maven doesn't have a way to know where the managed module is located, so it tries to download it instead.


            No. I built from the root like normal.


            If you build from the parent directory (aggregator) then it should be able to find the classes directory of the sibling modules. Or if you just rebuild (install) the managed project, then it will get it from the local repository.


            I deleted my local repository and that fixed it so it obviously had a wrong reference
            somewhere.

            I'm still not convinced that the local repository behaves very well (correctly),
            i.e. how can I convince myself that when I (re)build a tagged version
            it is building what I think it is building?

            Short of deleting my local repository on a regular basis to prevent it getting into
            one of these frequent corrupted states?

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

               

              "adrian@jboss.org" wrote:

              I'm still not convinced that the local repository behaves very well (correctly),
              i.e. how can I convince myself that when I (re)build a tagged version
              it is building what I think it is building?


              Basically until there is way to configure the build such it never uses
              a transient dependency and all dependencies are configured explcitly in the
              top level build file (and those are actualy used by Maven),
              I don't believe that any these tagged builds are actually 100% reproducable. :-(