@@ -19,170 +19,9 @@ For more information about Maven, see:
1919* [ Learning Maven] ( http://developer.imagej.net/learning-maven )
2020* [ Maven FAQ] ( http://wiki.imagej.net/Maven_-_Frequently_Asked_Questions )
2121
22- Adding a new project to pom-scijava
23- ===================================
24-
25- Including a project in pom-scijava is very beneficial. It means that a
26- given pom-scijava version will be coupled with a specific version of
27- that project, and by using the project.version properties, all
28- consumers of pom-scijava will use only that version of the project.
29-
30- It also minimizes bookkeeping, as whenever we run the Jenkins
31- Bump-POM-SciJava job, the version property for each project is
32- automatically updated to the latest release. By having a version property,
33- there is no need to go through downstream projects updating their
34- dependencies - a process that only invites mistakes.
35-
36- There are several steps to include a project in pom-scijava, but they
37- only need to be done once. The following tutorial will guide you through
38- the process.
39-
40- Preface
41- -------
42-
43- This tutorial assumes the project is a github project.
44-
45- We will use these properties throughout the tutorial:
46-
47- * PROPERTY
48- * GROUPID
49- * ARTIFACTID
50- * VERSION
51- * URL
52- * KEY_NAME
53-
54- The GROUPID and ARTIFACTID come directly from your project's pom.xml.
55-
56- VERSION refers to the latest deployed version, and is the first version
57- that will be included in pom-scijava (e.g. the only time you will manually set the version).
58-
59- PROPERTY is the prefix for your project's properties. For example, SciJava-common
60- uses the property "scijava-common". Thus when referencing SciJava-common properties via
61- pom-scijava, you can use "scijava-common.version" or "scijava-common.groupId". This value
62- can be anything you choose, but should be appropriate and unique to your project, to avoid
63- clashing with other properties.
64-
65- URL is the github url of your project.
66-
67- KEY_NAME is the short name you give to your deploy key (see step 2).
68-
69- 1 - Create a deploy key
70- -----------------
71-
72- First, as the jenkins user on dev.loci.wisc.edu, run:
73-
74- ```
75- ~/bin/add-github-deploy-key.sh KEY_NAME
76- ```
77-
78- to generate a SSH public/private key pair. Copy the public key fingerprint from
79- this script's output for use later.
80-
81- You will need to add this key in github to allow Jenkins access to your
82- project. See the [ github help
83- page] ( https://help.github.com/articles/managing-deploy-keys ) for instructions
84- on setting up a deploy key. Use the following settings for your deploy key:
85-
86- 87- * Key: paste the public key fingerprint you copied earlier
88-
89- Click "Add key" and go to the next step!
90-
91- 2 - Update Pom-SciJava
92- ----------------------
93-
94- First make sure your SciJava-common is up to date.
95-
96- In pom-scijava/pom.xml :
97-
98- * Manually increase the minor ``` <version> ``` of the pom - e.g. ``` 1.32 ``` goes to ``` 1.33 ```
99- * Find the ``` <properties> ``` block:
100- * Add a comment block defining your project, e.g.
101- ```
102- <!-- project name - URL -->
103- ```
104- * If your project's groupId is not already defined, add an entry of the form:
105- ```
106- <PROPERTY.groupId>GROUPID</PROPERTY.groupId>
107- ```
108- * Add a version entry of the form:
109- ```
110- <PROPERTY.version>VERSION</PROPERTY.version>
111- ```
112-
113- Save and commit your changes.
114-
115- 3 - Update bump-pom-scijava.sh
116- ------------------------------
117-
118- Again in the SciJava-common repository, edit the file:
119-
120- bin/bump.pom-scijava.sh
121-
122- There are two changes to make.
123-
124- * First, search for:
125-
126- ```
127- test "a--default-properties"
128- ```
129-
130- In the following "set" block, add the line:
131-
132- ```
133- PROPERTY.version --latest
134- ```
135-
136- NB: Make sure all lines except the last of the set block are terminated with a backslash ('\') character.
137-
138- * Second, search for:
139-
140- ```
141- if test "a--latest" = "a$value"
142- ```
143-
144- In the following "then" block, add the lines:
145-
146- ```
147- PROPERTY.version)
148- ga=GROUPID:ARTIFACTID
149- ;;
150- ```
151-
152- To ensure the bump-pom-scijava script sets the gav correctly for your project.
153-
154- Save and commit your changes.
155-
156- 4 - Update Jenkins
157- ------------------
158-
159- You will need someone to configure the [Bump-POM-SciJava](http://jenkins.imagej.net/view/SciJava/job/Bump-POM-SciJava/) job
160- for you, if you do not have the rights to do so yourself.
161-
162- Two changes need to be added here:
163-
164- * First, in the Parameter section, use "Add Parameter -> Boolean Value". Name it "UPDATE_PROJECT" as appropriate for your
165- project.
166-
167- * Second, in the Build section under "Execute shell", search for:
168-
169- ```
170- CHILDREN=
171- ```
172-
173- At the end of this block, add these two lines:
174-
175- ```
176- test true != "$UPDATE_PROJECT" ||
177- CHILDREN="$CHILDREN KEY_NAME:URL"
178- ```
179-
180- That's it! The next time Bump-POM-SciJava is run, there will be a check box for
181- your project (however you named the UPDATE_PROJECT variable). Regardless if
182- this box is checked or not, the base pom-scijava version for your project will
183- be updated to the latest released. If the box is checked for a given project,
184- then that project's parent pom will also be updated to the latest pom-scijava
185- version.
186-
22+ ## Documentation
18723
24+ The pom-scijava wiki contains more detailed documentation on several
25+ topics:
18826
27+ * [ Adding a new project to the SciJava POM] ( https://github.com/scijava/pom-scijava/wiki/Adding-a-new-project-to-the-SciJava-POM )
0 commit comments