Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Duplicate
-
2.0.4
-
None
-
None
Description
I am using a custom lifecycle, resource, as follows:
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>resource</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<phases>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<package>org.apache.maven.plugins:maven-jar-plugin:jar</package>
<install>org.apache.maven.plugins:maven-install-plugin:install,com.dcx.NGST:maven-bundle-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
</configuration>
</component>
<component>
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
<role-hint>resource</role-hint>
<implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
<configuration>
<extension>jar</extension>
<type>resource</type>
<packaging>resource</packaging>
<language>java</language>
<addedToClasspath>true</addedToClasspath>
</configuration>
</component>
I have a pom structure that looks like this:
app\data\production\ecuDB\ABS\01\pom.xml
app\data\production\ecuDB\ABS\02\pom.xml
app\data\production\ecuDB\ABS\03\pom.xml
app\data\production\ecuDB\ABS\04\pom.xml
app\data\production\ecuDB\ABS\05\pom.xml
app\data\production\ecuDB\ABS\06\pom.xml
app\data\production\ecuDB\ABS\07\pom.xml
Each folder in the structure contains a pom type, and references the child modules; 0X are resource type artifacts as defined above. I attached the text output of maven install on one of the resource projects, namely 01, followed by 'cd ..' and maven install on all ABS modules. Comparing the 2 runs, you will find that the 01 resource artifact has been installed with different extensions. It uses the correct .jar extension on the first run, but it defaults to .resource when build as a multiproject. It appears that the component definition isn't available, and it defaults the extension to the type value
I am also going to attach the 01/pom.xml
Attachments
Attachments
Issue Links
- duplicates
-
MNG-1682 Plugins do not honor the correct extension when run as a part of a multiproject build
- Closed
- is related to
-
MNG-2426 Artifact copied to local repository with wrong file extension when using jboss-packaging plugin
- Closed
- relates to
-
MNG-2831 Cannot add custom artifact handler and custom lifecycle as a build extension
- Closed