raj*_*jat 2 maven-plugin maven maven-archetype
我正在按照此说明了解maven原型。调用mvn archetype:create-from-project一个简单的 webapp 项目,要求我setting.xml在.m2dir下有文件。
不知道为什么要问,无法找到这背后的任何具体原因。没有为任何本地项目创建任何文档状态。
如果您提供清晰的图片,请帮助。运行命令时附加错误。
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< com.example:myapp >--------------------------
[INFO] Building myapp Maven Webapp 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.1.2:create-from-project (default-cli) > generate-sources @ myapp >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.1.2:create-from-project (default-cli) < generate-sources @ myapp <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.1.2:create-from-project (default-cli) @ myapp ---
[INFO] Setting default groupId: com.example
[INFO] Setting default artifactId: myapp
[INFO] Setting default version: 0.0.1-SNAPSHOT
[INFO] Setting default package: com.example
[WARN] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[ERROR] Error executing Maven.
[ERROR] The specified user settings file does not exist: C:\Users\Rajat Dobriyal\.m2\settings.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.303 s
[INFO] Finished at: 2020-01-06T00:38:43+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:create-from-project (default-cli) on project myapp: Invoker process ended with result different than 0! -> [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
Run Code Online (Sandbox Code Playgroud)
任何帮助都会很棒。
settings.xml不是在安装过程中创建的,这就是为什么你需要在下面创建一个默认设置文件的C:\Users\Rajat Dobriyal\.m2\settings.xml内容:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
</settings>
Run Code Online (Sandbox Code Playgroud)
更详细的在这里
| 归档时间: |
|
| 查看次数: |
671 次 |
| 最近记录: |