You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Heck, Joe" <Jo...@dig.com> on 2007/02/28 21:41:24 UTC

need help with a multimodule build - binding an assembly to "package" it all up

I have several multi-module builds all rolling with Maven, and I'm
having a little trouble figuring out how to bind an assembly directive
to the master pom's build cycle so that it can pull all the results
together into the master pom's target directory.

 

The structure I have now:

 

Master

 +-- pom.xml (pom packaging, assembly defined with moduleSets)

 +-- model-jar (jar packaging)

 +-- guest webapp (war packaging)

 +-- admin webapp (war packaging)

 

I've got it all working such that I can invoke "mvn clean package
assembly:directory" or "mvn clean package assembly:assembly" and get the
results that I'm looking for in the master pom's target directory.

 

When I try to add in a stanza to bind the assembly to the package phase
of the master pom, things start breaking. I started with:

 

  <build>

    <plugins>

      <plugin>

        <artifactId>maven-assembly-plugin</artifactId>

        <configuration>

          <descriptors>

            <descriptor>src/assemble/ops.xml</descriptor>

          </descriptors>

        </configuration>

      </plugin>

    </plugins>

  </build>

 

And updated it to:

 

  <build>

    <plugins>

      <plugin>

        <artifactId>maven-assembly-plugin</artifactId>

        <configuration>

          <descriptors>

            <descriptor>src/assemble/ops.xml</descriptor>

          </descriptors>

        </configuration>

        <executions>

          <execution>

            <id>make-assembly</id> 

            <phase>package</phase> 

            <goals>

              <goal>attached</goal> 

            </goals>

          </execution>

        </executions> 

      </plugin>

    </plugins>

  </build>

 

The result is that it looks like the assembly is being invoke *prior* to
the modules getting built - not at all what I expected. Is there a
mechanism that I'm overlooking to indicate that I want the modules all
built/processed prior to the assembly in the master pom getting invoked?

 

I've tried binding in different goals to the assembly, but "single", and
"directory-inline", and "attached" didn't appear to make much difference
in this case.

 

Am I coming at this problem from the wrong angle?

 

-joe

 

Joseph Heck

Walt Disney Internet Group

x8664-4352