You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jim McCaskey (JIRA)" <ji...@codehaus.org> on 2009/03/11 22:06:13 UTC
[jira] Created: (MNG-4083) project.build.directory not set properly
for plugins
project.build.directory not set properly for plugins
----------------------------------------------------
Key: MNG-4083
URL: http://jira.codehaus.org/browse/MNG-4083
Project: Maven 2
Issue Type: Bug
Components: Settings
Affects Versions: 2.0.10, 2.0.9
Environment: Windows XP
Reporter: Jim McCaskey
Priority: Minor
Maven 2.0.9 and above do not seem to set project.build.directory properly in down stream plugins. I have the below test case that shows the problem in the ant plugin, but I have also seen in in the javadoc plugin. Below is my test case and the results as seen from 2.0.7, 2.0.8, 2.0.9, and 2.0.10.
Test POM:
<?xml version="1.0" encoding="UTF-8"?>
<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>test</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<name>Foo</name>
<properties>
<djobj>E:\obj</djobj>
</properties>
<build>
<defaultGoal>package</defaultGoal>
<outputDirectory>${djobj}/${project.artifactId}/classes</outputDirectory>
<testOutputDirectory>${djobj}/${project.artifactId}/test-classes</testOutputDirectory>
<directory>${djobj}/${project.artifactId}</directory>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<tasks>
<echo message="Debug data"/>
<echo message="basedir = ${basedir}"/>
<echo message="djobj = ${djobj}"/>
<echo message="project.build.sourceDirectory = ${project.build.sourceDirectory}"/>
<echo message="project.build.scriptSourceDirectory = ${project.build.scriptSourceDirectory}"/>
<echo message="project.build.testSourceDirectory = ${project.build.testSourceDirectory}"/>
<echo message="project.build.outputDirectory = ${project.build.outputDirectory}"/>
<echo message="project.build.testOutputDirectory = ${project.build.testOutputDirectory}"/>
<echo message="project.build.directory = ${project.build.directory}"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Test output:
Maven 2.0.7
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[echo] Debug data
[echo] basedir = E:\foo
[echo] djobj = E:\obj
[echo] project.build.sourceDirectory = E:\foo\src\main\java
[echo] project.build.scriptSourceDirectory = src/main/scripts
[echo] project.build.testSourceDirectory = E:\foo\src\test\java
[echo] project.build.outputDirectory = E:\obj/test/classes
[echo] project.build.testOutputDirectory = E:\obj/test/test-classes
[echo] project.build.directory = E:\obj/test
[INFO] Executed tasks
Maven 2.0.8
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[echo] Debug data
[echo] basedir = E:\foo
[echo] djobj = E:\obj
[echo] project.build.sourceDirectory = E:\foo\src\main\java
[echo] project.build.scriptSourceDirectory = src/main/scripts
[echo] project.build.testSourceDirectory = E:\foo\src\test\java
[echo] project.build.outputDirectory = E:\obj/test/classes
[echo] project.build.testOutputDirectory = E:\obj/test/test-classes
[echo] project.build.directory = E:\obj/test
[INFO] Executed tasks
Maven 2.0.9
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[echo] Debug data
[echo] basedir = E:\foo
[echo] djobj = E:\obj
[echo] project.build.sourceDirectory = E:\foo\src\main\java
[echo] project.build.scriptSourceDirectory = src/main/scripts
[echo] project.build.testSourceDirectory = E:\foo\src\test\java
[echo] project.build.outputDirectory = E:\foo\E:\obj\test\classes
[echo] project.build.testOutputDirectory = E:\foo\E:\obj\test\test-classes
[echo] project.build.directory = E:\foo\E:\obj\test
[INFO] Executed tasks
Maven 2.0.10
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[echo] Debug data
[echo] basedir = E:\foo
[echo] djobj = E:\obj
[echo] project.build.sourceDirectory = E:\foo\src\main\java
[echo] project.build.scriptSourceDirectory = src/main/scripts
[echo] project.build.testSourceDirectory = E:\foo\src\test\java
[echo] project.build.outputDirectory = E:\foo\E:\obj\test\classes
[echo] project.build.testOutputDirectory = E:\foo\E:\obj\test\test-classes
[echo] project.build.directory = E:\foo\E:\obj\test
[INFO] Executed tasks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MNG-4083) project.build.directory not set properly
for plugins
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-4083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter closed MNG-4083.
-----------------------------
Assignee: Brett Porter
Resolution: Duplicate
> project.build.directory not set properly for plugins
> ----------------------------------------------------
>
> Key: MNG-4083
> URL: http://jira.codehaus.org/browse/MNG-4083
> Project: Maven 2
> Issue Type: Bug
> Components: Settings
> Affects Versions: 2.0.9, 2.0.10
> Environment: Windows XP
> Reporter: Jim McCaskey
> Assignee: Brett Porter
> Priority: Minor
>
> Maven 2.0.9 and above do not seem to set project.build.directory properly in down stream plugins. I have the below test case that shows the problem in the ant plugin, but I have also seen in in the javadoc plugin. Below is my test case and the results as seen from 2.0.7, 2.0.8, 2.0.9, and 2.0.10.
> Test POM:
> <?xml version="1.0" encoding="UTF-8"?>
> <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>test</groupId>
> <artifactId>test</artifactId>
> <packaging>jar</packaging>
> <version>1.0.0</version>
> <name>Foo</name>
> <properties>
> <djobj>E:\obj</djobj>
> </properties>
> <build>
> <defaultGoal>package</defaultGoal>
> <outputDirectory>${djobj}/${project.artifactId}/classes</outputDirectory>
> <testOutputDirectory>${djobj}/${project.artifactId}/test-classes</testOutputDirectory>
> <directory>${djobj}/${project.artifactId}</directory>
> <plugins>
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <phase>package</phase>
> <configuration>
> <tasks>
> <echo message="Debug data"/>
> <echo message="basedir = ${basedir}"/>
> <echo message="djobj = ${djobj}"/>
> <echo message="project.build.sourceDirectory = ${project.build.sourceDirectory}"/>
> <echo message="project.build.scriptSourceDirectory = ${project.build.scriptSourceDirectory}"/>
> <echo message="project.build.testSourceDirectory = ${project.build.testSourceDirectory}"/>
> <echo message="project.build.outputDirectory = ${project.build.outputDirectory}"/>
> <echo message="project.build.testOutputDirectory = ${project.build.testOutputDirectory}"/>
> <echo message="project.build.directory = ${project.build.directory}"/>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </project>
> Test output:
> Maven 2.0.7
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [echo] Debug data
> [echo] basedir = E:\foo
> [echo] djobj = E:\obj
> [echo] project.build.sourceDirectory = E:\foo\src\main\java
> [echo] project.build.scriptSourceDirectory = src/main/scripts
> [echo] project.build.testSourceDirectory = E:\foo\src\test\java
> [echo] project.build.outputDirectory = E:\obj/test/classes
> [echo] project.build.testOutputDirectory = E:\obj/test/test-classes
> [echo] project.build.directory = E:\obj/test
> [INFO] Executed tasks
> Maven 2.0.8
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [echo] Debug data
> [echo] basedir = E:\foo
> [echo] djobj = E:\obj
> [echo] project.build.sourceDirectory = E:\foo\src\main\java
> [echo] project.build.scriptSourceDirectory = src/main/scripts
> [echo] project.build.testSourceDirectory = E:\foo\src\test\java
> [echo] project.build.outputDirectory = E:\obj/test/classes
> [echo] project.build.testOutputDirectory = E:\obj/test/test-classes
> [echo] project.build.directory = E:\obj/test
> [INFO] Executed tasks
> Maven 2.0.9
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [echo] Debug data
> [echo] basedir = E:\foo
> [echo] djobj = E:\obj
> [echo] project.build.sourceDirectory = E:\foo\src\main\java
> [echo] project.build.scriptSourceDirectory = src/main/scripts
> [echo] project.build.testSourceDirectory = E:\foo\src\test\java
> [echo] project.build.outputDirectory = E:\foo\E:\obj\test\classes
> [echo] project.build.testOutputDirectory = E:\foo\E:\obj\test\test-classes
> [echo] project.build.directory = E:\foo\E:\obj\test
> [INFO] Executed tasks
> Maven 2.0.10
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> [echo] Debug data
> [echo] basedir = E:\foo
> [echo] djobj = E:\obj
> [echo] project.build.sourceDirectory = E:\foo\src\main\java
> [echo] project.build.scriptSourceDirectory = src/main/scripts
> [echo] project.build.testSourceDirectory = E:\foo\src\test\java
> [echo] project.build.outputDirectory = E:\foo\E:\obj\test\classes
> [echo] project.build.testOutputDirectory = E:\foo\E:\obj\test\test-classes
> [echo] project.build.directory = E:\foo\E:\obj\test
> [INFO] Executed tasks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira