[JIRA] (JENKINS-9693) maven.build.timestamp.format is not obeyed in maven builds

2012-10-18 Thread tsavo...@gmail.com (JIRA)














































Tomi Savolainen
 commented on  JENKINS-9693


maven.build.timestamp.format is not obeyed in maven builds















Reproduced on Jenkins ver. 1.486



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-9693) maven.build.timestamp.format is not obeyed in maven builds

2012-09-13 Thread jenk...@adamrofer.com (JIRA)














































Adam Rofer
 commented on  JENKINS-9693


maven.build.timestamp.format is not obeyed in maven builds















All of the above workarounds provide different timestamps in each submodule in a multi-module build. The only thing I managed to get working was the following code:


plugin
groupIdcom.github.goldin/groupId
artifactIdtimestamp-maven-plugin/artifactId
executions
execution
idset-specific-timestamp/id
goals
goaltimestamp/goal
/goals
phaseinitialize/phase
configuration
time{{ 
 def newdate = null;
 try {
 newdate = Date.parse( "${maven.build.timestamp.format}", "${maven.build.timestamp}");
 } catch (Exception e) {
 newdate = Date.parse( "MMdd-HHmm", "${maven.build.timestamp}");
 println "THANKS JENKINS, FOR JENKINS-9693";
 }
 newdate 
 }}/time
timestamp
propertyactual-timestamp/property
pattern${maven.build.timestamp.format}/pattern
/timestamp
/configuration
/execution
/executions
/plugin



...and then use actual-timestamp as your timestamp property.
This assumes you already have maven.build.timestamp.format set as a property.

Note that you can put whatever pattern you want in the pattern field, in this case it just formats it the way you originally wanted it 

Also note that this will only reach minute resolution on Jenkins builds since that's what Jenkins munges it to.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-9693) maven.build.timestamp.format is not obeyed in maven builds

2012-09-13 Thread jenk...@adamrofer.com (JIRA)












































 
Adam Rofer
 edited a comment on  JENKINS-9693


maven.build.timestamp.format is not obeyed in maven builds
















All of the above workarounds provide different timestamps in each module in a multi-module build. The only thing I managed to get working was the following code:


plugin
groupIdcom.github.goldin/groupId
artifactIdtimestamp-maven-plugin/artifactId
executions
execution
idset-specific-timestamp/id
goals
goaltimestamp/goal
/goals
phaseinitialize/phase
configuration
time{{ 
 def newdate = null;
 try {
 newdate = Date.parse( "${maven.build.timestamp.format}", "${maven.build.timestamp}");
 } catch (Exception e) {
 newdate = Date.parse( "MMdd-HHmm", "${maven.build.timestamp}");
 println "THANKS JENKINS, FOR JENKINS-9693";
 }
 newdate 
 }}/time
timestamp
propertyactual-timestamp/property
pattern${maven.build.timestamp.format}/pattern
/timestamp
/configuration
/execution
/executions
/plugin



...and then use actual-timestamp as your timestamp property.
This assumes you already have maven.build.timestamp.format set as a property.

Note that you can put whatever pattern you want in the pattern field, in this case it just formats it the way you originally wanted it 

Also note that this will only reach minute resolution on Jenkins builds since that's what Jenkins munges it to.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-9693) maven.build.timestamp.format is not obeyed in maven builds

2012-09-13 Thread jenk...@adamrofer.com (JIRA)












































 
Adam Rofer
 edited a comment on  JENKINS-9693


maven.build.timestamp.format is not obeyed in maven builds
















All of the above workarounds provide different timestamps in each module in a multi-module build. The only thing I managed to get working was the following code:


plugin
groupIdcom.github.goldin/groupId
artifactIdtimestamp-maven-plugin/artifactId
executions
execution
idset-specific-timestamp/id
goals
goaltimestamp/goal
/goals
phaseinitialize/phase
configuration
time{{ 
 def newdate = null;
 try {
 newdate = Date.parse( "${maven.build.timestamp.format}", "${maven.build.timestamp}");
 } catch (java.text.ParseException e) {
 newdate = Date.parse( "MMdd-HHmm", "${maven.build.timestamp}");
 println "THANKS JENKINS, FOR JENKINS-9693";
 }
 newdate 
 }}/time
timestamp
propertyactual-timestamp/property
pattern${maven.build.timestamp.format}/pattern
/timestamp
/configuration
/execution
/executions
/plugin



...and then use actual-timestamp as your timestamp property.
This assumes you already have maven.build.timestamp.format set as a property.

Note that you can put whatever pattern you want in the pattern field, in this case it just formats it the way you originally wanted it 

Also note that this will only reach minute resolution on Jenkins builds since that's what Jenkins munges it to.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-9693) maven.build.timestamp.format is not obeyed in maven builds

2012-03-05 Thread allenserve...@java.net (JIRA)

