You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sharmarke Aden (JIRA)" <ji...@codehaus.org> on 2006/07/06 23:03:22 UTC
[jira] Created: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
PMD Reports Not Generated for Projects Using POM Packaging
-----------------------------------------------------------
Key: MPMD-36
URL: http://jira.codehaus.org/browse/MPMD-36
Project: Maven 2.x Pmd Plugin
Type: Bug
Versions: 2.0
Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
Reporter: Sharmarke Aden
My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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] Commented: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Sharmarke Aden (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=comments#action_69136 ]
Sharmarke Aden commented on MPMD-36:
------------------------------------
Sorry, "<packaging>jar</packaging>" in the bug description should be "<packaging>pom</packaging>"
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
> Attachments: modulePOM.xml, parentPOM.xml
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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] Updated: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Sharmarke Aden (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=all ]
Sharmarke Aden updated MPMD-36:
-------------------------------
Attachment: parentPOM.xml
modulePOM.xml
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
> Attachments: modulePOM.xml, parentPOM.xml
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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] Commented: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Sharmarke Aden (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=comments#action_69143 ]
Sharmarke Aden commented on MPMD-36:
------------------------------------
I have no control over directory structures if I use jar packaging. My project has to have the following directory structure:
-> bin (directory)
-> server
-> lib (directory)
-> conf (directory)
-> config-templates (directory)
-> app.config
-> log4j.properties
-> web (directory)
-> WEB-INF
-> classes
-> [logs] (directory)
-> start.sh
I delved into the pmd plugin code in svn and it seems that the "canGenerateReport()" method in the AbstractPmdReport class returns false. The artifactHandler.getLanguage() call appears to return "none" which stops the plugin from further execution since the plugin requires that it return "java" to continue.
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
> Assignee: Mike Perham
> Attachments: modulePOM.xml, parentPOM.xml
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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] Updated: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Sharmarke Aden (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=all ]
Sharmarke Aden updated MPMD-36:
-------------------------------
Attachment: pmd-plugin_MPMD36.patch
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
> Assignee: Mike Perham
> Attachments: modulePOM.xml, parentPOM.xml, pmd-plugin_MPMD36.patch
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Mike Perham (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=all ]
Mike Perham closed MPMD-36:
---------------------------
Resolution: Won't Fix
This is as designed. Please configure the war plugin to build your war project through the normal lifecycle and PMD will work also.
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
> Assignee: Mike Perham
> Attachments: modulePOM.xml, parentPOM.xml, pmd-plugin_MPMD36.patch
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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] Commented: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Mike Perham (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=comments#action_69141 ]
Mike Perham commented on MPMD-36:
---------------------------------
So what's stopping you from using jar packaging?
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
> Attachments: modulePOM.xml, parentPOM.xml
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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] Commented: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Mike Perham (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=comments#action_69146 ]
Mike Perham commented on MPMD-36:
---------------------------------
I still don't understand why Maven can't handle this already. Are you saying the source needs to be compiled to web/WEB-INF/classes? Why can't you use war packaging with a custom directory configuration? The correct answer is not to hack the PMD plugin but rather try to get the war plugin to support your directory structure because your project is not a POM project - it is a war project.
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
> Assignee: Mike Perham
> Attachments: modulePOM.xml, parentPOM.xml, pmd-plugin_MPMD36.patch
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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] Commented: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Sharmarke Aden (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=comments#action_69247 ]
Sharmarke Aden commented on MPMD-36:
------------------------------------
In response to Mike Perham comments:
Are you guys familiar with the assembly plugin (http://maven.apache.org/plugins/maven-assembly-plugin/introduction.html)? It provides an alternative way of package an application and as it stands you can't use the PMD plugin in conjunction with the assembly plugin. I believe this is an issue the PMD plugin needs to deal with. My application is packaged in fashion similar to the how Jetty is packaged (http://prdownloads.sourceforge.net/jetty/jetty-5.1.10.zip?download) . Look at their directory structure and try using war packaging to create that sort of directory structure.
In response to Brett Porter comment:
My patch also insures that the project has a source directory defined before proceeding. The patch basically allows the PMD continue if the follow condition is met:
((java || pom) && has source)
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
> Assignee: Mike Perham
> Attachments: modulePOM.xml, parentPOM.xml, pmd-plugin_MPMD36.patch
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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] Commented: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=comments#action_69163 ]
Brett Porter commented on MPMD-36:
----------------------------------
this patch should absolutely not be applied as it will break real pom projects, where there are no sources and the report should be ignored.
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
> Assignee: Mike Perham
> Attachments: modulePOM.xml, parentPOM.xml, pmd-plugin_MPMD36.patch
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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] Commented: (MPMD-36) PMD Reports Not Generated for Projects
Using POM Packaging
Posted by "Mike Perham (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MPMD-36?page=comments#action_69129 ]
Mike Perham commented on MPMD-36:
---------------------------------
Typically only war and jar projects have source which PMD can scan. I don't understand your problem. If you are using POM packaging you should have <packaging>pom</packaging>. Are you saying you have that *and* your project has source in src/main/java? Please attach your POM if possible.
> PMD Reports Not Generated for Projects Using POM Packaging
> -----------------------------------------------------------
>
> Key: MPMD-36
> URL: http://jira.codehaus.org/browse/MPMD-36
> Project: Maven 2.x Pmd Plugin
> Type: Bug
> Versions: 2.0
> Environment: WinXP SP2, Pentium 4, Cygwin, Maven 2.0.4
> Reporter: Sharmarke Aden
>
>
> My project uses the assembly plugin and thus uses pom based packaging: <packaging>jar</packaging>
> It seems that the PMD plugin only creates reports for projects utilizing archive based packaging such as jar and war but not for projects using pom based packaging.
--
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