Environment:
Apache Maven 3.0.2 (r1056850; 2011-01-09 01:58:10+0100)
Java version: 1.6.0_10, vendor: Sun Microsystems Inc.
Java home: D:\java\jdk1.6.0_10\jre
Default locale: sl_SI, platform encoding: Cp1250
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
I'm using a multiple maven module project and come upon some problem's with
resources pluging when I'm trying to do some filtering in my modules.
The problem is with directory tag because it take the path absolute path and
not relative.
scenario:
path : D:\IDE\eclipse\workspace\avsTest (my parent pom project)
|
|-avs-bean(my child jar project)
|
|
|-avs-dao(my child jar project)
In my avs-dao project I have a build:
<build>
<resources>
<resource>
<directory>/src/main/resources/persistence/sfinga2</directory>
<filtering>true</filtering>
<includes>
<include>**/persistence.xml</include>
</includes>
<targetPath>${project.build.outputDirectory}/META-INF/</targetPath>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<finalName>avstest-dao-sfinga2</finalName>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</build>
When I'm runing maven package
path : D:\IDE\eclipse\workspace\avs-dao >> mvn package
I get message:
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
avstest-dao ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
D:\src\main\resources\persistence\sfinga2
So resource plugin it take a absolute path for directory so I'm thinking this
is a bug, it should take the relative path
D:\IDE\eclipse\workspace\avs-dao\src\main\resources\persistence\sfinga2
Even if I run maven package on a root of parent
project(D:\IDE\eclipse\workspace\avsTest) I have the same problem.
Regars, Tomaz
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]