Running WINDOWS 7 but ran into same problem on Ubuntu 14.0.4
Very possible given my limited experience with these sorts of things that I am doing something very wrong.
I was trying to build the LibUSB directory using the suggestion of running mvn install from the /libusb/ directory, but it didn't work. I downloaded the LibUSB latest GIT from https://github.com/libusb/libusb and placed it in the javax-usb-libusb1-master/libusb-git folder, and then changed over to the javax-usb-libusb1-master/libusb directory and ran mvn install.
Before when I tried this I received a great deal of information about things being downloaded and ultimately ended up in failure.
This time when I tried it after having GITten the latest LibUSB build and placed it into the libusb-git directory, there was less information, but it still ended with the same error:
Y:\Development Tools\Java\javax-usb-libusb1-master\libusb>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethrea
ded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Javalibusb1 :: libusb 1.0.1-1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ libusb ---
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "libusb.home" is required for this build.
[WARNING] Rule 2: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "libusb.cflags" is required for this build.
[WARNING] Rule 3: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "libusb.configure.args" is required for this build.
[WARNING] Rule 4: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "nar.optionSet.c" is required for this build.
[WARNING] Rule 5: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "nar.optionSet.linker" is required for this build.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.302 s
[INFO] Finished at: 2014-06-06T10:51:48-06:00
[INFO] Final Memory: 7M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.
0:enforce (enforce-maven) on project libusb: Some Enforcer rules have failed. Lo
ok above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
What am I doing wrong? Am I even doing anything wrong? If not, how can I resolve this issue, or is it even something that I can resolve?
EDIT: Okay so I was informed a bit about profiles and added the following to the Maven Settings.xml file in the /conf folder:
<activeProfiles>
<activeProfile>amd64-Win7</activeProfile>
</activeProfiles>
and the following to the pom.xml file in the /libusb directory:
<profile>
<id>amd64-Win7</id>
<activation>
<os>
<name>Windows 7</name>
<arch>amd64</arch>
</os>
</activation>
<properties>
<nar.optionSet.c>-Wall -Wno-long-long -Wpointer-arith -fPIC -g -m64 </nar.optionSet.c>
<nar.optionSet.linker>-m64 -lrt</nar.optionSet.linker>
<libusb.configure.args/>
<libusb.cflags>-m64</libusb.cflags>
<libusb.home>${usr.home}/opt/libusb-git</libusb.home>
</properties>
</profile>
Now I am getting this message:
Y:\Development Tools\Java\javax-usb-libusb1-master\libusb>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethrea
ded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Javalibusb1 :: libusb 1.0.1-1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ libusb ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (default) @ libusb ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ libusb ---
[INFO] Installing Y:\Development Tools\Java\javax-usb-libusb1-master\libusb\pom.
xml to C:\Users\Will\.m2\repository\io\trygvis\usb\libusb\1.0.1-1-SNAPSHOT\libus
b-1.0.1-1-SNAPSHOT.pom
[INFO]
[INFO] --- exec-maven-plugin:1.2:exec (libusb-autogen) @ libusb ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.636 s
[INFO] Finished at: 2014-06-06T16:52:48-06:00
[INFO] Final Memory: 8M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (lib
usb-autogen) on project libusb: Command execution failed. Cannot run program "ba
sh" (in directory "Y:\Development Tools\Java\javax-usb-libusb1-master\libusb-git
"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
I'm pretty sure I populated the LibUsb.Home property with something wrong. What should I put in there?