The problem is that you're using the wrong assembly goal. The one you must
use is "single". I changed and it works just fine with Maven 3.0-RC2.
Also, as a side thing while I'm at it, in your "top pom" you should lock
down the plugin versions in build/pluginManagement/plugins (not
build/plugins).

/Anders

On Fri, Sep 24, 2010 at 20:58, Jon Paynter <[email protected]> wrote:

> Hi,
>
> I have a strange build error I cant explain - but (unfortunately to me) its
> entirely reproducable.
>
> The test project is located here:
> http://www.mediafire.com/file/8do8nz5xhbmdb1m/TestProject.zip
> It consists of an aggregator pom at the top, and 2 more aggregator pom's
> below, and then files to build 2 different j2ee components (j2ee_A and
> j2ee_B).  The projects dont depend on each other, so they will build fine
> seperately.  but when built from the top level pom, I always get a
> dependency error in project _B.  Ive checked the files in the 2 projects
> and
> aside from the _A and _B names.
>
> to reproduce, do the following:
>  - unzip the file somewhere
>  - goto the folder & run:   mvn package
> you will get the following error:
>
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) myCompany:j2ee_B.war:war:1.0
>
> now build the projects individually:
>  cd j2ee_B
>  mvn package
>
> [INFO] BUILD SUCCESSFUL
>
>  cd ..\j2ee_A
>  mvn package
>
> [INFO] BUILD SUCCESSFUL
>
> now edit j2ee_A\pom.xml and remove <module>j2ee_A_package</module> from the
> modules list.
>
> go back to the top level pom:
>   mvn clean
>   mvn package
>
> [INFO] BUILD SUCCESSFUL
>
> Note the project that failed with the first build was not touched.
>
> Lastly -- udo the edit in j2ee_A\pom.xml and do the same in j2ee_B\pom.xml
>   mvn clean
>   mvn package
>
> [ERROR] BUILD ERROR
> [INFO] ---------------------------
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) myCompany:j2ee_B.war:war:1.0
>
>
>
> This seems to me that somethign is wrong with j2ee_B_package.  but aside
> from _A and _B the contents are identical between j2ee_A_package and
> j2ee_B_package.
>
> How do I get both projects with their assemblies to build from the top
> level
> pom?
>

Reply via email to