Netbeans Maven Plugin Error

Asked

Viewed 730 times

2

I am trying to run a project in netbeans and is giving the following error "org.codehaus.mojo:exec-Maven-plugin:1.2.1:exec". I searched for the error, and found the following solution: right-click > properties > actions > change actions that contain 1.2.1 to 1.6.0, but when doing so the error continues, now in version "org.codehaus.mojo:exec-Maven-plugin:1.6.0:exec".

Error log:

        cd C:\Users\Jess\Desktop\Mainline-master\Mainline-        
master\MainlineOshi\MainlineOshi; "JAVA_HOME=C:\\Program 
Files\\Java\\jdk1.8.0_181" cmd /c "\"\"C:\\Program Files\\NetBeans 
8.2\\java\\maven\\bin\\mvn.bat\" -Dexec.args=\"-classpath %classpath 
software.inicioLogin\" -Dexec.executable=\"C:\\Program 
Files\\Java\\jdk1.8.0_181\\bin\\java.exe\" - 
Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.2\\java\\maven- 
nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 org.codehaus.mojo:exec- 
maven-plugin:1.6.0:exec\""
Running NetBeans Compile On Save execution. Phase execution is skipped and 
output directories of dependency projects (with Compile on Save turned on) 
will be used instead of their jar artifacts.
Scanning for projects...

Some problems were encountered while building the effective model for 
com.mycompany:Mainline:jar:1.0-SNAPSHOT
'dependencies.dependency.(groupId:artifactId:type:classifier)' must be 
unique: com.microsoft.sqlserver:mssql-jdbc:jar -> version 7.0.0.jre10 vs 
6.4.0.jre8 @ line 37, column 21

It is highly recommended to fix these problems because they threaten the 
stability of your build.

For this reason, future Maven versions might no longer support building such 
malformed projects.


------------------------------------------------------------------------
Building Mainline 1.0-SNAPSHOT
------------------------------------------------------------------------
The POM for unknown.binary:AbsoluteLayout:jar:SNAPSHOT is missing, no 
dependency information available

--- exec-maven-plugin:1.6.0:exec (default-cli) @ Mainline ---
Erro: Não foi possível localizar nem carregar a classe principal 
software.inicioLogin
Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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:498)
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:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Error message:

------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 7.841s
Finished at: Thu Nov 15 20:06:22 BRST 2018
Final Memory: 6M/123M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (default- 
cli) on project Mainline: Command execution failed. Process exited with an 
error: 1 (Exit value: 1) -> [Help 1]

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

POM file:

        <?xml version="1.0" encoding="UTF-8"?>
        <project xmlns="http://maven.apache.org/POM/4.0.0"                 
        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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>Mainline</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<repositories>
    <repository>
        <id>unknown-jars-temp-repo</id>
        <name>A temporary repository created by NetBeans for libraries and jars it could not identify. Please replace the dependencies in this repository with correct ones and delete this repository.</name>
        <url>file:${project.basedir}/lib</url>
    </repository>
</repositories>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
    <!-- https://mvnrepository.com/artifact/com.github.oshi/oshi-core -->
    <dependency>
        <groupId>com.github.oshi</groupId>
        <artifactId>oshi-core</artifactId>
        <version>3.8.0</version>
    </dependency>
    <dependency>
        <groupId>unknown.binary</groupId>
        <artifactId>AbsoluteLayout</artifactId>
        <version>SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
        <version>7.0.0.jre10</version>
    </dependency>
    <dependency>
        <groupId>com.microsoft.sqlserver</groupId>
        <artifactId>mssql-jdbc</artifactId>
        <version>6.4.0.jre8</version>
    </dependency>
</dependencies>
</project>
  • update the question with your pom please

  • @Lucasmiranda edited question as requested.

  • has a Repository tag written 'A Temporary Repository created by ...' deletes it and tries to redact the build

  • @Lucasmiranda deleted the tag, ran again and gave the following error: "Failed to execute Goal on project Mainline: Could not resolve dependencies for project com.mycompany:Mainline:jar:1.0-SNAPSHOT: Could not find Artifact Unknown.Inary:Absolutelayout:jar:SNAPSHOT -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -runand switch. Re-run Maven using the -X switch to enable full debug logging."

  • change this dependency to <!-- https://mvnrepository.com/artifact/org.netbeans.external/AbsoluteLayout -> <dependency> <groupid>org.netbeans.External</groupid> <artifactId>Absolutelayout</artifactId> <version>RELEASE802</version> </dependency y y>

  • @Lucasmiranda noticed that you sent a dependency tag and we were talking about a Repository tag. When changing the Repospository to dependency was an error, are you sure you want to put it in the same place as Repospository? Or do I insert this dependency tag inside the existing dependencies in the POM file? I’m sorry for the questions, I’m a beginner in programming.

  • Good afternoon, Jessica, I was referring to the substitution of this dependency here <groupid>Unknown.Binary</groupid> <artifactId>Absolutelayout</artifactId> <version>SNAPSHOT</version>

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.