Maven MojoExecutionException

末鹿安然 提交于 2019-12-04 02:37:43
Jigar Joshi

set JAVA_HOME to jdk not to JDK_DIR/jre, See this question for how to set the value

If you're using Eclipse, go to Windows->Preferences. Under Java->Installed JREs, double click on the item in the list and make sure the JRE home points to a JDK (for example, set it to "C:\Program Files\Java\jdk1.7.0_60"), and leave everything else the same.

LOL. Take this scenario as well.

Your last server is UP (may be jetty). And You are deploying(copying same source),running the same app.

PORT CONFLICT

Verify that the name of the main class to execute in the application is specified in the pom.xml.

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <mainClass>com.enterprise.mainPacket.MainApp</mainClass>
</properties>

Also check if the .fxml file has been relocated, so that it correctly addresses the controller associated with it. fx:controller="com.enterprise.mainPacket.FXMLController"

<VBox fx:id="vBMasterContainer" prefHeight="698.0" prefWidth="800.0" styleClass="theme" stylesheets="@/styles/style.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.enterprise.mainPacket.FXMLController">

make sure that you don't have empty pakages within your sourcecode folder.If there are no any classes Same error will occur

Check that there are no conflict on the port (another service already running) !

I had the same error. i fixed the path to java, and was missing the tools jar. i copied it from another place. after that everything worked.

I changed the version in pom.xml to 1.2.1 and the error was resolved.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!