I myself figure out that i can set it like
${pom.setCurrentVersion("TEST")} - It is a kind of hack. Cant we control the value of the attributes that get in to the war manifest?
I think this should be very important feature, that we are able to control the attribute values that are auto generated.


Thanks,
Vijay

I would be happy if i can set a value in the global scope and pull this in different projects.

Thanks,
Vijay


Vijay Venkataraman wrote:

Hi,

Thanks for the information Craig. The buildnumber task is available in 1.5.2. Using bulidnumber scheme
i have to keep committing this file to the repository right?. We plan to go with the date time stamp and are ok with that.
Is it possible to set a different value to pom.currentVersion between goals?


What i have done currently is have custom MANIFEST file which holds the attribute i would currently like to override with the one that is auto generated by the JAR and WAR goals.

By doing the following setting it works fine with JAR plugin.
maven.jar.manifest=${user.home}/custom-MANIFEST.MF
ie. if there is a property in custom-MANIFEST.MF which matches with that is in the auto generated manifest file, then property in custom-MANIFEST.MF overrides it.
The problem is with WAR plug-in :
maven.war.manifest=${user.home}/custom-MANIFEST.MF
Here the property does not get overridden but gets written twice. Which is shown in bold.


Ant-Version: Apache Ant 1.5.3
Created-By: 1.4.2_04-b04 (Sun Microsystems Inc.)
Built-By: XYZUY
Implementation-Version: XYX-050311.2038 [This is the property in custom-MANIFEST.MF]


Name: custom project
Specification-Title: some demo
Specification-Version: {pom.currentVersion}
Specification-Vendor: Company
Implementation-Title: oracle.adfdemo.view.faces
Implementation-Version: XYX [The one auto generated. ]
Implementation-Vendor: Company


The implementation version comes out from pom.Version. If i can set pom.Version before war goal and reset it in the post goal. I should be able to achieve. Or if pom.Version cannot be changed .. then i have to write a goal to unjar the war and rewrite the manifest file.

Not sure whether it is a bug with war plug in.

Thanks,
Vijay



Craig S. Cottingham wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mar 10, 2005, at 06:41, Vijay Venkataraman wrote:

I want to generate a unique number for all the jars which i build in my maven project. There are multiple projects (multi project)with in a given project. The value ${pom.currentVersion} is just not enough. I need to know the number of each build. For this i have a unique number generated for me. I need to pass this value to different projects that are part of the same project.

${systemScope.put('dateTimeStamp','${versionInfo}')}
The syntax of the form mentioned above does not help me since it is per JVM.


Is there a way i could store it in a kind of global context and retrieve it?



Can you leverage Ant's BuildNumber task? <http://ant.apache.org/manual/CoreTasks/buildnumber.html> Yes, this documentation is for Ant 1.6.2, but I'm pretty sure BuildNumber was in Ant 1.5.x.


- --
Craig S. Cottingham
[EMAIL PROTECTED]
OpenPGP key available from:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCMGGxEJLQ3Hl395wRAtI4AJ4/isNG53ZNjgrdGWTZ5M+aMa/RmACcCnrc
g+FwBzL824sOXMvhghT3bZ4=
=MIPy
-----END PGP SIGNATURE-----


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to