jopereira/minha

Maven build problems

Opened this issue · 3 comments

Hello all,

simply executing 'mvn package install' in my locally cloned minha root directory fails with the following message:

[ERROR] Failed to execute goal org.fusesource.hawtjni:maven-hawtjni-plugin:1.10:build (default) on project minha-native-timer: build failed: org.apache.maven.plugin.MojoExecutionException: Add a '-Dnative-src-url=file:...' to have maven download the native package -> [Help 1]

However i have no idea what location to specify in the '-Dnative-src-url=file:...' argument.

Debug stack trace...

Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.19.0-28-generic", arch: "amd64", family: "unix"

[...]

[INFO] --- maven-hawtjni-plugin:1.10:build (default) @ minha-native-timer ---
[DEBUG] Configuring mojo org.fusesource.hawtjni:maven-hawtjni-plugin:1.10:build from plugin realm ClassRealm[plugin>org.fusesource.hawtjni:maven-hawtjni-plugin:1.10, parent: sun.misc.Launcher$AppClassLoader@70dea4e]
[DEBUG] Configuring mojo 'org.fusesource.hawtjni:maven-hawtjni-plugin:1.10:build' with basic configurator -->
[DEBUG]   (f) buildDirectory = /home/user/projects/directory/minha/timer/target
[DEBUG]   (f) configureArgs = [LDFLAGS=-lrt]  
[DEBUG]   (f) downloadSourcePackage = true
[DEBUG]   (f) libDirectory = /home/user/projects/directory/minha/timer/target/generated-sources/hawtjni/lib
[DEBUG]   (f) localRepository =        id: local
      url: file:///home/user/.m2/repository/
   layout: none

[DEBUG]   (f) name = minha-native-timer
[DEBUG]   (f) packageDirectory = /home/user/projects/directory/minha/timer/target/generated-sources/hawtjni/native-package
[DEBUG]   (f) project = MavenProject: pt.minha:minha-native-timer:3.1-SNAPSHOT @ /home/user/projects/directory/minha/timer/pom.xml
[DEBUG]   (f) remoteArtifactRepositories = [       id: hawtjni.snapshot.fusesource.org
      url: http://hawtjni.fusesource.org/repo/snapshot
   layout: default
snapshots: [enabled => true, update => daily] 
 releases: [enabled => false, update => daily]
,        id: central
      url: http://repo.maven.apache.org/maven2
   layout: default
snapshots: [enabled => false, update => daily]
 releases: [enabled => true, update => daily] 
]
[DEBUG]   (f) sourceClassifier = native-src   
[DEBUG]   (f) windowsBuildTool = detect
[DEBUG] -- end configuration --
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Minha Platform .................................... SUCCESS [0.327s]
[INFO] Minha runtime library ............................. SUCCESS [3.908s]
[INFO] Native profiling timer for Minha .................. FAILURE [0.604s]
[INFO] Minha command line tools .......................... SKIPPED
[INFO] Minha examples .................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.988s
[INFO] Finished at: Mon Oct 05 16:27:44 CEST 2015
[INFO] Final Memory: 13M/215M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.fusesource.hawtjni:maven-hawtjni-plugin:1.10:build (default) on project minha-native-timer: build failed: org.apache.maven.plugin.MojoExecutionException: Add a '-Dnative-src-url=file:...' to have maven download the native package -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.fusesource.hawtjni:maven-hawtjni-plugin:1.10:build (default) on project minha-native-timer: build failed: org.apache.maven.plugin.MojoExecutionException: Add a '-Dnative-src-url=file:...' to have maven download the native package
        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: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:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: build failed: org.apache.maven.plugin.MojoExecutionException: Add a '-Dnative-src-url=file:...' to have maven download the native package
        at org.fusesource.hawtjni.maven.BuildMojo.execute(BuildMojo.java:254)
        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: org.apache.maven.plugin.MojoExecutionException: Add a '-Dnative-src-url=file:...' to have maven download the native package
        at org.fusesource.hawtjni.maven.BuildMojo.downloadNativeSourcePackage(BuildMojo.java:417)
        at org.fusesource.hawtjni.maven.BuildMojo.configureBasedBuild(BuildMojo.java:331)
        at org.fusesource.hawtjni.maven.BuildMojo.execute(BuildMojo.java:245)
        ... 21 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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :minha-native-timer 

Any help is much appreciated! Thanks!

The native timer component is not strictly necessary and Minha can be used as 100% Java. I've pushed a commit that, by default, does not build or use the native timer. It can still be used if it is compiled and added explicitly as a dependency.

Regarding the build problem itself, are you sure you have C/C++ de tools such such as gcc/automake/autoconf/.. available?

Without the native timer component the Maven build works like a charm. Thank you!

gcc, automake and autoconf were available. Is there any documentation which dependencies must be met, because i could not make any sense of the error message. If there is something alike i would really appreciate if you drop me a note. Thanks again!

I updated the pom to use the latest version of hawtjni. Can you check that it still happens? If yes, please attach full output.