[ 
https://issues.jenkins-ci.org/browse/JENKINS-9693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=159852#comment-159852
 ] 

allenservedio commented on JENKINS-9693:


I wound up creating this timestamp via the Codehaus Build Number plugin 
(http://mojo.codehaus.org/buildnumber-maven-plugin/create-timestamp-mojo.html). 
Here is the Maven config that I used (in my plugin dependency management):

{code:xml}
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdbuildnumber-maven-plugin/artifactId
version1.0/version
executions
  execution
phasegenerate-resources/phase
goals
  goalcreate-timestamp/goal
/goals
  /execution
/executions
configuration
  timestampFormatMMddHHmmssSSS/timestampFormat
  
timestampPropertyNamereleaseTimestamp/timestampPropertyName
/configuration
  /plugin
{code}

Am I correct that the reason this was not fixed already is that the point in 
the maven lifecycle where the statically formatted timestamp is created, the 
pom file(s) have not been evaluated. As such, it does not have access to this 
property (maven.build.timestamp.format) and so does not know that the user has 
defined it? If that is true, is there something else that can be used in 
Jenkin's Maven integration that can get access to this property and use it 
correctly?

Thanks!
Allen

 maven.build.timestamp.format is not obeyed in maven builds
 --

 Key: JENKINS-9693
 URL: https://issues.jenkins-ci.org/browse/JENKINS-9693
 Project: Jenkins
  Issue Type: Bug
  Components: maven2
Reporter: Dan C
Priority: Minor

 Since Maven 2.1 it is possible to control the format of the 
 {{maven.build.timestamp}} property [by setting the 
 {{maven.build.timestamp.format}} 
 property|http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Special_Variables].
  This works correctly with mvn version 3.0.3:
 {code:xml|title=pom.xml}
 project xmlns=http://maven.apache.org/POM/4.0.0;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
 http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 groupIdinvalid.example.test/groupId
 artifactIdtest/artifactId
 version1.0-SNAPSHOT/version
 packagingjar/packaging
 properties
 
 maven.build.timestamp.format-MM-dd'T'HH:mm:ssZ/maven.build.timestamp.format
 build.timestamp${maven.build.timestamp}/build.timestamp
 /properties
 build
 resources
 resource
 directorysrc/main/filtered-resources/directory
 filteringtrue/filtering
 /resource
 /resources
 /build
 /project
 {code}
 {code:title=src/main/filtered-resources/test.properties}
 Build-Timestamp: ${build.timestamp}
 {code}
 {code:title=target/classes/test.properties}
 Build-Timestamp: 2011-05-15T18:56:20+1000
 {code}
 but in Jenkins 1.411 the default timestamp format is used instead:
 {code:title=target/classes/test.properties}
 Build-Timestamp: 20110515-1857
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[JIRA] (JENKINS-9693) maven.build.timestamp.format is not obeyed in maven builds

2012-02-17 Thread mathias....@gmail.com (JIRA)

[ 
https://issues.jenkins-ci.org/browse/JENKINS-9693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=159208#comment-159208
 ] 

Mathias Dam commented on JENKINS-9693:
--

I have to agree with Jason Chaffee. While it is mostly just annoying, it begs 
the question: If this doesn't work as a command line build using Maven, what 
else might be different?

 maven.build.timestamp.format is not obeyed in maven builds
 --

 Key: JENKINS-9693
 URL: https://issues.jenkins-ci.org/browse/JENKINS-9693
 Project: Jenkins
  Issue Type: Bug
  Components: maven2
Reporter: Dan C
Priority: Minor

 Since Maven 2.1 it is possible to control the format of the 
 {{maven.build.timestamp}} property [by setting the 
 {{maven.build.timestamp.format}} 
 property|http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Special_Variables].
  This works correctly with mvn version 3.0.3:
 {code:xml|title=pom.xml}
 project xmlns=http://maven.apache.org/POM/4.0.0;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
 http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 groupIdinvalid.example.test/groupId
 artifactIdtest/artifactId
 version1.0-SNAPSHOT/version
 packagingjar/packaging
 properties
 
 maven.build.timestamp.format-MM-dd'T'HH:mm:ssZ/maven.build.timestamp.format
 build.timestamp${maven.build.timestamp}/build.timestamp
 /properties
 build
 resources
 resource
 directorysrc/main/filtered-resources/directory
 filteringtrue/filtering
 /resource
 /resources
 /build
 /project
 {code}
 {code:title=src/main/filtered-resources/test.properties}
 Build-Timestamp: ${build.timestamp}
 {code}
 {code:title=target/classes/test.properties}
 Build-Timestamp: 2011-05-15T18:56:20+1000
 {code}
 but in Jenkins 1.411 the default timestamp format is used instead:
 {code:title=target/classes/test.properties}
 Build-Timestamp: 20110515-1857
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira