Description of problem:
Trying to install a jar file to a location other than in %{_javadir}, like one using JNI, fails. The following spec line:
%mvn_file ":%{name}-common" %{_jnidir}/%{name}-common %{_datadir}/%{name}/common/%{name}-common
Produces:
[ERROR] Failed to execute goal org.fedoraproject.xmvn:xmvn-mojo:0.5.0:install (default-cli) on project hadoop-main: Execution default-cli of goal org.fedoraproject.xmvn:xmvn-mojo:0.5.0:install failed: 'other' is different type of Path -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.fedoraproject.xmvn:xmvn-mojo:0.5.0:install (default-cli) on project hadoop-main: Execution default-cli of goal org.fedoraproject.xmvn:xmvn-mojo:0.5.0:install failed: 'other' is different type of Path
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.fedoraproject.xmvn:xmvn-mojo:0.5.0:install failed: 'other' is different type of Path
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.IllegalArgumentException: 'other' is different type of Path
at sun.nio.fs.UnixPath.relativize(UnixPath.java:416)
at sun.nio.fs.UnixPath.relativize(UnixPath.java:43)
at org.fedoraproject.maven.installer.DefaultPackage.addJarFile(DefaultPackage.java:152)
at org.fedoraproject.maven.installer.JarInstaller.installProject(JarInstaller.java:76)
at org.fedoraproject.maven.rpminstall.plugin.InstallMojo.installProject(InstallMojo.java:87)
at org.fedoraproject.maven.rpminstall.plugin.InstallMojo.execute(InstallMojo.java:167)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Version-Release number of selected component (if applicable):
xmvn-0.5.0-5.fc19.noarch
How reproducible:
100%
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:

Thank you for the report.
Until the bug is fixed you can use the following workaround:
1) disable automatic artifact installation with %mav_package:
% mvn_package :%{name}-common __noinstall
2) Install the artifact manually (JAR and POM)
3) Install Maven depmap using %add_maven_depmap macro.

I believe that this bug is fixed in javapackages-tools-3.3.1-1,
which is available in Fedora 20, so I am closing this bug now.
The build containing the fix can be found at Koji:
http://koji.fedoraproject.org/koji/buildinfo?buildID=469209
This bug was fixed in the next release of Fedora, and is not planned
to be fixed in the release it was filed against. If you want this bug
to be fixed in updates for Fedora 19, please say so in a comment.
Otherwise you can update to the newer release of Fedora to get the fix.

Note

You need to
log in
before you can comment on or make changes to this bug.