2013-09-25 2 views
8

Java FX 프로젝트가 있고 빌드 할 때 maven 3.0.5를 사용하고 있습니다. 내가 mvn 패키지를 실행/설치, 프로젝트가 실패하고 그 패키지 javafx 불평. * 존재하지 않습니다. Javafx는 Java 1.7에 패키지되어 있으므로 빌드가이 문제를 해결하지 않는다는 것을 이해할 수 없습니다. 내 IDE (intellij) 내에서 컴파일 할 때 잘 작동하고 그 후에도 내 maven 빌드가 성공적으로 설치되지만, 새로 설치할 때마다 IDE를 거치지 않아도됩니다. 어떤 아이디어? 여기Javafx 프로젝트가 Maven으로 컴파일되지 않습니다.

<?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"> 
    <parent> 
     <artifactId>thenaglecode</artifactId> 
     <groupId>com.thenaglecode</groupId> 
     <version>1.0.0.Pre-Alpha</version> 
    </parent> 
    <modelVersion>4.0.0</modelVersion> 

    <artifactId>system-setup</artifactId> 

    <dependencies> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.commons</groupId> 
      <artifactId>commons-vfs2</artifactId> 
      <version>2.0</version> 
     </dependency> 
     <dependency> 
      <groupId>commons-io</groupId> 
      <artifactId>commons-io</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.commons</groupId> 
      <artifactId>commons-lang3</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>commons-collections</groupId> 
      <artifactId>commons-collections</artifactId> 
     </dependency> 
    </dependencies> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-resources-plugin</artifactId> 
       <version>2.6</version> 
       <configuration> 
        <includeEmptyDirs>true</includeEmptyDirs> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
      </plugin> 
      <plugin> 
       <groupId>com.akathist.maven.plugins.launch4j</groupId> 
       <artifactId>launch4j-maven-plugin</artifactId> 
       <version>1.5.2</version> 
       <executions> 
        <execution> 
         <phase>package</phase> 
         <goals> 
          <goal>launch4j</goal> 
         </goals> 
         <configuration> 
          <headerType>gui</headerType> 
          <jre> 
           <path>C:\Program Files\Java\jre7</path> 
           <minVersion>1.7.0</minVersion> 
           <initialHeapSize>128</initialHeapSize> 
           <maxHeapSize>1024</maxHeapSize> 
          </jre> 
          <jar>${project.build.directory}/${project.build.finalName}.jar</jar> 
          <outfile>${project.build.directory}/systemsetup.exe</outfile> 
          <classPath> 
           <mainClass>com.thenaglecode.Start</mainClass> 
          </classPath> 
          <singleInstance> 
           <mutexName>thenaglecode-system-setup</mutexName> 
          </singleInstance> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </build> 

</project> 

그리고 내 로그입니다 :

[ERROR] COMPILATION ERROR : 
[INFO] ------------------------------------------------------------- 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/CommandHelper.java:[3,26] package javafx.application does not exist 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/ListAndOptionsController.java:[3,26] package javafx.beans.value does not exist 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/ListAndOptionsController.java:[4,26] package javafx.beans.value does not exist 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/ListAndOptionsController.java:[5,26] package javafx.collections does not exist 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/ListAndOptionsController.java:[6,20] package javafx.event does not exist 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/ListAndOptionsController.java:[7,20] package javafx.event does not exist 
... 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/Context.java:[3,28] package javafx.scene.control does not exist 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/ServiceMuncher.java:[3,31] package com.sun.istack.internal does not exist 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/TypeInfo.java:[3,31] package com.sun.istack.internal does not exist 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/NumericOnlyTextFieldChangeListener.java:[3,31] package com.sun.istack.internal does not exist 
[ERROR] /C:/Users/Macindows/IdeaProjects/thenaglecode/system-setup/src/main/java/com/thenaglecode/NumericOnlyTextFieldChangeListener.java:[4,26] package javafx.beans.value does not exist 
[ERROR] -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 

Process finished with exit code 1 

여러분의 도움에 감사드립니다가

여기 내 치어입니다.

+0

에 관한 자세한 내용은 Maven project with JavaFX (with jar file in 'lib') 참조 . – assylias

+0

가능한 [JavaFX가있는 Maven 프로젝트 (\ lib \'에 jar 파일이 있음)] (http://stackoverflow.com/questions/15278215/maven-project-with-jav) jar-file-in-lib) – jewelsea

답변

7

그러나 당신은 아마 사용자가 자신의 Settings.XML의 또는 받는다는 시스템 속성에서 지정할 수있는 변수로 교체해야 종속성 컴파일 도움이 될 것입니다 (당신의 JDK가 위치에 따라) 종속성이 배치 :

http://stackoverflow.com/questions/9294646/javafx-2-as-a-maven-dependency - 자바 FX 8 잘 작동 .. :
<dependency> 
     <groupId>com.oracle</groupId> 
     <artifactId>javaFX</artifactId> 
     <version>2.2</version> 
     <scope>system</scope> 
     <systemPath>C:\Program Files\Java\jre7\lib\jfxrt.jar</systemPath> 
    </dependency> 

그것은 성가신 이유

관련 문제