It is recommended to use a sapi-nt-archetype module to generate new projects.
First thing is to make the epimorphics s3 repositories available in ${user.home}/.m2/settings.xml file like the following:
<settings>
...
<profiles>
...
<profile>
<id>myprofile</id>
<repositories>
<repository>
<id>epi-public-s3-snapshot</id>
<name>Epimorphics S3 snapshot repository</name>
<url>https://s3-eu-west-1.amazonaws.com/epi-repository/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>epi-public-s3-release</id>
<name>Epimorphics S3 release repository</name>
<url>https://s3-eu-west-1.amazonaws.com/epi-repository/release</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
...
</profiles>
<activeProfiles>
<activeProfile>myprofile</activeProfile>
</activeProfiles>
...
</settings>
You can now initialise a new sapi-nt project by running:
mvn archetype:generate -DarchetypeGroupId=com.epimorphics -DarchetypeArtifactId=sapi-nt-archetype -DarchetypeVersion={version}
Maven will download the sources and you will be prompted to enter a groupId, an artifactId, a version and a package.
After you entered all the necessary parameters a new project will be generated in a subdirectory named after the provided artifactId.
Here is an example:
$ mvn archetype:generate -DarchetypeGroupId=com.epimorphics -DarchetypeArtifactId=sapi-nt-archetype -DarchetypeVersion=0.1.1
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
Downloading from epi-public-s3-release: https://s3-eu-west-1.amazonaws.com/epi-repository/release/com/epimorphics/sapi-nt-archetype/0.1.1/sapi-nt-archetype-0.1.1.pom
Downloaded from epi-public-s3-release: https://s3-eu-west-1.amazonaws.com/epi-repository/release/com/epimorphics/sapi-nt-archetype/0.1.1/sapi-nt-archetype-0.1.1.pom (1.1 kB at 2.3 kB/s)
Downloading from epi-public-s3-release: https://s3-eu-west-1.amazonaws.com/epi-repository/release/com/epimorphics/sapi-nt/0.1.1/sapi-nt-0.1.1.pom
Downloaded from epi-public-s3-release: https://s3-eu-west-1.amazonaws.com/epi-repository/release/com/epimorphics/sapi-nt/0.1.1/sapi-nt-0.1.1.pom (7.4 kB at 47 kB/s)
Downloading from epi-public-s3-release: https://s3-eu-west-1.amazonaws.com/epi-repository/release/com/epimorphics/sapi-nt-archetype/0.1.1/sapi-nt-archetype-0.1.1.jar
Downloaded from epi-public-s3-release: https://s3-eu-west-1.amazonaws.com/epi-repository/release/com/epimorphics/sapi-nt-archetype/0.1.1/sapi-nt-archetype-0.1.1.jar (3.6 kB at 23 kB/s)
Define value for property 'groupId': com.company.project
Define value for property 'artifactId': new-api
Define value for property 'version' 1.0-SNAPSHOT: :
Define value for property 'package' com.company.project: :
Confirm properties configuration:
groupId: com.company.project
artifactId: new-api
version: 1.0-SNAPSHOT
package: com.company.project
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: sapi-nt-archetype:0.0.1-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.company.project
[INFO] Parameter: artifactId, Value: new-api
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.company.project
[INFO] Parameter: packageInPathFormat, Value: com/company/project
[INFO] Parameter: package, Value: com.company.project
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: groupId, Value: com.company.project
[INFO] Parameter: artifactId, Value: new-api
[INFO] Project created from Archetype in dir: /home/user/new-api
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:22 min
[INFO] Finished at: 2018-07-18T09:53:54+02:00
[INFO] Final Memory: 16M/212M
[INFO] ------------------------------------------------------------------------