You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "roger (JIRA)" <ji...@apache.org> on 2016/08/10 15:48:20 UTC
[jira] [Created] (MDEP-536) Support nbm packaging
roger created MDEP-536:
--------------------------
Summary: Support nbm packaging
Key: MDEP-536
URL: https://issues.apache.org/jira/browse/MDEP-536
Project: Maven Dependency Plugin
Issue Type: Improvement
Components: copy, unpack
Affects Versions: 2.10
Reporter: roger
Fix For: 3.0, 2.10.1
Netbeans modules are packaged as nbm files (and jars). The nbm packaging is very similar to a jar except it contains additional files, libraries, resources... The nbms are included in the maven repositories along side their smaller jar file counterparts, and there are times when a developer may want to unpack, copy,... the nbm file and NOT the jar file (since the nbm contains files that may be of use).
When I add the xml tag entry <type>nbm</type> to the artifactItem block, I expect it to get the 'nbm' and not the 'jar' item, but this is not the current behavior of the maven-dependency-plugin.
I have a situation where an nbm dependency contains/packages native libraries needed for JUnit tests to pass. I tried to use the maven-dependency-plugin to unpack the nbm during <phase>generate-test-resources</phase> so that I can put a specific mavenized version on my java.library.path for testing. But, discovered that nbm packaging is ignored by maven-dependency-plugin.
The below example should downloand and extract nbm file not the jar file from a maven repository.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>unpack</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>someGroup</groupId>
<artifactId>someArtifact</artifactId>
<version>someVersion</version>
<type>nbm</type>
<outputDirectory>target/libs</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)