Save!
I use Maven to accomplish my project structure and configuration management. He is agnostic to IDE and suggests a way for his project to have an intelligent structure of resource organization and code.
In addition, there are a number of plugins that you can perform almost any task regarding project design, deploy and release project. Anyway, it's a powerful tool. I suggest you take a look. Netbeans has support .
To generate build number I use the plugin buildnumber-maven-plugin
. It connects to your repository and generates a number based on commit
. It's very interesting. Here is an example I use in my project:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>${build.number.plugin.version}</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<getRevisionOnlyOnce>true</getRevisionOnlyOnce>
<doCheck>false</doCheck>
<doUpdate>true</doUpdate>
<shortRevisionLength>5</shortRevisionLength>
</configuration>
</plugin>
In this case it retrieves the first 5 digits of the code from commit
from my GIT repository and adds it to the manifest. I believe that with some configuration it can also add this information to your final file.
To configure the link of your repository in the project, simply add in the scm
section of your pom.xml
.