cla*_*ion 9 pom.xml maven-3 maven maven-release-plugin
我有一个关于Maven,maven-release-plugin,git integration,pom.xml的问题,并且在repo的本地副本的子目录中而不是在根目录中有pom.xml.
这是设置:
这是我在此过程中遇到的实际错误:
[INFO] --- maven-release-plugin:2.0:perform (default-cli) @ standard_parent_project ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: /bin/sh -c cd "/Users/___/DEV c8ion 01/maven_based_code/0maven/standard_parent_project/target" && git clone git@github.com:clarafaction/0maven.git '/Users/___/DEV c8ion 01/maven_based_code/0maven/standard_parent_project/target/checkout'
...
/* note, the pom.xml the build should go out of at this point is at
'/Users/___/DEV c8ion 01/maven_based_code/0maven/standard_parent_project/target/checkout/standard_parent_project/pom.xml'
*/
...
[INFO] [ERROR] The goal you specified requires a project to execute but
there is no POM in this directory
(/Users/___/DEV c8ion 01/maven_based_code/0maven/standard_parent_project/target/checkout).
Please verify you invoked Maven from the correct directory. -> [Help 1]
Run Code Online (Sandbox Code Playgroud)
谢谢.
小智 11
这应该做的伎俩:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<id>default</id>
<goals>
<goal>perform</goal>
</goals>
<configuration>
<pomFileName>your_path/your_pom.xml</pomFileName>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
你可以像通常告诉Maven从其他地方的POM运行一样:-f选项.mvn --help这样描述:
-f,--file <arg> Force the use of an alternate POM
file.
Run Code Online (Sandbox Code Playgroud)
要在发行版中执行此操作,您只需将适当的选项传递给发布插件即可.您可以使用执行目标的"arguments"属性来执行此操作.此属性只是告诉release插件一些附加参数,以附加到mvn它在执行发布时运行的命令.您可以通过-D arguments="-f path/to/pom"在发布插件的配置中将其永久附加或设置在命令行中来设置它,类似于
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.3</version>
<configuration>
<arguments>-f path/to/pom</arguments>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4959 次 |
| 最近记录: |