maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Updated: (MPMD-61) When running build using "-f <path_to_pom>/pom.xml" the site is stored in working directory instead of project directory
Date Mon, 07 Jan 2008 21:35:58 GMT

     [ http://jira.codehaus.org/browse/MPMD-61?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benjamin Bentmann updated MPMD-61:
----------------------------------

    Attachment: output-directory.patch

Actually, the issue is caused by the plugin's incorrect handling of relative paths. Relatives
paths are resolved against the current working directory by java.io.File but we expect them
to be resolved against the project's base directory.

In plain words, somebody must explicitly resolve the path against the intended directory since
java.io.File will not do the job. Fortunately, Maven can do this for the plugin IF it declares
its path parameters to be of type java.io.File instead of java.lang.String (see also MNG-3273).

Compare the value of "outputDirectory" in these debug logs. Before the path:
{noformat}
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-pmd-plugin:2.4-SNAPSHOT:pmd' -->
[DEBUG]   (f) aggregate = false
[DEBUG]   (f) compileSourceRoots = [M:\maven\z\javacc\src\main\java]
[DEBUG]   (f) format = xml
[DEBUG]   (f) includeTests = false
[DEBUG]   (f) linkXRef = true
[DEBUG]   (f) minimumPriority = 5
[DEBUG]   (f) outputDirectory = target/site
[DEBUG]   (f) project = MavenProject: de.test:javacc:1.0 @ M:\maven\z\javacc\pom.xml
[DEBUG]   (f) reactorProjects = [MavenProject: de.test:javacc:1.0 @ M:\maven\z\javacc\pom.xml]
[DEBUG]   (f) skip = false
[DEBUG]   (f) targetDirectory = M:\maven\z\javacc\target
[DEBUG]   (f) testSourceRoots = [M:\maven\z\javacc\src\test\java]
[DEBUG]   (f) xrefLocation = M:\maven\z\javacc\target\site\xref
[DEBUG]   (f) xrefTestLocation = M:\maven\z\javacc\target\site\xref-test
[DEBUG] -- end configuration --
{noformat}
and after the patch:
{noformat}
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-pmd-plugin:2.4-SNAPSHOT:pmd' -->
[DEBUG]   (f) aggregate = false
[DEBUG]   (f) compileSourceRoots = [M:\maven\z\javacc\src\main\java]
[DEBUG]   (f) format = xml
[DEBUG]   (f) includeTests = false
[DEBUG]   (f) linkXRef = true
[DEBUG]   (f) minimumPriority = 5
[DEBUG]   (f) outputDirectory = M:\maven\z\javacc\target\site
[DEBUG]   (f) project = MavenProject: de.test:javacc:1.0 @ M:\maven\z\javacc\pom.xml
[DEBUG]   (f) reactorProjects = [MavenProject: de.test:javacc:1.0 @ M:\maven\z\javacc\pom.xml]
[DEBUG]   (f) skip = false
[DEBUG]   (f) targetDirectory = M:\maven\z\javacc\target
[DEBUG]   (f) testSourceRoots = [M:\maven\z\javacc\src\test\java]
[DEBUG]   (f) xrefLocation = M:\maven\z\javacc\target\site\xref
[DEBUG]   (f) xrefTestLocation = M:\maven\z\javacc\target\site\xref-test
[DEBUG] -- end configuration --
{noformat}

> When running build using "-f <path_to_pom>/pom.xml" the site is stored in working
directory instead of project directory
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MPMD-61
>                 URL: http://jira.codehaus.org/browse/MPMD-61
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.2
>         Environment: Windows XP, Java 1.5, Maven 2.0.7
>            Reporter: Peter Hayes
>         Attachments: output-directory.patch, pmd-multi-module.zip
>
>
> I setup a multi-module build and included the pmd check goal to run during the verify
phase.  When I execute a build from the top level directory specifying -f <path>/pom.xml,
the plugin creates a target/site/... directory in the current working directory.  This directory
should be in the project directory and now fails to clean.
> I have attached a sample project.  To reproduce :
> cd pmd-multi-module
> mvn -f ./root/pom.xml install
> Note that after the build there is a target directory in the current working directory
with the pmd.html and other files within it.

-- 
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

        

Mime
View raw message