javafx maven集成遇到的问题解决

来源:互联网 发布:起点网络交易平台刷赞 编辑:程序博客网 时间:2024/05/06 09:25

javafx maven集成采用javafx-maven-plugin,

主要分为几个目标:

jfx:jar

jfx:web

jfx:native

jfx:fix-classpath

jfx:generate-key-store

jfx:run

但是在

mvn clean jfx:run

时遇到了问题:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

解决方法:

<build>    <plugins>        <plugin>            <groupId>com.zenjava</groupId>            <artifactId>javafx-maven-plugin</artifactId>            <version>2.0</version>            <configuration>                <mainClass>net.jalbright.scratch.App</mainClass>            </configuration>            <dependencies>                <dependency>                    <groupId>org.twdata.maven</groupId>                    <artifactId>mojo-executor</artifactId>                    <version>2.1.0</version>                </dependency>            </dependencies>        </plugin>    </plugins></build>



maven jre版本问题:

在settings.xml中添加:
  <profile>        <id>jdk-1.8</id>                                        <activation>                    <jdk>1.8</jdk>                    <activeByDefault>true</activeByDefault>                      </activation>                    <properties>                          <maven.compiler.source>1.8</maven.compiler.source>                          <maven.compiler.target>1.8</maven.compiler.target>                          <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>                      </properties>  


参考:http://www.zenjava.com/2013/05/26/javafx-maven-plugin-2-0-alpha-feedback-needed/

http://zenjava.com/javafx/maven/index.html

http://stackoverflow.com/questions/19407959/javafx-maven-plugin-and-api-incompatibility


0 0