Skip to content

Commit 3ba14e2

Browse files
authored
Merge pull request #80 from TexasDigitalLibrary/more-pom-fixes
Fixes problem with release profile not getting enabled with -Drelease flag
2 parents 89d32b9 + 3677075 commit 3ba14e2

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

pom.xml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,6 @@
171171
<groupId>org.apache.maven.plugins</groupId>
172172
<artifactId>maven-javadoc-plugin</artifactId>
173173
<version>3.11.2</version>
174-
<executions>
175-
<execution>
176-
<id>attach-javadocs</id>
177-
<goals>
178-
<goal>jar</goal>
179-
</goals>
180-
</execution>
181-
</executions>
182174
<configuration>
183175
<!-- Never fail a build based on Javadoc errors -->
184176
<failOnError>false</failOnError>
@@ -200,11 +192,13 @@
200192
</pluginManagement>
201193
<plugins>
202194
<plugin>
195+
<!-- Specify our settings for new releases via 'mvn release:*' -->
203196
<groupId>org.apache.maven.plugins</groupId>
204197
<artifactId>maven-release-plugin</artifactId>
205198
<version>3.1.1</version>
206199
<configuration>
207-
<!-- During release:perform, enable the "release" profile (see below) -->
200+
<!-- During release:prepare and release:perform, pass the "release" property to enable the
201+
"release" profile (and enable/disable other profiles based on whether they need releasing) -->
208202
<arguments>-Drelease</arguments>
209203
<goals>deploy</goals>
210204
<!-- Suggest tagging the release in SCM as "dspace-[version]" -->
@@ -244,11 +238,17 @@
244238
to actually perform an dspace-replicate release to Maven central.
245239
This profile contains settings which are ONLY enabled when performing
246240
a DSpace module release. See also https://wiki.lyrasis.org/display/DSPACE/Release+Procedure
241+
NOTE: You MUST trigger this profile by running "-Drelease"
242+
(as that flag also triggers other modules to be enabled/disabled as necessary for release)
247243
-->
248244
<profile>
249245
<id>release</id>
250246
<activation>
251247
<activeByDefault>false</activeByDefault>
248+
<!-- Enable this profile if we are doing a release (-Drelease) -->
249+
<property>
250+
<name>release</name>
251+
</property>
252252
</activation>
253253
<build>
254254
<plugins>
@@ -284,8 +284,21 @@
284284
</execution>
285285
</executions>
286286
</plugin>
287+
<!-- For new releases, generate JavaDocs -->
288+
<plugin>
289+
<groupId>org.apache.maven.plugins</groupId>
290+
<artifactId>maven-javadoc-plugin</artifactId>
291+
<executions>
292+
<execution>
293+
<id>attach-javadocs</id>
294+
<goals>
295+
<goal>jar</goal>
296+
</goals>
297+
</execution>
298+
</executions>
299+
</plugin>
287300
<!-- Sign any new releases via GPG.
288-
NOTE: you may optionall specify the "gpg.passphrase" in your settings.xml -->
301+
NOTE: you may optionally specify the "gpg.passphrase" in your settings.xml -->
289302
<plugin>
290303
<groupId>org.apache.maven.plugins</groupId>
291304
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)