Create a Bamboo Specs project using Maven Archetype

 

You can create Bamboo Specs projects using our Maven Archetype.

 


 

On this page

 


 

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

 

追加オプション

  • -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.

 

How to import into Eclipse ...
  1. Run Eclipse.
  2. From the main menu, select File > Import...
  3. In the Import dialog, click  Maven > Existing Maven Projects and click Next.
  4. Click Browse, select your folder, and click Open.
  5. Click Finish.
    Eclipse creates a new project and downloads necessary dependencies.
How to import into IntelliJ IDEA ...
  1. Run IntelliJ IDEA.
  2. From the main menu, click File > Open and select the pom.xml file.
  3. Click Open as Project.
    IntelliJ IDEA creates a new project and downloads necessary dependencies.

 

トラブルシューティング

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

最終更新日 2020 年 7 月 20 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.