Good evening.
I'm trying to use my root POM to build an assembly corresponding to
what my current "final" ant build generates, which has all the project
JARs as well as source to one module laid out like:
foo-1.2.zip:
foo-1.2/README
foo-1.2/foo-a-1.2.jar
foo-1.2/foo-b-1.2.jar
foo-1.2/foo-c-1.2.jar
foo-1.2/src/com/example/Example.java
I've almost got the maven assembly plugin building the right thing.
Specifically, the README and binaries show up in the right places just
fine. The source for the example, however... has some issues.
The assembly XML looks like
--- cut here ---
<assembly>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<moduleSets>
<moduleSet>
<binaries>
<outputDirectory>/</outputDirectory>
<unpack>false</unpack>
</binaries>
</moduleSet>
<!-- include example src -->
<moduleSet>
<includes>
<include>com.example.foo:foo-examples</include>
</includes>
<sources>
<outputDirectory>/src</outputDirectory>
</sources>
</moduleSet>
</moduleSets>
</assembly>
--- end here ---
...but the sources end up somewhere strange:
$ cd target/foo-1.3-SNAPSHOT.dir/
$ find
./foo-1.3-SNAPSHOT/foo-1.3-SNAPSHOT/src/src/main/java/foo/examples/Example.java
./foo-1.3-SNAPSHOT/foo-1.3-SNAPSHOT/src/src/main/java/foo/examples/package-info.java
./foo-1.3-SNAPSHOT/foo-1.3-SNAPSHOT/src/pom.xml
./foo-1.3-SNAPSHOT/foo-c-1.3-SNAPSHOT.jar
./foo-1.3-SNAPSHOT/foo-b-1.3-SNAPSHOT.jar
./foo-1.3-SNAPSHOT/foo-examples-1.3-SNAPSHOT.jar
./foo-1.3-SNAPSHOT/foo-a-1.3-SNAPSHOT.jar
(Yes, the full base directory happens twice for sources but once for binaries.)
Conversely, if I add
<includeBaseDirectory>false</includeBaseDirectory> to the assembly
descriptor and rebuild, I get
$ cd target/foo-1.3-SNAPSHOT.dir/
$ find
./src/src/main/java/foo/examples/Example.java
./src/src/main/java/foo/examples/package-info.java
./src/pom.xml
./foo-c-1.3-SNAPSHOT.jar
./foo-b-1.3-SNAPSHOT.jar
./foo-examples-1.3-SNAPSHOT.jar
./foo-a-1.3-SNAPSHOT.jar
Which is much closer to what I want, but is missing the base directory
(a bigger issue in the zip and tarball releases, which shouldn't stomp
on the current directory when unpacked).
Is my only option to set includeBaseDirectory=false and "hand-craft"
the base directory in with ${property}s?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]