maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clément Agarini (JIRA) <j...@codehaus.org>
Subject [jira] (MPLUGIN-272) Descriptor goal fail with java 8 and interface with default method
Date Tue, 05 Aug 2014 06:36:10 GMT
Clément Agarini created MPLUGIN-272:
---------------------------------------

             Summary: Descriptor goal fail with java 8 and interface with default method
                 Key: MPLUGIN-272
                 URL: https://jira.codehaus.org/browse/MPLUGIN-272
             Project: Maven Plugin Tools
          Issue Type: Bug
          Components: Plugin Plugin
    Affects Versions: 3.3
         Environment: windows 7 64 bits, Oracle JDK 8, maven 3.0.4
            Reporter: Clément Agarini


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 the attached zip file.

Just run "mvn install".

Thanks in advance,

Clément



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message