maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MPMD-58) sourceEncoding honoured with pmd but not cpd
Date Wed, 02 Jan 2008 20:54:58 GMT

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

Dennis Lundberg closed MPMD-58.
-------------------------------

         Assignee: Dennis Lundberg
       Resolution: Fixed
    Fix Version/s: 2.3

Thanks for testing.

> sourceEncoding honoured with pmd but not cpd
> --------------------------------------------
>
>                 Key: MPMD-58
>                 URL: http://jira.codehaus.org/browse/MPMD-58
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: CPD
>    Affects Versions: 2.2
>         Environment: Linux,
> LC_LANG=en
> LC_ALL=POSIX
>            Reporter: M. Rohrmoser
>            Assignee: Dennis Lundberg
>             Fix For: 2.3
>
>         Attachments: MPMD-58.zip, MPMD-58_sourceEncoding.txt
>
>
> If the source (*.java) contains non-Ascii Characters, e.g. in field names, pmd:check
works fine but pmd:cpd-check fails with the stacktrace
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: An error has occurred in CPD
Report report generation.
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:898)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:734)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:505)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in CPD
Report report generation.
>         at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:79)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 19 more
> Caused by: net.sourceforge.pmd.ast.TokenMgrError: Lexical error at line 32, column 33.
 Encountered: "\ufffd" (65533), after : ""
>         at net.sourceforge.pmd.ast.JavaParserTokenManager.getNextToken(JavaParserTokenManager.java:2037)
>         at net.sourceforge.pmd.cpd.JavaTokenizer.tokenize(JavaTokenizer.java:69)
>         at net.sourceforge.pmd.cpd.CPD.add(CPD.java:97)
>         at net.sourceforge.pmd.cpd.CPD.add(CPD.java:50)
>         at org.apache.maven.plugin.pmd.CpdReport.executeReport(CpdReport.java:102)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
>         at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:73)
>         ... 21 more
> The pom is:
> <project>
> ...
> 	<reporting>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-pmd-plugin</artifactId>
> 				<configuration>
> 					<verbose>true</verbose>
> 					<linkXref>true</linkXref>
> 					<sourceEncoding>utf-8</sourceEncoding>
> 					<minimumTokens>100</minimumTokens>
> 					<targetJdk>1.5</targetJdk>
> 					<excludes>
> 					</excludes>
> 				</configuration>
> 			</plugin>
> 		</plugins>
> 	</reporting>
> ...
> </project>

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