Skip to content

A basic setup for all maven projects containing a build and tools for java.

License

Notifications You must be signed in to change notification settings

BetonQuest/MavenSetup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MavenSetup

A basic setup for all maven projects containing building and tools for java.

Howto setup

  1. Add the following to your pom.xml:
    <project>
        <parent>
            <groupId>org.betonquest</groupId>
            <artifactId>parent</artifactId>
            <version>X.Y.Z</version>
        </parent>
    
        <repositories>
            <repository>
                <id>betonquest-repo</id>
                <url>https://nexus.betonquest.org/repository/betonquest/</url>
            </repository>
        </repositories> 
    </project>

Maven Wrapper Note

As this setup enforces a minimum maven version, it is not guaranteed that the maven version you have installed on your system is compatible with the project. For that, a maven wrapper is recommended to be used.

It is strongly recommended to use the wrapper in any automated build process, as it ensures that the correct maven version is used.

Update versions

To update the versions of all dependencies that are on a release version, use the following commands:

./mvnw --projects :parent,:versions clean -DgenerateBackupPoms=false versions:update-properties

To update the versions of all dependencies that are on a snapshot version, use the following commands:

./mvnw --projects :parent,:versions -DgenerateBackupPoms=false versions:unlock-snapshots versions:lock-snapshots

Bump version

To bump the version of the project, use the following commands to interactively set the new version:

read -e -i "$(./mvnw help:evaluate -Dexpression=revision --quiet -DforceStdout)" -p 'new version: ' -r NEW_VERSION

Then set the new version:

if [ -n "$$NEW_VERSION" ]; then ./mvnw versions:set-property -DgenerateBackupPoms=false -Dproperty=revision -DnewVersion=$NEW_VERSION; fi

About

A basic setup for all maven projects containing a build and tools for java.

Resources

License

Stars

Watchers

Forks

Packages

No packages published