Create a Bamboo Specs project using Maven Archetype
You can create Bamboo Specs projects using our Maven Archetype.
Basic usage
You can quickly create a basic Bamboo Specs project using the following command:
mvn archetype:generate -DarchetypeGroupId=com.atlassian.bamboo -DarchetypeArtifactId=bamboo-specs-archetype \
-DarchetypeVersion=6.0.0
This command runs in the interactive mode. You will be asked to provide the following parameters for the project:
- groupId
- artifactId
- a version
- a package prefix
The command creates a directory that has the name specified in the artifactId parameter.
You can also run the command in the batch mode and provide all necessary parameters:
mvn archetype:generate -B \
-DarchetypeGroupId=com.atlassian.bamboo -DarchetypeArtifactId=bamboo-specs-archetype \
-DarchetypeVersion=6.0.0 \
-DgroupId=com.my.company -DartifactId=my-bamboo-casc -Dversion=1.0.0 -Dpackage=com.my.company
Additional options
- -Dtemplate=minimal - creates a minimal template (with no repositories, stages, or artifacts)
Importing created project into IDE
You can easily import the project into IDE, such as Eclipse or IntelliJ IDEA.
Troubleshooting
Unable to add module
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.0:generate
(default-cli) on project p4:
org.apache.maven.archetype.exception.InvalidPackaging:
Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1]
The archetype found pom.xml file in the current directory and failed to add the module to it.
Run the archetype from a directory which does not contain the pom.xml file.
See next: Best practices