2016-02-26 235 views
1

我在Intellij IDEA中启动了JavaFX maven项目。该程序在Intellij IDEA内部完美运行。 我已经包含javafx-maven-plugin以部署我的项目。 执行javafx-maven-plugin后:jfx:build-jar。我得到这个错误日志:使用Intellij IDEA部署Javafx maven项目

"C:\Program Files\Java\jdk1.8.0_51\bin\java" "-Dmaven.home=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.1\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=7534 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=15.0.1 --debug -T X org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy 
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100) 
Maven home: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.1\plugins\maven\lib\maven3 
Java version: 1.8.0_51, vendor: Oracle Corporation 
Java home: C:\Program Files\Java\jdk1.8.0_51\jre 
Default locale: fr_FR, platform encoding: UTF-8 
OS name: "windows 8", version: "6.2", arch: "amd64", family: "dos" 
[INFO] Error stacktraces are turned on. 
[DEBUG] Reading global settings from C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.1\plugins\maven\lib\maven3\conf\settings.xml 
[DEBUG] Reading user settings from C:\Users\computerPCNRU\.m2\settings.xml 
[DEBUG] Using local repository at C:\Users\computerPCNRU\.m2\repository 
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\Users\computerPCNRU\.m2\repository 
[INFO] Scanning for projects... 
[DEBUG] Extension realms for project com.abdo.EntrepriseLimted:EntrepriseLimited:jar:1.0: (none) 
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null] 
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.abdo.EntrepriseLimted:EntrepriseLimited:jar:1.0 
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 11, column 21 
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. 
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. 
[WARNING] 
[DEBUG] === REACTOR BUILD PLAN ================================================ 
[DEBUG] Project: com.abdo.EntrepriseLimted:EntrepriseLimited:jar:1.0 
[DEBUG] Tasks: [org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy] 
[DEBUG] Style: Regular 
[DEBUG] ======================================================================= 
[WARNING] Couldn't parse thread count, will default to 1.0: X 
[DEBUG] Thread pool size: 1 
[INFO] Building with 1 threads 
[DEBUG] Scheduling: MavenProject: com.abdo.EntrepriseLimted:EntrepriseLimited:1.0 @ D:\Projects\6.Project SI limted\2 nd iteration\2. Object Oriented design\pom.xml 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building EntrepriseLimited 1.0 
[INFO] ------------------------------------------------------------------------ 
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy] 
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean] 
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy] 
[DEBUG] === PROJECT BUILD PLAN ================================================ 
[DEBUG] Project:  com.abdo.EntrepriseLimted:EntrepriseLimited:1.0 
[DEBUG] Dependencies (collect): [] 
[DEBUG] Dependencies (resolve): [] 
[DEBUG] Repositories (dependencies): [central (http://repo.maven.apache.org/maven2, releases)] 
[DEBUG] Repositories (plugins)  : [central (http://repo.maven.apache.org/maven2, releases)] 
[DEBUG] ----------------------------------------------------------------------- 
[DEBUG] Goal:   org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-cli) 
[DEBUG] Style:   Regular 
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <altDeploymentRepository>${altDeploymentRepository}</altDeploymentRepository> 
    <artifact default-value="${project.artifact}"/> 
    <attachedArtifacts default-value="${project.attachedArtifacts}"/> 
    <localRepository default-value="${localRepository}"/> 
    <offline default-value="${settings.offline}"/> 
    <packaging default-value="${project.packaging}"/> 
    <pomFile default-value="${project.file}"/> 
    <project default-value="${project}"/> 
    <retryFailedDeploymentCount default-value="1">${retryFailedDeploymentCount}</retryFailedDeploymentCount> 
    <skip default-value="false">${maven.deploy.skip}</skip> 
    <updateReleaseInfo default-value="false">${updateReleaseInfo}</updateReleaseInfo> 
</configuration> 
[DEBUG] ======================================================================= 
[INFO] 
[INFO] --- maven-deploy-plugin:2.7:deploy (default-cli) @ EntrepriseLimited --- 
[DEBUG] Created new class realm maven.api 
[DEBUG] Importing foreign packages into class realm maven.api 
[DEBUG] Imported: org.apache.maven.cli < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core 
[DEBUG] Imported: org.apache.maven.lifecycle < plexus.core 
[DEBUG] Imported: org.apache.maven.repository < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.personality < plexus.core 
[DEBUG] Imported: org.apache.maven.usability < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core 
[DEBUG] Imported: org.sonatype.aether.version < plexus.core 
[DEBUG] Imported: org.sonatype.aether.* < plexus.core 
[DEBUG] Imported: org.sonatype.aether.artifact < plexus.core 
[DEBUG] Imported: org.apache.maven.* < plexus.core 
[DEBUG] Imported: org.apache.maven.project < plexus.core 
[DEBUG] Imported: org.sonatype.aether.repository < plexus.core 
[DEBUG] Imported: org.sonatype.aether.impl < plexus.core 
[DEBUG] Imported: org.apache.maven.exception < plexus.core 
[DEBUG] Imported: org.apache.maven.plugin < plexus.core 
[DEBUG] Imported: org.sonatype.aether.collection < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.* < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.logging < plexus.core 
[DEBUG] Imported: org.apache.maven.profiles < plexus.core 
[DEBUG] Imported: org.sonatype.aether.metadata < plexus.core 
[DEBUG] Imported: org.sonatype.aether.spi < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core 
[DEBUG] Imported: org.apache.maven.wagon.* < plexus.core 
[DEBUG] Imported: org.sonatype.aether.graph < plexus.core 
[DEBUG] Imported: org.apache.maven.rtinfo < plexus.core 
[DEBUG] Imported: org.sonatype.aether.installation < plexus.core 
[DEBUG] Imported: org.apache.maven.monitor < plexus.core 
[DEBUG] Imported: org.sonatype.aether.transfer < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.context < plexus.core 
[DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core 
[DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core 
[DEBUG] Imported: org.sonatype.aether.deployment < plexus.core 
[DEBUG] Imported: org.apache.maven.model < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core 
[DEBUG] Imported: org.apache.maven.artifact < plexus.core 
[DEBUG] Imported: org.apache.maven.toolchain < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core 
[DEBUG] Imported: org.apache.maven.settings < plexus.core 
[DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core 
[DEBUG] Imported: org.apache.maven.wagon.events < plexus.core 
[DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core 
[DEBUG] Imported: org.apache.maven.reporting < plexus.core 
[DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core 
[DEBUG] Imported: org.apache.maven.configuration < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core 
[DEBUG] Imported: org.codehaus.classworlds < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core 
[DEBUG] Imported: org.apache.maven.classrealm < plexus.core 
[DEBUG] Imported: org.sonatype.aether.resolution < plexus.core 
[DEBUG] Imported: org.apache.maven.execution < plexus.core 
[DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.container < plexus.core 
[DEBUG] Imported: org.codehaus.plexus.component < plexus.core 
[DEBUG] Populating class realm maven.api 
[DEBUG] org.apache.maven.plugins:maven-deploy-plugin:jar:2.7: 
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.6:compile 
[DEBUG] org.apache.maven:maven-project:jar:2.0.6:compile 
[DEBUG]  org.apache.maven:maven-settings:jar:2.0.6:compile 
[DEBUG]  org.apache.maven:maven-profile:jar:2.0.6:compile 
[DEBUG]  org.apache.maven:maven-artifact-manager:jar:2.0.6:compile 
[DEBUG]   org.apache.maven:maven-repository-metadata:jar:2.0.6:compile 
[DEBUG]  org.apache.maven:maven-plugin-registry:jar:2.0.6:compile 
[DEBUG]  org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile 
[DEBUG]   junit:junit:jar:3.8.1:compile 
[DEBUG]   classworlds:classworlds:jar:1.1-alpha-2:compile 
[DEBUG] org.apache.maven:maven-model:jar:2.0.6:compile 
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.6:compile 
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.5.6:compile 
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7 
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7 
[DEBUG] Imported: < maven.api 
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7 
[DEBUG] Included: org.apache.maven.plugins:maven-deploy-plugin:jar:2.7 
[DEBUG] Included: junit:junit:jar:3.8.1 
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.5.6 
[DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6 
[DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.6 
[DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.6 
[DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.6 
[DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6 
[DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6 
[DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6 
[DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 
[DEBUG] Excluded: classworlds:classworlds:jar:1.1-alpha-2 
[DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.6 
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.6 
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7, parent: [email protected]] 
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy' with basic configurator --> 
[DEBUG] (f) artifact = com.abdo.EntrepriseLimted:EntrepriseLimited:jar:1.0 
[DEBUG] (f) attachedArtifacts = [] 
[DEBUG] (s) localRepository =  id: local 
     url: file:///C:/Users/computerPCNRU/.m2/repository/ 
    layout: none 

[DEBUG] (f) offline = false 
[DEBUG] (f) packaging = jar 
[DEBUG] (f) pomFile = D:\Projects\6.Project SI limted\2 nd iteration\2. Object Oriented design\pom.xml 
[DEBUG] (f) project = MavenProject: com.abdo.EntrepriseLimted:EntrepriseLimited:1.0 @ D:\Projects\6.Project SI limted\2 nd iteration\2. Object Oriented design\pom.xml 
[DEBUG] (f) retryFailedDeploymentCount = 1 
[DEBUG] (f) skip = false 
[DEBUG] (f) updateReleaseInfo = false 
[DEBUG] -- end configuration -- 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 1.095s (Wall Clock) 
[INFO] Finished at: Sun Feb 28 23:48:32 WAT 2016 
[INFO] Final Memory: 4M/61M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-cli) on project EntrepriseLimited: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-cli) on project EntrepriseLimited: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) 
    at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167) 
    at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: org.apache.maven.plugin.MojoExecutionException: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter 
    at org.apache.maven.plugin.deploy.DeployMojo.getDeploymentRepository(DeployMojo.java:235) 
    at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:118) 
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 
    ... 11 more 
[ERROR] 
[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/MojoExecutionException 

Process finished with exit code 1 

她是pom.xml文件:

<?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>com.abdo.EntrepriseLimted</groupId> 
    <artifactId>EntrepriseLimited</artifactId> 
    <version>1.0</version> 
    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <configuration> 
        <source>1.8</source> 
        <target>1.8</target> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>com.zenjava</groupId> 
       <artifactId>javafx-maven-plugin</artifactId> 
       <version>8.2.0</version> 
       <configuration> 
        <mainClass>main</mainClass> 
        <bundler>EXE</bundler> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 
    <dependencies> 
     <dependency> 
      <groupId>com.abdo.EntrepriseLimted</groupId> 
      <artifactId>EntrepriseLimited</artifactId> 
      <version>1.0</version> 
     </dependency> 

    </dependencies> 
</project> 
+0

你最好用“调试输出”选项('mvn -X ')重新调用maven并发布完整的日志。 –

+0

您必须将依赖项声明为pom.xml的一部分。 – hotzst

+0

我没有使用命令行,我正在使用maven插件 –

回答

0

请检查在仓库的.m2你的位置的settings.xml。如果配置管理配置,那么你需要在你的pom中指定相同的配置。