SCR Plugin requires installed .jar files for metadata extraction
----------------------------------------------------------------
Key: FELIX-3223
URL: https://issues.apache.org/jira/browse/FELIX-3223
Project: Felix
Issue Type: Bug
Components: Maven SCR Plugin
Affects Versions: maven-scr-plugin-1.7.2
Reporter: Mark Derricutt
Priority: Minor
I was just diagnosing a strange build problem for a coworker and traced it down
to a combination of us doing a release yesterday, and the developer in question
running "mvn clean test" rather than "clean install" which the rest of us do.
It looks like the plugin attempts to resolve and open an installed JAR file for
dependencies, rather than - in the case of a reactor build that this was, read
from the target/classes directory of the artifact.
I don't know if Maven provides support for automating this at all, but the
failure could be a bit more graceful, and inform the user that they need to
install dependent artifacts.
{code}
[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.0.8:scr
(generate-scr-scrdescriptor) on project smx3.schema.provider: Unable to get
manifest from artifact smx3:smx3.api:jar:4.1.35-SNAPSHOT:compile: error in
opening zip file -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.felix:maven-scr-plugin:1.0.8:scr (generate-scr-scrdescriptor) on
project smx3.schema.provider: Unable to get manifest from artifact
smx3:smx3.api:jar:4.1.35-SNAPSHOT:compile
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:319)
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:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to get
manifest from artifact smx3:smx3.api:jar:4.1.35-SNAPSHOT:compile
at
org.apache.felix.scrplugin.tags.JavaClassDescriptorManager.<init>(JavaClassDescriptorManager.java:171)
at
org.apache.felix.scrplugin.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:106)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:99)
at
org.apache.felix.scrplugin.tags.JavaClassDescriptorManager.getManifest(JavaClassDescriptorManager.java:287)
at
org.apache.felix.scrplugin.tags.JavaClassDescriptorManager.<init>(JavaClassDescriptorManager.java:151)
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira