Home > Back-end >  Has been an error while running maven project org. Codehaus. Mojo: exec - maven - plugin: 1.2.1 prob
Has been an error while running maven project org. Codehaus. Mojo: exec - maven - plugin: 1.2.1 prob

Time:11-07

Actually not tried how to use maven, download today after a project has been learning how to run the maven project, this problem has appeared for a long time can not solve, hope someone can help me,
An error is as follows:

Scanning for the projects...

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Building 1.0 the SNAPSHOT arp
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

The exec - maven plugin: 1.2.1: exec (default - cli) @ arp -- -- --
Java. Lang. NoClassDefFoundError: jpcap/packet/DatalinkPacket
The at Java. Lang. Class. GetDeclaredMethods0 (Native Method)
The at Java. Lang. Class. PrivateGetDeclaredMethods (Class. Java: 2701)
The at Java. Lang. Class. PrivateGetMethodRecursive (Class. Java: 3048)
The at Java. Lang. Class. GetMethod0 (Class. Java: 3018)
The at Java. Lang. Class. GetMethod (Class. Java: 1784)
At the sun. The launcher. LauncherHelper. ValidateMainClass (LauncherHelper. Java: 544)
At the sun. The launcher. LauncherHelper. CheckAndLoadMain (LauncherHelper. Java: 526)
Under Caused by: Java. Lang. ClassNotFoundException: jpcap. Packet. DatalinkPacket
The at java.net.URLClassLoader.findClass URLClassLoader. Java: (381)
The at Java. Lang. This. LoadClass (424). This Java:
At sun. Misc. The Launcher $AppClassLoader. LoadClass (338). The Launcher Java:
The at Java. Lang. This. LoadClass (357). This Java:
. 7 more
Error: A JNI Error has occurred, both please check your installation and the try again
The Exception in the thread "main"
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The BUILD FAILURE
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Total time: 1.252 s
Finished at: Sat Dec 08 15:31:24 CST 2018
Final Memory: 5 m/123 m
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Failed to execute goal org. Codehaus. Mojo: exec -- maven plugin: 1.2.1: exec (default - cli) on project arp: Command execution Failed. The Process exited with an error: 1 (Exit value: 1) - & gt; [1] Help

To see the full stack trace of the errors, re - run Maven have the -e switch.
Re - run Maven using the -x switch to enable full debug logging.

For more information about the errors and possible solutions, both please read the following articles:
[1] Help http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Then my POM. XML is
 & lt; ? The XML version="1.0" encoding="utf-8"?> 

XMLNS: xsi="http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" & gt;
4.0.0 & lt;/modelVersion>


Me. Codz
Arp
1.0 - SNAPSHOT




Jpcap
Jpcap
1.0 - SNAPSHOT
System
${pom. Basedir}/jars/jpcap. Jar


Org, apache maven. Plugins
Maven - compiler - plugin
2.3.2 & lt;/version>










Org, apache maven. Plugins
Maven - compiler - plugin
2.3.2 & lt;/version>


1.8 & lt;/source>
1.8 & lt;/target>
Utf-8 & lt;/encoding>








There is a problem is I don't have here org. Codehaus. Mojo the plugin ah why always suggest its mistake?

CodePudding user response:

Because you add these dependence, dependence and rely on this didn't rely on
  • Related