Wayne:

Thanks a lot for the headstart. I've got the first part of the solution working 
now, however I'm having trouble figuring out how to specify the derived 
attachment from module1 in the m-dependency-p:copy portion of it.

Here's a fragment from my module2's pom:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-installed</id>
            <phase>install</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>com.xxxxx</groupId>
                  <artifactId>module1</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                </artifactItem>
              </artifactItems>
              <outputDirectory>WebRoot/XXX</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

Thing is, the artifact I want is the attachment, ie. it has a classifier 
associated with it. The jar file is named module1-1.0.0-classifiername.jar. As 
is, it doesn't even copy the non-classified file, so I've bungled something 
else, and, even if it did work, there's no way to specify the classifier. What 
to do?

Tom Harris

-----Original Message-----
From: Wayne Fay [mailto:[email protected]] 
Sent: Thursday, March 04, 2010 12:59 PM
To: Maven Users List
Subject: Re: Including sibling module attachment inside another module artifact

> module1's output is two jar files, one the standard output, and the
> other the extra one defined with includes/excludes using the
> maven-jar-plugin and a classifier.

The extra one needs to be attached to your project with
build-helper-m-p and installed and deployed alongside the standard
output.

> What I want to do is include this attachment inside the module2
> war artifact, under that XXX folder. The WebRoot folder is defined to
> be the staging area for the war artifact.

You should use m-dependency-p:copy to put the extra one in WebRoot.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to