Hi All,

I created a reactor project with a super pom and with many modules and module dependencies. To some modules I added the assembly plugin (2.1) to the package phase to build the executable
application including scripts, jars, properties, etc.

mainproject
        |-module1
        |-module2
        |-module3
        |-module4

The dependencies are:
        module2 -> module1
        module3 -> module2
        module4 -> moduel2 & module 3

When invoking mvn clean install in a module directory, everything works fine and the modules jar and the assembled and packed application of the module is placed in my local repository.

When I call mvn clean install from the main directory, it only works fine if the modules are already in
the local repository.

I got build errors when no modules are in the local repository and getting to module2 After jar:jar of module2, the assembly plugin is invoked and somehow the poms of the later modules get evaluated and try to resolve the jar artefact of module2 from the local repository. The jar is missing,
as the assembly is invoked before the install phase.

Do I make any mistake? Could somebody help me?

Below is an pom and a descriptor of a submodule.

Thanks a lot

Timo

POM:
<project>
:
:
  <dependencies>  
:
:
  </dependencies>
  <build>
  <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <configuration>
              <descriptors>
                <descriptor>src/main/assembly/bin.xml</descriptor>
              </descriptors>
            </configuration>
            <goals>
              <goal>attached</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


Descriptor:
<assembly>
  <id>bin</id>
  <formats>
    <format>tar.gz</format>
    <format>tar.bz2</format>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <includeSiteDirectory>false</includeSiteDirectory>
  <fileSets>
    <fileSet>
      <directory>src/main/bin</directory>
      <outputDirectory>bin</outputDirectory>
      <fileMode>755</fileMode>
    </fileSet>
    <fileSet>
      <directory>src/main/config</directory>
      <outputDirectory>conf</outputDirectory>
      <includes>
        <include>es.properties</include>
        <include>projectProperties</include>
      </includes>
    </fileSet>
  </fileSets>
  <dependencySets>
    <dependencySet>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputDirectory>lib</outputDirectory>
    </dependencySet>
  </dependencySets>
  <componentDescriptors/>
</assembly>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to