You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier THIERRY <ol...@gmail.com> on 2009/02/09 17:37:26 UTC

How to get files from JAR dependencies in a plugin ?

Hi,

For a Maven project using Sun JAX-WS, I try to write a Maven plugin
(my first one) that should create Sun JAX-WS config file by merging
XML files from JAR dependencies.

It would be configured this way :

                       <plugin>
                               <groupId>fr.xxx.t4</groupId>
                               <artifactId>maven-sun-jaxws-plugin</artifactId>
                       <executions>
                               <execution>
                                       <goals>
                                               <goal>merge</goal>
                                       </goals>
                               </execution>
                       </executions>
                               <configuration>

<targetFile>src/main/webapp/WEB-INF/sun-jaxws.xml</targetFile>
                                       <sourceFiles>

<param>META-INF/sun-jaxws-commons.xml</param>

<param>META-INF/sun-jaxws-gt.xml</param>
                                       </sourceFiles>
                               </configuration>
                       </plugin>

This plugin should create a file referred by "targetFile" property by
reading and merging files referred by "sourceFiles" property. Source
files are in Maven project dependencies.
So I need to get an input stream on these source files, but I can't
find a way to find these files. I tried with getResourceAsStream but
it doesn't work.
Anyone has an idea how I could do this ?

Regards,

Olivier

PS : I already posted this question on dev list but I am not sure this
was the right place to get an answer for this ...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org