How to run Maven project in Eclipse by importing it from github

288 Views Asked by At

I am new to Java and maven I just need to run this https://github.com/att/XACML Maven project.

Any one please give me some guidelines as If I build this in Eclipse I get these errors.
I need to install gpg software as I don't know much about gpg, because I am new to this.

[INFO] --- maven-failsafe-plugin:2.19.1:verify (integration-tests) @ att-xacml ---
[INFO] 
[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ att-xacml ---
'gpg.exe' is not recognized as an internal or external command,
operable program or batch file.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] ATT XACML 2.0.0-SNAPSHOT ........................... FAILURE [ 19.653 s]
[INFO] att-xacml .......................................... SKIPPED
[INFO] att-xacml-pip ...................................... SKIPPED
[INFO] att-xacml-pdp ...................................... SKIPPED
[INFO] xacml-test ......................................... SKIPPED
[INFO] xacml-rest ......................................... SKIPPED
[INFO] xacml-pdp-rest ..................................... SKIPPED
[INFO] xacml-pap-rest ..................................... SKIPPED
[INFO] xacml-pap-admin 2.0.0-SNAPSHOT ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:54 min 

Once that will work, I will need to know how to run:

mvn jetty:run-war
1

There are 1 best solutions below

5
VonC On BEST ANSWER

The part of the error message that matters is just above what you posted.
See for instance att/XACML issue 30:

[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ att-xacml ---
gpg: signing failed: Inappropriate ioctl for device
gpg: signing failed: Inappropriate ioctl for device
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ATT XACML .......................................... FAILURE [  2.712 s]

That error was resolved with a Java update, so double-check which Java you are using in your Eclipse.


In the OP's case, the error is:

'gpg.exe' is not recognized as an internal or external command,
operable program or batch file.

That simply means you need to launch Eclipse from a CMD session where gpg.exe is recognized:

gpg.exe --version
gpg (GnuPG) 2.0.29 (Gpg4win 2.3.0)

Check your %PATH% in the CMD:

set PATH

And adjust it accordingly:

set PATH=C:\path\to\gpg;%PATH%

Then launch Eclipse, and in it maven.


The OP adds:

how I am able to access the console of local host?
Like where I can run this command (mvn jetty:run-war) and how.

See "Is there any tool in eclipse to run maven commands directly?": assuming you have m2e (M2Eclipse) already installed with you Eclipse, you will be able to define a maven "run configuration".

See more in "Sonatype: Developing with Eclipse and Maven / 4.2. Running Maven Builds".

https://books.sonatype.com/m2eclipse-book/reference/figs/web/running_run-config.png

For mvn jetty:run specifically, see "how to run a web service maven project on jetty 8 from eclipse?".