You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by purestudent <pu...@gmail.com> on 2007/06/22 14:45:19 UTC
maven-dependency-plugin filtering issue
Hi all!
I need to filter files while unpack-dependencies goal is executed. For
example: I want only *.class and *.xml files to be unpacked. How I can
understand no default solution for this exist.
Can you suggest any solution for this?
Thank you!
--
View this message in context: http://www.nabble.com/maven-dependency-plugin-filtering-issue-tf3964442s177.html#a11251493
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-dependency-plugin filtering issue
Posted by purestudent <pu...@gmail.com>.
I have found the solution for my problem:
1. with maven-dependency-plugin unpack all needed artifacts to some tmp dir
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>initialize</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<outputDirectory>classes</outputDirectory>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<includeTypes>jar</includeTypes>
</configuration>
</execution>
</executions>
</plugin>
2. with <resources> filter files
<resources>
<resource>
<directory>classes</directory>
<includes>
<include>**/*.class</include>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
3. jar filtered resources
in addition the follows plugin can be used to clear "classes" dir at "clean"
goal
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>classes</directory>
<includes>
<include>**/*.*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
purestudent wrote:
>
> Hi!
>
> includeTypes does not do that I want. For example, if I have in
> dependencies 1.jar, 2.jar, 3.war, 4.ear and I use
> <includeTypes>jar</includeTypes>, when only 1.jar and 2.jar will be
> unpacked.
> But I need something else. Imagine that 1.jar includes *.class, *.xml,
> *.properties, and I want only *class files to be unpacked. includeTypes
> does not resolve this problem.
>
>
> Maria Odea Ching-2 wrote:
>>
>> Hi,
>>
>> Have you tried using the includeTypes and excludeTypes of the
>> unpack-dependencies mojo?
>>
>> See
>> http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html#includeTypes
>>
>> HTH,
>> Deng
>>
>> purestudent wrote:
>>> Hi all!
>>>
>>> I need to filter files while unpack-dependencies goal is executed. For
>>> example: I want only *.class and *.xml files to be unpacked. How I can
>>> understand no default solution for this exist.
>>>
>>> Can you suggest any solution for this?
>>>
>>> Thank you!
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/maven-dependency-plugin-filtering-issue-tf3964442s177.html#a11282735
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: maven-dependency-plugin filtering issue
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
You want to look at MDEP-47. This is a feature planned for 2.0-alpha-5.
-----Original Message-----
From: purestudent [mailto:purestudent@gmail.com]
Sent: Monday, June 25, 2007 12:10 AM
To: users@maven.apache.org
Subject: Re: maven-dependency-plugin filtering issue
Hi!
includeTypes does not do that I want. For example, if I have in
dependencies
1.jar, 2.jar, 3.war, 4.ear and I use <includeTypes>jar</includeTypes>,
when
only 1.jar and 2.jar will be unpacked.
But I need something else. Imagine that 1.jar includes *.class, *.xml,
*.properties, and I want only *class files to be unpacked. includeTypes
does
not resolve this problem.
Maria Odea Ching-2 wrote:
>
> Hi,
>
> Have you tried using the includeTypes and excludeTypes of the
> unpack-dependencies mojo?
>
> See
>
http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependenc
ies-mojo.html#includeTypes
>
> HTH,
> Deng
>
> purestudent wrote:
>> Hi all!
>>
>> I need to filter files while unpack-dependencies goal is executed.
For
>> example: I want only *.class and *.xml files to be unpacked. How I
can
>> understand no default solution for this exist.
>>
>> Can you suggest any solution for this?
>>
>> Thank you!
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context:
http://www.nabble.com/maven-dependency-plugin-filtering-issue-tf3964442s
177.html#a11281619
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-dependency-plugin filtering issue
Posted by purestudent <pu...@gmail.com>.
Hi!
includeTypes does not do that I want. For example, if I have in dependencies
1.jar, 2.jar, 3.war, 4.ear and I use <includeTypes>jar</includeTypes>, when
only 1.jar and 2.jar will be unpacked.
But I need something else. Imagine that 1.jar includes *.class, *.xml,
*.properties, and I want only *class files to be unpacked. includeTypes does
not resolve this problem.
Maria Odea Ching-2 wrote:
>
> Hi,
>
> Have you tried using the includeTypes and excludeTypes of the
> unpack-dependencies mojo?
>
> See
> http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html#includeTypes
>
> HTH,
> Deng
>
> purestudent wrote:
>> Hi all!
>>
>> I need to filter files while unpack-dependencies goal is executed. For
>> example: I want only *.class and *.xml files to be unpacked. How I can
>> understand no default solution for this exist.
>>
>> Can you suggest any solution for this?
>>
>> Thank you!
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/maven-dependency-plugin-filtering-issue-tf3964442s177.html#a11281619
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-dependency-plugin filtering issue
Posted by Maria Odea Ching <oc...@exist.com>.
Hi,
Have you tried using the includeTypes and excludeTypes of the
unpack-dependencies mojo?
See
http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html#includeTypes
HTH,
Deng
purestudent wrote:
> Hi all!
>
> I need to filter files while unpack-dependencies goal is executed. For
> example: I want only *.class and *.xml files to be unpacked. How I can
> understand no default solution for this exist.
>
> Can you suggest any solution for this?
>
> Thank you!
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org