This is really a user's list question. In any case, [test]outputDirectory
are prefixed by working directory because maven interprets the paths to be
relative. The real question is, why isn't the property ${
project.build.directory} resolving correctly? I don't know if it should or
not... I don't know property resolution that well. But, its obvious that
your "directory" element is being set as expected, so you should be able to
fix your particular issue by doing the following:

<outputDirectory>${outputDirectory}/${project.artifactId
}/classes</outputDirectory>
<testOutputDirectory>${outputDirectory}/${project.artifactId
}/test-classes</testOutputDirectory>

Eric

On 7/20/06, Matthieu Godlewski <[EMAIL PROTECTED]> wrote:

Hy,





There is perhaps an issue with property in pom.

I want set another partition as output directory (no need to have a raid
partition to store artifacts).

Here my pom :



<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.test</groupId>

  <artifactId>parent</artifactId>

  <packaging>pom</packaging>

  <version>1.0-SNAPSHOT</version>

  <name>Test parent</name>



  <build>

    <directory>${outputDirectory}/${project.artifactId}</directory>


<outputDirectory>${project.build.directory}/classes</outputDirectory>


<testOutputDirectory>${project.build.directory}/test-classes</testOutput
Directory>

  </build>



</project>



My ~/.m2/settings.xml



<settings>

  <profiles>

    <profile>

      <id>mat</id>

      <properties>

        <outputDirectory>/media/hdbc/dev_obj/mat/</outputDirectory>

      </properties>

    </profile>

  </profiles>

   <activeProfiles>

      <activeProfile>mat</activeProfile>

   </activeProfiles>

</settings>



mvn help:effective-pom



<?xml version="1.0"?><project>

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.test</groupId>

  <artifactId>parent</artifactId>

  <packaging>pom</packaging>

  <name>Test parent</name>

  <version>1.0-SNAPSHOT</version>

  <build>


<sourceDirectory>/home/matgodle/mvntest/src/main/java</sourceDirectory>

    <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>


<testSourceDirectory>/home/matgodle/mvntest/src/test/java</testSourceDir
ectory>


<outputDirectory>/home/matgodle/mvntest/${project.build.directory}/class
es</outputDirectory>


<testOutputDirectory>/home/matgodle/mvntest/${project.build.directory}/t
est-classes</testOutputDirectory>

    <directory>/media/hdbc/dev_obj/mat/parent</directory>

...





I don't understand why outputDirectory and testOutputDirectory are
prefixed by my working directory...



Can I open a bug about this issue ?



Regards,





Matthieu





To find out more about Reuters visit www.about.reuters.com

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of Reuters
Ltd.





--
Eric
http://codehaus.org/~eredmond

Reply via email to