Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scanDependenciesForBindings fails on dependency of type pom #194

Closed
jpraet opened this issue Jun 10, 2020 · 3 comments · Fixed by #288
Closed

scanDependenciesForBindings fails on dependency of type pom #194

jpraet opened this issue Jun 10, 2020 · 3 comments · Fixed by #288
Assignees

Comments

@jpraet
Copy link

jpraet commented Jun 10, 2020

org.apache.maven.plugin.MojoExecutionException: Unable to read the artifact JAR file [D:\mvn_repo\org\jboss\spec\jboss-jakartaee-8.0\1.0.1.Final\jboss-jakartaee-8.0-1.0.1.Final.pom].

[ERROR] Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.14.0:generate (Config) on project ssh-gui-report: Unable to read the artifact JAR file [D:\mvn_repo\org\jboss\spec\jboss-jakartaee-8.0\1.0.1.Final\jboss-jakartaee-8.0-1.0.1.Final.pom].: zip END header not found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.14.0:generate (Config) on project ssh-gui-report: Unable to read the artifact JAR file [D:\mvn_repo\org\jboss\spec\jboss-jakartaee-8.0\1.0.1.Final\jboss-jakartaee-8.0-1.0.1.Final.pom].
    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:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    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.MojoExecutionException: Unable to read the artifact JAR file [D:\mvn_repo\org\jboss\spec\jboss-jakartaee-8.0\1.0.1.Final\jboss-jakartaee-8.0-1.0.1.Final.pom].
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.collectBindingUrisFromDependencies (RawXJC2Mojo.java:833)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.createBindingURIs (RawXJC2Mojo.java:270)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.setupBindings (RawXJC2Mojo.java:227)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.doExecute (RawXJC2Mojo.java:437)
    at org.jvnet.jaxb2.maven2.RawXJC2Mojo.execute (RawXJC2Mojo.java:320)

Because I have this dependency in my project:

		<dependency>
			<groupId>org.jboss.spec</groupId>
			<artifactId>jboss-jakartaee-8.0</artifactId>
			<type>pom</type>
			<scope>provided</scope>
		</dependency>
@highsource
Copy link
Owner

scanDependenciesForBindings only works with JARs.

@jpraet
Copy link
Author

jpraet commented Jun 10, 2020

Yes, my binding files are in a JAR, but the plugin fails because my project also has non-JAR dependencies. I think the plugin should ignore those.

@highsource
Copy link
Owner

Ok, sounds reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants