If the parent of buildNumberPropertiesFileLocation doesn't exist, it should be 
created
--------------------------------------------------------------------------------------

                 Key: MOJO-1372
                 URL: http://jira.codehaus.org/browse/MOJO-1372
             Project: Mojo
          Issue Type: New Feature
          Components: buildnumber
    Affects Versions: buildnumber-maven-plugin-1.0-beta-3
         Environment: Apache Maven 2.1.0 (r755702; 2009-03-18 15:10:27-0400)
Java version: 1.6.0_10
Java home: /usr/java/jdk1.6.0_10/jre
Default locale: en_CA, platform encoding: UTF-8
OS name: "linux" version: "2.6.27.21-78.2.41.fc9.x86_64" arch: "amd64" Family: 
"unix"
            Reporter: Peter Janes
         Attachments: pom.xml

In some instances I want to put the buildNumber.properties file into a 
transient location, specifically 
${project.build.directory}/buildNumber.properties.  However, if the directory 
doesn't exist when buildnumber:create is executed, the plugin throws an 
exception:

org.apache.maven.lifecycle.LifecycleExecutionException: Couldn't create 
properties file: 
/home/pjanes/devel/maven/server-main/modules/scm/scm-rpm/target/buildNumber.properties
[...]
Caused by: org.apache.maven.plugin.MojoExecutionException: Couldn't create 
properties file: 
/home/pjanes/devel/maven/server-main/modules/scm/scm-rpm/target/buildNumber.properties
        at org.codehaus.mojo.build.CreateMojo.execute(CreateMojo.java:318)
[...]
Caused by: java.io.IOException: No such file or directory
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:883)
        at org.codehaus.mojo.build.CreateMojo.execute(CreateMojo.java:314)

The specific use case is that I want all release builds to have build number 1, 
and don't want to pollute the source directory with the buildNumber.properties 
file.  The attached pom.xml demonstrates the behaviour.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to