[ 
https://issues.apache.org/jira/browse/MDEP-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15494167#comment-15494167
 ] 

roger edited comment on MDEP-536 at 9/15/16 6:34 PM:
-----------------------------------------------------

Figured out that you have to use "nbm-file" NOT "nbm" as the type in order to 
get maven-dependency-plugin to copy/extract the *.nbm file instead of the *.jar 
file.

i.e. replace:
<type>nbm</type>
with
<type>nbm-file</type>

Is this documented somewhere? Is there a list of supported type values that 
explains what each one does?


was (Author: sproger1):
Figured out that you have to use "nbm-file" NOT "nbm" as the type in order to 
get maven-dependency-plugin to copy/extract the *.nbm file instead of the *.jar 
file.

Is this documented somewhere? Is there a list of supported type values that 
explains what each one does?

> 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)

Reply via email to