-
Notifications
You must be signed in to change notification settings - Fork 34
Adding a new project to the SciJava POM
Including a project in pom-scijava is very beneficial. It means that a given pom-scijava version will be coupled with a specific version of that project, and by using the project.version properties, all consumers of pom-scijava will use only that version of the project.
There are several steps to include a project in pom-scijava, but they only need to be done once. The following tutorial will guide you through the process.
This tutorial assumes the project is a github project.
We will use these properties throughout the tutorial:
- PROPERTY
- GROUPID
- ARTIFACTID
- VERSION
- URL
- KEY_NAME
The GROUPID and ARTIFACTID come directly from your project's pom.xml.
VERSION refers to the latest deployed version, and is the first version that will be included in pom-scijava (e.g. the only time you will manually set the version).
PROPERTY is the prefix for your project's properties. For example, SciJava-common uses the property "scijava-common". Thus when referencing SciJava-common properties via pom-scijava, you can use "scijava-common.version" or "scijava-common.groupId". This value can be anything you choose, but should be appropriate and unique to your project, to avoid clashing with other properties.
URL is the github url of your project.
KEY_NAME is the short name you give to your deploy key (see step 2).
First make sure your pom-scijava is up to date.
In pom-scijava/pom.xml :
- Manually increase the minor
<version>
of the pom - e.g.1.32
goes to1.33
- In the
<properties>
block, find the position (alphabetically by PROPERTY) where your project belongs:- Add a comment block defining your project, e.g.
<!-- project name - URL -->
- Add a version entry of the form:
<PROPERTY.version>VERSION</PROPERTY.version>
- Add a comment block defining your project, e.g.
- In the
<dependencyManagement>
block, find the position (alphabetically by PROPERTY) where your project belongs:- Add a comment block defining your project, e.g.
<!-- project name - URL -->
- Add a
<dependency>
entry of the form:<dependency> <groupId>your.group.id</groupId> <artifactId>your-artifact-id</artifactId> <version>${PROPERTY.version}</version> </dependency>
- Add a comment block defining your project, e.g.
Save and commit your changes.
Submit a Pull Request to merge your changes.