[ 
https://issues.apache.org/jira/browse/MNG-5881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Schulte closed MNG-5881.
----------------------------------
    Resolution: Not A Problem

You are asking for a missing file in a {{jar}} file. So I unzip your test 
project for a second time and tell you again, that the {{jar}} file you are 
referring to is created by the {{maven-bundle-plugin}} and that you need to ask 
at the Apache Felix project what is going on because that is the project 
providing that plugin. You maybe can ask on the users mailing list for help. 
Maybe someone around can help. This is no Maven issue. Got it?

{code}
/tmp/maven-test
$ mvn verify
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] aggregrator
[INFO] bundle one
[INFO] Bundle Two
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building aggregrator 1.0
[INFO] ------------------------------------------------------------------------
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building bundle one 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ one ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ one ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ 
one ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ one ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ one ---
[INFO] 
[INFO] --- maven-bundle-plugin:2.5.3:bundle (default-bundle) @ one ---
[WARNING] Bundle maven.test:one:bundle:1.0 : Unused Private-Package 
instructions, no such package(s) on the class path: [!*]
[INFO] 
[INFO] --- build-helper-maven-plugin:1.3:attach-artifact (attach-artifacts) @ 
one ---
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Bundle Two 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.10:copy (copy) @ two ---
[INFO] Configured Artifact: maven.test:one:blueprint:1.0:xml
[INFO] Copying test.xml to 
/tmp/maven-test/two/target/classes/OSGI-INF/blueprint/one-test.xml
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ two ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ two ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ 
two ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ two ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ two ---
[INFO] 
[INFO] --- maven-bundle-plugin:2.5.3:bundle (default-bundle) @ two ---
[WARNING] Bundle maven.test:two:bundle:1.0 : Unused Private-Package 
instructions, no such package(s) on the class path: [!*]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] aggregrator ........................................ SUCCESS [  0.009 s]
[INFO] bundle one ......................................... SUCCESS [  3.167 s]
[INFO] Bundle Two ......................................... SUCCESS [  1.897 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.334 s
[INFO] Finished at: 2016-02-15T18:30:45+01:00
[INFO] Final Memory: 15M/48M
[INFO] ------------------------------------------------------------------------

schu...@t60.schulte.it
2016-02-15T18:30:46+0100 Monday 046
/tmp/maven-test
$ jar tf two/target/                                                            
                                                                       
classes/       maven-status/  test-classes/  two-1.0.jar    
$ jar tf two/target/two-1.0.jar                                                 
                                                                       
META-INF/MANIFEST.MF
META-INF/
META-INF/maven/
META-INF/maven/maven.test/
META-INF/maven/maven.test/two/
META-INF/maven/maven.test/two/pom.properties
META-INF/maven/maven.test/two/pom.xml
OSGI-INF/
OSGI-INF/blueprint/
OSGI-INF/blueprint/bundle-context-osgi.xml
OSGI-INF/blueprint/bundle-context.xml
{code}


> Resource not put into jar
> -------------------------
>
>                 Key: MNG-5881
>                 URL: https://issues.apache.org/jira/browse/MNG-5881
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.3
>         Environment: windows 7
>            Reporter: Douglas Jackson
>         Attachments: maven-test.zip
>
>
> I have a resource that I am copying to the target/classes directory using the 
> maven-dependency-plugin
> version 2.10.  The <outputDirectory> is specified as:
> {noformat}     ${project.build.outputDirectory}/OSGI-INF/blueprint{noformat}
> I am doing so in the "validate" phase.
> After doing a "clean install", the file is in the 
> {{/target/classes/OSGI-INF/blueprint}} directory alongside
> 2 other files that were in the {{src/main/resources/OSGI-INF/blueprint}} 
> directory.
> However, the file does not appear in the output jar file.  From posts on the
> web it appears that all files in the classes directory should be copied into
> the jar.
> I tried using the dependency copy plugin to copy it first to another folder 
> and then using the maven resources plugin to copy it to the 
> $\{project.build.outputDirectory}/OSGI-INF/blueprint directory.
> That did not work either.
> I am using maven version 3.2.3.
> It is an .xml file just like the other files from the {{src/main/resources}}. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to