Sorry for the newbie comment - but shade is way too cool!
Don't you just love serendipity :-)
How have I lasted so long without discovering maven sooner?
Anyway, shade is doing mostly what I want, except I cannot seem to
configure it to include classes from a sibling module in Maven.
My structure is something like
parent/pom.xml
service-module/pom.xml
common-module/pom.xml
client-module/pom.xml
I want the service-module.jar to contain the classes from common-module,
but can't figure out how. I tried putting the coordinates of
common-module into my service-module/pom.xml, but Maven complains
because it cannot find common-module in any repository.
Right now my service-module/pom.xml looks like
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>shade</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>*:*</include>
<include>com.kodak.intersystem:intersystem-common</include>
</includes>
</artifactSet>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.kodak.intersystem.service.Service</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Eventually I also want client-module.jar to include the common classes too.
Am I I overlooking something obvious? Do I need to configure my parent
POM as an aggregator or something like that?
Cheers, Eric
On 2011-05-02 10:37 AM, Wayne Fay wrote:
If you want to write an installer for foo.jar, how do you collect all the
dependencies like bar.jar together to distribute with your application
installer?
maven-shade-plugin
assembly plugin
appassembler
etc
In a similar fashion, when you do a release, don't you want to check all
your dependent artifacts like bar.jar into source control so you can rebuild
that release again without worrying that that version of bar.jar has
vanished from all repositories on earth?
Nexus
Archiva
Artifactory
etc
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org