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: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]