2013-10-03 1 views
0

Я создаю проект javaFX2.0 с netbeans 7.4 и maven. Но я не очень хорош с maven. Поэтому, когда я запускаю свой проект, у меня есть ошибка о mojo. Я не знаю, как это решить.JavaFX2.0 + Maven + Netbeans + mojo

мой pom.xml

<?xml version="1.0" encoding="UTF-8"?> 

http://maven.apache.org/xsd/maven-4.0.0.xsd "> 4.0.0

<groupId>com.drive</groupId> 
<artifactId>Superviseur</artifactId> 
<version>1.0.0-SNAPSHOT</version> 
<packaging>jar</packaging> 

<name>Superviseur</name> 

<properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <mainClass>com.drive.superviseur.MainApp</mainClass> 
</properties> 

<organization> 
    <!-- Used as the 'Vendor' for JNLP generation --> 
    <name>Your Organisation</name> 
</organization> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-dependency-plugin</artifactId> 
      <version>2.6</version> 
      <executions> 
       <execution> 
        <id>unpack-dependencies</id> 
        <phase>package</phase> 
        <goals> 
         <goal>unpack-dependencies</goal> 
        </goals> 
        <configuration> 
         <excludeScope>system</excludeScope> 
         <excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds> 
         <outputDirectory>${project.build.directory}/classes</outputDirectory> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>exec-maven-plugin</artifactId> 
      <version>1.2.1</version> 
      <executions> 
       <execution> 
        <id>unpack-dependencies</id> 

        <phase>package</phase> 
        <goals> 
         <goal>exec</goal> 
        </goals> 
        <configuration> 
         <executable>${java.home}/../bin/javafxpackager</executable> 
         <arguments> 
          <argument>-createjar</argument> 
          <argument>-nocss2bin</argument> 
          <argument>-appclass</argument> 
          <argument>${mainClass}</argument> 
          <argument>-srcdir</argument> 
          <argument>${project.build.directory}/classes</argument> 
          <argument>-outdir</argument> 
          <argument>${project.build.directory}</argument> 
          <argument>-outfile</argument> 
          <argument>${project.build.finalName}.jar</argument> 
         </arguments> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>3.1</version> 
      <configuration> 
       <source>1.7</source> 
       <target>1.7</target> 
       <compilerArguments> 
        <bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath> 
       </compilerArguments> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 

и об ошибке:

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project Superviseur: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

Чтобы увидеть полную ошибку стека ошибок, повторно запустите Maven с ключом -e. Повторно запустите Maven, используя переключатель -X, чтобы включить полное ведение журнала отладки.

Для получения дополнительной информации об ошибках и возможных решениях, пожалуйста, прочитайте следующие статьи: [Помощь] 1 http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Любые идеи? Thx

ответ

0

Я уже исправил ошибку. Это было очень легко. Я просто поместил свой проект в профиль выпуска на Netbeans, и он отлично работает.