2016-08-02 15 views
0

私はJavaFX 8アプリケーションを以下のファイルを使ってpom.xmlパッケージにしています。私は、NetBeansを介して実行すると、私はエラー、次の取得:Javafx Maven Pluginゴール実行に失敗しました

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project CoperativeERP: The parameters 'executable' for goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec are missing or invalid -> [Help 1]

<?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>re.iprocu</groupId> 
<artifactId>CoperativeERP</artifactId> 
<version>1.0-SNAPSHOT</version> 
<packaging>jar</packaging> 

<name>CoperativeERP</name> 

<properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <mainClass>re.iprocu.coperativeerp.MainApp</mainClass> 
    <maven.compiler.source>1.8</maven.compiler.source> 
    <maven.compiler.target>1.8</maven.compiler.target> 
</properties> 

<organization> 
    <!-- Used as the 'Vendor' for JNLP generation --> 
    <name>Your Organisation</name> 
</organization> 
<dependencies> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-api</artifactId> 
     <version>1.7.21</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.commons</groupId> 
     <artifactId>commons-lang3</artifactId> 
     <version>3.4</version> 
    </dependency> 
</dependencies> 
<build> 
    <plugins> 
     <plugin> 
       <groupId>com.zenjava</groupId> 
       <artifactId>javafx-maven-plugin</artifactId> 
       <version>8.1.4</version> 
       <configuration> 
         <mainClass></mainClass> 
       </configuration> 
       <executions> 
         <execution> 
           <id>create-jfxjar</id> 
           <phase>package</phase> 
           <goals> 
             <goal>build-jar</goal> 
           </goals> 
         </execution> 
       </executions> 
     </plugin> 
    </plugins> 
</build> 

私はnetbean IDE 8.1でjdk 1.8.0_77を使用しています。

私はMavenのために、新規およびJavaFXのパッケージです、そうで

答えて

0

ルックを使用すると理解しやすいexpection何か午前:それが空である

<configuration> 
    <mainClass></mainClass> 
</configuration> 

。ここでは、メインクラスの完全指定名(例:com.myproject.Main)を書いてください。 documentation全体のプラグイン構成を見ると

は次のようになります必要があります。

<plugin> 
    <groupId>com.zenjava</groupId> 
    <artifactId>javafx-maven-plugin</artifactId> 
    <version>8.5.0</version> 
    <configuration> 
     <vendor>YourCompany</vendor> 
     <mainClass>your.package.with.Launcher</mainClass> 
    </configuration> 
</plugin> 

は、あなたの<mainClass>がメインメソッド(アプリのエントリポイント)が含まれていて、あなたが可能な最新バージョンを使用しているTATことを確認します。また、を除いて、mvn clean packageでプロジェクトを作成してみてください。

+0

メインクラスを追加してもそれを更新しましたが、それでもエラーは持続します –

関連する問題