maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clement Agarini2 <clement.agar...@fr.ibm.com>
Subject [MPLUGIN] descriptor goal fail with java 8 and interface with default method
Date Mon, 04 Aug 2014 06:36:30 GMT
Hi all,

I'm sorry to post here but I can't find a way to create an account on your 
issue tracking system. I get in the same trouble that is described here: 
https://jira.codehaus.org/browse/HAUS-2323

It seemed that the descriptor goal of "maven-plugin-plugin" version 3.3 is 
failing with java 8 and an interface with a default method, here are the 
information regarding my system:

Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: D:\Users\clement.agarini\My Documents\apache-maven-3.0.4
Java version: 1.8.0_05, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_05\jre
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"


And here is the stack trace:

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor 
(default-descriptor) on project test-plugin: Execution default-descriptor 
of goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor 
failed: syntax error @[12,1] in 
file:/C:/Users/clement.agarini/git/test-plugin/src/main/java/fr/ca/TestInterface.java 
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor 
(default-descriptor) on project test-plugin: Execution default-descriptor 
of goal org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor 
failed: syntax error @[12,1] in 
file:/C:/Users/IBM_ADMIN/git/test-plugin/src/main/java/fr/ca/TestInterface.java
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
        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)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
        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 
com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
default-descriptor of goal 
org.apache.maven.plugins:maven-plugin-plugin:3.3:descriptor failed: syntax 
error @[12,1] in 
file:/C:/Users/IBM_ADMIN/git/test-plugin/src/main/java/fr/ca/TestInterface.java
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 25 more
Caused by: com.thoughtworks.qdox.parser.ParseException: syntax error 
@[12,1] in 
file:/C:/Users/IBM_ADMIN/git/test-plugin/src/main/java/fr/ca/TestInterface.java
        at 
com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:1018)
        at 
com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1324)
        at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
        at 
com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
        at 
com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:388)
        at 
com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:384)
        at 
com.thoughtworks.qdox.JavaDocBuilder$2.visitFile(JavaDocBuilder.java:474)
        at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:43)
        at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
        at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
        at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
        at 
com.thoughtworks.qdox.directorywalker.DirectoryScanner.scan(DirectoryScanner.java:52)
        at 
com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.java:471)
        at 
com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.java:460)
        at 
org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractor.discoverClasses(JavaMojoDescriptorExtractor.java:713)
        at 
org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractor.execute(JavaMojoDescriptorExtractor.java:676)
        at 
org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:96)
        at 
org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:243)
        at 
org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:90)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        ... 26 more


I tried to remove this default method in "TestInterface" and use a method 
without implementation and it worked properly.


So, How to reproduce:

Download an use an Oracle JDK8.

Download this project here: http://clement-agarini.fr/test-plugin.zip

Just run "mvn install".

Thanks in advance,

Clément
Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 655.732.332,20 ?
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message