Yes, you're right, of course.
I noticed my mistake it slightly too late. :-)
Stefan
>>>
m2e-users-request@xxxxxxxxxxx> 10.09.2012 18:00 >>Date: Mon, 10 Sep 2012 11:21:53 -0400
From: Igor Fedorenko <igor@xxxxxxxxxxxxxx>
To: m2e-users@xxxxxxxxxxx
Subject: Re: [m2e-users] Corrupted Assembly, when using a type:pom
dependency
Message-ID: <504E0591.7090002@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
This does not look related to m2e. Did you mean to ask this question on
maven user list?
--
Regards,
Igor
On 12-09-10 10:31 AM, Stefan Rademacher wrote:
> Hi all,
> I want to create an assembly, using a moduleSet. With the following
> (simplified) example, I select a certain artifact, define the output
> directory and provide a naming pattern.
> <assembly>
> <id>distribution</id>
> <formats>
> <format>zip</format>
> </formats>
> <moduleSets>
> <moduleSet>
> <useAllReactorProjects>true</useAllReactorProjects>
> <includes>
> *<include>${artifact.groupId}:test.assembly.server</include>
> * </includes>
> <binaries>
> *<outputDirectory>.</outputDirectory>
> * <unpack>false</unpack>
> <outputFileNameMapping>${module.artifactId}.${module.extension}
> </outputFileNameMapping>
> </binaries>
> </moduleSet>
> </moduleSets>
> </assembly>
> The module I select in this assembly.xml contains one dependency:
> <dependency>
> <groupId>de.hhla.test</groupId>
> <artifactId>test.assembly.core</artifactId>
> <version>0.0.1-SNAPSHOT</version>
> * <type>pom</type>*
> </dependency>
> The resulting assembly is unusable, as soon as the following two
> conditions are true:
> - The module has a dependency with <type>pom</type>
> AND
> - The outputDirectory of the moduleSet is "."
> In this case, the resulting assembly (e. g. zip file) looks like this:
> ZIP
> |
> |-- ""
> | |-- test.assembly.server.jar
> |
> |-- test.assembly.server.jar
> The file "test.assembly.server.jar", which is contained in that
> directory with an empty name, is not actually a jar, but the POM of the
> dependency, which I specified with <type>pom</type> !!! That's totally
> weird, isn't it?
> Extracting this zip structure leads to a corrupted
> "test.assembly.server.jar", because the first jar in the dir with no
> name (which actually is an XML file) overwrites the correct jar at the
> actual root level of the zip file.
> Another hint is this debug output of the assembly plugin:
> [DEBUG] Adding file: C:\Dokumente und
> Einstellungen\<user>\.m2\repository\de\hhla\test\test.assembly.core\0.0.1-SNAPSHOT\test.assembly.core-0.0.1-SNAPSHOT.pom
> to archive location: TEST_0.0.1-SNAPSHOT//test.assembly.server.jar
> (Please notice the two slashes in the destination path.)
> Is this already a known issue or should I file a bug?
> Thanks and best regards,
> Stefan
>
>
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/m2e-users>