You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2019/07/06 16:39:00 UTC

[jira] [Closed] (MNG-6649) Duplicate class error in maven-compiler-plugin

     [ https://issues.apache.org/jira/browse/MNG-6649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov closed MNG-6649.
-------------------------------
    Resolution: Duplicate

The sample project passes with the PR for MNG-6700:

{noformat}
PS D:\Entwicklung\Projekte\repro> D:\Entwicklung\Programme\apache-maven-3.6.2-SNAPSHOT\bin\mvn.cmd package "-DtargetDirectory=C:\temp"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] XYZ                                                                [pom]
[INFO] dsl                                                                [jar]
[INFO]
[INFO] -------------------< com.microsoft.mavenerrors:XYZ >--------------------
[INFO] Building XYZ 6.19.0-private                                        [1/2]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] -------------------< com.microsoft.mavenerrors:dsl >--------------------
[INFO] Building dsl 6.19.0-private                                        [2/2]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ dsl ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\Entwicklung\Projekte\repro\Java\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ dsl ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\temp\classes
[WARNING] /D:/Entwicklung/Projekte/repro/Java/src/com/microsoft/mavenerrors/Tuple.java: D:\Entwicklung\Projekte\repro\Java\src\com\microsoft\mavenerrors\Tuple.java uses unchecked or unsafe operations.
[WARNING] /D:/Entwicklung/Projekte/repro/Java/src/com/microsoft/mavenerrors/Tuple.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ dsl ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\Entwicklung\Projekte\repro\Java\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ dsl ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ dsl ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ dsl ---
[INFO] Building jar: C:\temp\dsl-6.19.0-private.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for XYZ 6.19.0-private:
[INFO]
[INFO] XYZ ................................................ SUCCESS [  0.141 s]
[INFO] dsl ................................................ SUCCESS [  1.957 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.518 s
[INFO] Finished at: 2019-07-06T18:37:47+02:00
[INFO] ------------------------------------------------------------------------
PS D:\Entwicklung\Projekte\repro>
{noformat}

> Duplicate class error in maven-compiler-plugin
> ----------------------------------------------
>
>                 Key: MNG-6649
>                 URL: https://issues.apache.org/jira/browse/MNG-6649
>             Project: Maven
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.6.1
>         Environment: maven version 3.6.1
> OpenJDK8 installed using choco's zulu8 package.
>            Reporter: Kunal
>            Priority: Trivial
>         Attachments: repro.zip
>
>
> When trying to run `mvn package` the `maven-compiler-plugin` fails with maven 3.6.1 with below errors. It works with maven's 3.6.0.
> {noformat}
> [ERROR] <folder>/AccessStep.java:[12,8] duplicate class: com.microsoft.programSynthesis.wrangling.json.jPathStep.AccessStep
> [ERROR] -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project dsl: Compilation failure
>  at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
>  at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
>  at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
>  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
>  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
>  at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
>  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
>  at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>  at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>  at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>  at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
>  at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
>  at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>  at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke (Method.java:498)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
> Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
>  at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:858)
>  at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:129)
>  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
>  at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
>  at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
>  at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
>  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
>  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
>  at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
>  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
>  at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>  at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>  at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>  at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
>  at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
>  at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>  at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke (Method.java:498)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)