Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: buildnumber-maven-plugin-1.0-beta-4
-
Fix Version/s: 1.2
-
Labels:None
-
Environment:Windows XP SP3, Maven 3.0.1, Subversion 1.6.15, JDK 1.6_11
-
Number of attachments :
Description
I use the following configuration in my pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0-beta-4</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>true</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
</plugins>
Steps to reproduce:
1. Check out the project.
2. Modify a .java file that is under version control, e.g. add a method to my-package\MyClass.java. The file gets the dirty icon in Eclipse.
3. Run "mvn -U buildnumber:create". The build succeeds, but it should fail.
Interestingly, the log says:
[DEBUG] M src\main\java\mypackage\MyClass.java
So, the SVN client correctly identified the modified file, but the buildnumber plugin didn't react on this result.
If I delete my-package\MyClass.java, it works as expected:
[ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-4:create (default-cli) on project trial-maven: Cannot create the build number because you have local modifications :
[ERROR] [ src\main\java\my-package\MyClass.java:deleted]
The doCheck option to true is configured in your case for a mojo execution bind to the verify phase.
You must use mvn verify or move the configuration to the "main" mojo configuration section