[
https://issues.apache.org/jira/browse/MASSEMBLY-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15315392#comment-15315392
]
Michael Osipov commented on MASSEMBLY-809:
------------------------------------------
At first glance, it looks like you are abusing the system and did not
understand the concept of classifiers. If you have {{jbossxts}} and an API,
there must be a second module with the name {{jbossxts-api}} and not
{{jbossxts}} and a classifier. A classified component is always suplemental,
additional one to the original or some variation for example.
When I see this
{code:xml}
<includes>
<include>org.jboss.narayana.xts:ws-t11:war:client</include>
<include>org.jboss.narayana.xts:ws-t11:war:coordinator</include>
<include>org.jboss.narayana.xts:ws-t11:war:participant</include>
</includes>
{code}
It just looks wrong. It must be
{code:xml}
<includes>
<include>org.jboss.narayana.xts:ws-t11-client:war</include>
<include>org.jboss.narayana.xts:ws-t11-coordinator:war</include>
<include>org.jboss.narayana.xts:ws-t11-participant:war</include>
</includes>
{code}
Please clarify.
> Assembly plugin requires precise dependency order when classifier is used
> -------------------------------------------------------------------------
>
> Key: MASSEMBLY-809
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-809
> Project: Maven Assembly Plugin
> Issue Type: Bug
> Components: dependencySet
> Affects Versions: 2.5.5, 2.6
> Reporter: Ondra Chaloupka
>
> Assembly plugin wrongly pack dependencies of project when {{classifier}}
> dependencies are defined in random order.
> For the plugin pack it in right way it requires ordering dependencies
> precisely where dependency without the {{classifier}} is used before the
> dependency with it.
> If wrong order is used then the result jar seems to contain both dependencies
> - with and without classifier. But the file _without classifier_ is not
> contained and the content of it is equal to the one _with the classifier_.
> For building Narayana project there is used pom.xml with
> {code}
> <dependency>
> <groupId>org.jboss.narayana.xts</groupId>
> <artifactId>jbossxts</artifactId>
> <version>${project.version}</version>
> <classifier>api</classifier>
> </dependency>
> <dependency>
> <groupId>org.jboss.narayana.xts</groupId>
> <artifactId>jbossxts</artifactId>
> <version>${project.version}</version>
> </dependency>
> {code}
> pom.xml: https://github.com/jbosstm/narayana/blob/master/narayana-full/pom.xml
> bin.xml:
> https://github.com/jbosstm/narayana/blob/master/narayana-full/src/main/assembly/bin.xml
> For this descriptor the content of the result zip file is
> {code}
> 44658 06-01-2016 14:17
> narayana-full-5.3.3.Final-SNAPSHOT/lib/xts/jbossxts-api.jar
> 44658 06-01-2016 14:17
> narayana-full-5.3.3.Final-SNAPSHOT/lib/xts/jbossxts.jar
> {code}
> You can see the artifacts {{jbossxts-api}} and {{jbossxts}} are the same.
> If ordering is changed
> {code}
> <dependency>
> <groupId>org.jboss.narayana.xts</groupId>
> <artifactId>jbossxts</artifactId>
> <version>${project.version}</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.narayana.xts</groupId>
> <artifactId>jbossxts</artifactId>
> <version>${project.version}</version>
> <classifier>api</classifier>
> </dependency>
> {code}
> then the generated zip file contain correct data.
> {code}
> 972473 06-01-2016 14:17
> narayana-full-5.3.3.Final-SNAPSHOT/lib/xts/jbossxts.jar
> 44658 06-01-2016 14:17
> narayana-full-5.3.3.Final-SNAPSHOT/lib/xts/jbossxts-api.jar
> {code}
> _To reproduce:_
> # {{git clone [email protected]:jbosstm/narayana.git}}
> # {{cd narayana}}
> # {{./build.sh clean install -Pcommunity -DskipTests -Didlj-enabled=true}}
> Now you can see
> {{unzip -l narayana-full/target/narayana-full-5.*zip | grep xts}}
> showing the same file.
> Edit {{narayana-full/pom.xml}} to change the place where {{classfier}} is
> used for the {{jbossxts}} artifact.
> You can do {{cd narayana-full; mvn clean install}} and when you checked the
> result zip there will be different content of both jbossxts files.
> Discussed at https://issues.jboss.org/browse/JBTM-2679
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)