-
Notifications
You must be signed in to change notification settings - Fork 142
Editing Maven tips
##Versioning Each tool (module) of the cogcomp-nlp project will inherit the same version number from the parent module.
Related to issue #6, we can use the following maven code to automatically augment the version for the parent and all components (including internal dependencies like core-utilities:
mvn versions:set -DnewVersion=X.Y.Z
mvn version:commit
If you made a mistake after versions:set
, do
mvn versions:revert
If you need to make sure that your Maven dependencies are up to date, check out (the Versions Maven Plugin)[http://www.mojohaus.org/]. Calling the following command will display a list of dependencies with newer versions available:
mvn versions:display-dependency-updates
Furthermore, you can use the
versions:use-latest-versions
or
versions:use-latest-releases
to automatically advance to the latest version of your updates (releases only searches for non-SNAPSHOT versions)
If you want the deployment script not to bother you next time you deploy, add the following options to the settings.xml
:
<servers>
<server>
<id>CogcompSoftware</id>
<username>NETID</username>
<password>PASSWORD</password>
</server>
<server>
<id>CogcompSoftwareDoc</id>
<username>NETID</username>
<password>PASSWORD</password>
</server>
</servers>
This is for deploying a maven project with a new version while changing the version name in all project modules for example to 1.0.3-SNAPSHOT
. This is useful for testing the underlying maven projects such as lbjava which are not a module of our multi project but we often need to work on them/change them.
mvn versions:set -DnewVersion=1.0.3-SNAPSHOT
mvn install