gpt4 book ai didi

java - 如何为 esri Geometry-api 构建 jar 文件

转载 作者:行者123 更新时间:2023-12-01 12:32:35 24 4
gpt4 key购买 nike

我已经从github下载了esri-geometry-api,我正在尝试使用mvn从中获取jar文件。我尝试过运行以下命令:

    D:\lib\geometry-api-java-master>mvn tasks
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-st
aging-maven-plugin
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Esri Geometry API for Java 1.2
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.702 s
[INFO] Finished at: 2014-09-14T09:05:53+05:30
[INFO] Final Memory: 6M/140M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "tasks". You must specify a valid lifecycle phas
e or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-ar
tifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate,
initialize, generate-sources, process-sources, generate-resources, process-resou
rces, compile, process-classes, generate-test-sources, process-test-sources, gen
erate-test-resources, process-test-resources, test-compile, process-test-classes
, test, prepare-package, package, pre-integration-test, integration-test, post-i
ntegration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site
, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhase
NotFoundException
D:\lib\geometry-api-java-master>ls
CONTRIBUTING.md README.md license.txt pom.xml
DepFiles build.xml manifest src

我也尝试过这个:

    D:\lib\geometry-api-java-master>mvn build
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-st
aging-maven-plugin
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Esri Geometry API for Java 1.2
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.966 s
[INFO] Finished at: 2014-09-14T09:07:22+05:30
[INFO] Final Memory: 6M/140M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "build". You must specify a valid lifecycle phas
e or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-ar
tifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate,
initialize, generate-sources, process-sources, generate-resources, process-resou
rces, compile, process-classes, generate-test-sources, process-test-sources, gen
erate-test-resources, process-test-resources, test-compile, process-test-classes
, test, prepare-package, package, pre-integration-test, integration-test, post-i
ntegration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site
, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhase
NotFoundException

我也尝试过这个:

    D:\lib\geometry-api-java-master>mvn jar
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-st
aging-maven-plugin
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Esri Geometry API for Java 1.2
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.670 s
[INFO] Finished at: 2014-09-14T09:08:26+05:30
[INFO] Final Memory: 6M/140M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "jar". You must specify a valid lifecycle phase
or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-arti
fact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, in
itialize, generate-sources, process-sources, generate-resources, process-resourc
es, compile, process-classes, generate-test-sources, process-test-sources, gener
ate-test-resources, process-test-resources, test-compile, process-test-classes,
test, prepare-package, package, pre-integration-test, integration-test, post-int
egration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site,
site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhase
NotFoundException

最佳答案

如果您的 pom.xml 中有此配置

      <packaging>jar</packaging>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>yourMainClass</mainClass>
</manifest>
</archive>
</configuration>
</plugin>

要构建 jar,请尝试 mvn package

关于java - 如何为 esri Geometry-api 构建 jar 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25829847/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com