开发者

How to mvn release:prepare although \target is in .hgignore?

开发者 https://www.devze.com 2023-02-11 21:34 出处:网络
I\'m trying: $ mvn release:prepare But then it prints a list of class files under my target directory which I\'ve set hg to ignore, and then fails:

I'm trying:

$ mvn release:prepare

But then it prints a list of class files under my target directory which I've set hg to ignore, and then fails:

> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-release-plugin:2.开发者_运维问答1:prepare
> (default-cli) on project X: Cannot
> prepare the release because you have
> local modifications



 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.1</version>
            </plugin>

$ mvn --version
Apache Maven 3.0.2 (r1056850; 2011-01-09 01:58:10+0100)
Java version: 1.6.0_23, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_23\jre
Default locale: it_IT, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"


Check out the result of hg status:

  • are there any current modifications in target?
  • are there other modifications elsewhere?

Regarding target, make sure any of its content wasn't already part of your Git repo history (already committed at some point) before adding target to the .hgignore file.
hgignore will only ignore untracked files.

0

精彩评论

暂无评论...
验证码 换一张
取 消