This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 163133 - Version number property
Summary: Version number property
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-20 15:56 UTC by hat27533
Modified: 2016-07-07 08:56 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hat27533 2009-04-20 15:56:32 UTC
It would be really useful to be able to increment a web application version number property from the netbeans project
property editor and be able to build a war file that included the version in the file name.

Say you have a project called MyProject and a way of incrementing the version number from 1.0 to 2.0 then build the war
file with the version included to "MyProject_2.0.war".
Comment 1 David Konecny 2009-04-21 00:09:36 UTC
For now you can do it by hand by opening nbproject/project.properties and editing war.ear.name and war.name properties.
Just be careful if your web project is included in ear project then ear project's properties will need to be update
after was name as well.
Comment 2 hat27533 2009-04-21 08:30:28 UTC
Hi, sure I already do this by hand, it works well. 

I did think of contributing a plugin to do this, thought you guys would maybe prefere integration into the IDE.

I add a property WebAppVersion and change the war.name property :-

WebAppVersion=1.5.1
war.name=MyProject_${WebAppVersion}.war

I also minify and combine JavaScript files into a single include using the same property via a modified build.xml :-
JSInclude=MyProject_${WebAppVersion}.js
Comment 3 David Konecny 2009-04-21 21:39:33 UTC
Patch is good as gold. However my suspicion why this has not been implemented yet is that:
* change of name of project build artifact needs to be propagated to all projects referencing that name
* version number is just half the story - other half is concept of (automatic) build number
On second thought I think there is too many requirements/options and adding version property as you are suggesting is
just one of them. I can imagine a developer's practice where all files are versioned when a product version is released
- jar/war, js, javadoc, sources, ... and such a change would be best done outside of project's build script after
testing and before deployment to the product's website. All I wanna say is that there might be more to consider before
implementing this.
Comment 4 Martin Balin 2016-07-07 08:56:29 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss