You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jeff Hodges (JIRA)" <ji...@apache.org> on 2015/07/12 21:39:05 UTC

[jira] [Commented] (MCOMPILER-236) Compilation error due to MCOMPILER-157 in deploy phase

    [ https://issues.apache.org/jira/browse/MCOMPILER-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14623968#comment-14623968 ] 

Jeff Hodges commented on MCOMPILER-236:
---------------------------------------

Just to inform folks: setting useIncrementalCompilation will turn *on* maven's incremental compilation, not turn it off. And the incremental compile code has a history of not being smart enough to do what you want (plus hurts folks who want to use forked builds). 

The documentation is not clear about this boolean and you have to go digging through the code for that information. See [this code|https://svn.apache.org/viewvc/maven/plugins/tags/maven-compiler-plugin-3.3/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java?revision=1668695&view=markup#l674] and the [stale sources calculation|https://svn.apache.org/viewvc/maven/plugins/tags/maven-compiler-plugin-3.3/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java?revision=1668695&view=markup#l714] that seems to be what's in maven 3.3.


> Compilation error due to MCOMPILER-157 in deploy phase
> ------------------------------------------------------
>
>                 Key: MCOMPILER-236
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-236
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.2
>         Environment: Maven 3.2.3, Java 1.8.0_25
>            Reporter: Federico Gaule
>         Attachments: example_prj.tar.gz
>
>
> After upgrading from 3.1 to 3.2 i'm experiencing compilation errors when running deploy phase.
> It's a mult module project where plugin is configured in master pom:
> {code:xml}
> <plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-compiler-plugin</artifactId>
> 				<version>3.1</version>
> 				<configuration>
> 					<source>${compiler.version}</source>
> 					<target>${compiler.version}</target>
> 					<encoding>UTF-8</encoding>
> 					<!-- -parameter: used to retrieve parameter names in runtime. i.e get parameter names for api validations -->
> 					<compilerArgument>-parameters</compilerArgument>
> 				</configuration>
> 			</plugin>
> {code}
> And in one of the modules like this:
> {code:xml}
>  				<plugin>
> 					<groupId>org.apache.maven.plugins</groupId>
> 					<artifactId>maven-compiler-plugin</artifactId>
> 					<configuration>
> 						<annotationProcessors>
> 							<!-- JPAMetaModelEntityProcessor is an annotation processor based on JSR_269 with the task of creating JPA 2 static metamodel classes -->
> 							<annotationProcessor>
> 								org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor
> 							</annotationProcessor>
> 						</annotationProcessors>
> 					</configuration>
> 				</plugin>
> {code}
> Common builds are all ok, but when using deploy phase i got a compiler error
> {noformat}
> An exception has occurred in the compiler (1.8.0_25). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
> java.lang.IllegalStateException: endPosTable already set
> 	at com.sun.tools.javac.util.DiagnosticSource.setEndPosTable(DiagnosticSource.java:136)
> 	at com.sun.tools.javac.util.Log.setEndPosTable(Log.java:350)
> 	at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:667)
> 	at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
> 	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.<init>(JavacProcessingEnvironment.java:892)
> 	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.next(JavacProcessingEnvironment.java:921)
> 	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1187)
> 	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
> 	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
> 	at com.sun.tools.javac.main.Main.compile(Main.java:523)
> 	at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
> 	at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
> 	at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:125)
> 	at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
> 	at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:823)
> 	at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
> 	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:483)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> {noformat}
> Here's the full maven -X log.
> http://cryptb.in/Vz9#f956618b3adf70be3133d996ece36db9
> In case you need more information, just let me know



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)