Skip to content

Commit 9ed7e16

Browse files
Cleanup build
- use plugin versions and configurations from parent pom - override links in documentation for multimodule project - show log of invoker executing only if fail
1 parent ef48381 commit 9ed7e16

File tree

7 files changed

+46
-70
lines changed

7 files changed

+46
-70
lines changed

mrm-maven-plugin/pom.xml

+11-33
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,6 @@
3434
<maven>${mavenVersion}</maven>
3535
</prerequisites>
3636

37-
<build>
38-
<plugins>
39-
<plugin>
40-
<groupId>org.apache.maven.plugins</groupId>
41-
<artifactId>maven-plugin-plugin</artifactId>
42-
<executions>
43-
<execution>
44-
<id>mojo-descriptor</id>
45-
<goals>
46-
<goal>descriptor</goal>
47-
</goals>
48-
</execution>
49-
</executions>
50-
<configuration>
51-
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
52-
</configuration>
53-
</plugin>
54-
<plugin>
55-
<groupId>org.apache.maven.plugins</groupId>
56-
<artifactId>maven-invoker-plugin</artifactId>
57-
<configuration>
58-
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
59-
<projectsDirectory>src/it</projectsDirectory>
60-
<goals>
61-
<goal>verify</goal>
62-
</goals>
63-
</configuration>
64-
</plugin>
65-
</plugins>
66-
</build>
67-
6837
<dependencies>
6938
<dependency>
7039
<groupId>org.codehaus.mojo</groupId>
@@ -152,6 +121,17 @@
152121
<plugin>
153122
<groupId>org.apache.maven.plugins</groupId>
154123
<artifactId>maven-invoker-plugin</artifactId>
124+
<configuration>
125+
<projectsDirectory>src/it</projectsDirectory>
126+
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
127+
<showErrors>true</showErrors>
128+
<settingsFile>src/it/settings.xml</settingsFile>
129+
<postBuildHookScript>verify</postBuildHookScript>
130+
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
131+
<goals>
132+
<goal>verify</goal>
133+
</goals>
134+
</configuration>
155135
<executions>
156136
<execution>
157137
<id>integration-test</id>
@@ -160,9 +140,7 @@
160140
<goal>run</goal>
161141
</goals>
162142
<configuration>
163-
<streamLogs>true</streamLogs>
164143
<debug>false</debug>
165-
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
166144
</configuration>
167145
</execution>
168146
</executions>

mrm-maven-plugin/src/it/custom-base-path/pom.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
<mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
3434
</filterProperties>
3535
<postBuildHookScript>verify</postBuildHookScript>
36-
<streamLogs>true</streamLogs>
37-
<goal>verify</goal>
36+
<streamLogsOnFailures>true</streamLogsOnFailures>
37+
<goals>
38+
<goal>verify</goal>
39+
</goals>
3840
</configuration>
3941
</plugin>
4042
<plugin>

mrm-maven-plugin/src/it/hostedrepo/pom.xml

+5-3
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
<mrm.repository.url>${mrm.repository.url}</mrm.repository.url>
3333
</filterProperties>
3434
<postBuildHookScript>verify</postBuildHookScript>
35-
<streamLogs>true</streamLogs>
36-
<goal>verify</goal>
35+
<streamLogsOnFailures>true</streamLogsOnFailures>
36+
<goals>
37+
<goal>verify</goal>
38+
</goals>
3739
</configuration>
3840
</plugin>
3941
<plugin>
@@ -67,4 +69,4 @@
6769
</plugin>
6870
</plugins>
6971
</build>
70-
</project>
72+
</project>

mrm-maven-plugin/src/it/settings.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ under the License.
2323
<profiles>
2424
<profile>
2525
<id>it-repo</id>
26-
<activation>
27-
<activeByDefault>true</activeByDefault>
28-
</activation>
2926
<repositories>
3027
<repository>
3128
<id>local.central</id>
@@ -52,4 +49,7 @@ under the License.
5249
</pluginRepositories>
5350
</profile>
5451
</profiles>
52+
<activeProfiles>
53+
<activeProfile>it-repo</activeProfile>
54+
</activeProfiles>
5555
</settings>

mrm-maven-plugin/src/main/java/org/codehaus/mojo/mrm/plugin/AbstractStartMojo.java

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public abstract class AbstractStartMojo
4949
* <p>
5050
* If {@code basePath} is set to e.g. {@code foo/bar} then {@code org.acme:my-artifact:pom:1.2.3} will be served
5151
* under {@code http://localhost:<port>/foo/bar/org/acme/my-artifact/1.2.3/my-artifact-1.2.3.pom}.
52+
*
53+
* @since 1.4.0
5254
*/
5355
@Parameter( property = "mrm.basePath", defaultValue = "/" )
5456
private String basePath;

pom.xml

+10-29
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@
3535
Mock Repository Manager for Maven. The Mock Repository Manager provides a mock Maven
3636
repository manager.
3737
</description>
38+
<url>https://www.mojohaus.org/mrm</url>
3839
<inceptionYear>2009</inceptionYear>
40+
3941
<licenses>
4042
<license>
4143
<name>The Apache Software License, Version 2.0</name>
42-
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
44+
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
4345
<distribution>repo</distribution>
4446
</license>
4547
</licenses>
@@ -73,16 +75,20 @@
7375
<scm>
7476
<connection>scm:git:https://github.com/mojohaus/mrm.git</connection>
7577
<developerConnection>scm:git:ssh://git@github.com/mojohaus/mrm.git</developerConnection>
76-
<url>https://github.com/mojohaus/mrm</url>
78+
<url>https://github.com/mojohaus/mrm/tree/master</url>
7779
<tag>HEAD</tag>
7880
</scm>
7981
<issueManagement>
8082
<system>GitHub</system>
8183
<url>https://github.com/mojohaus/mrm/issues</url>
8284
</issueManagement>
85+
<ciManagement>
86+
<system>GitHub</system>
87+
<url>https://github.com/mojohaus/mrm/actions</url>
88+
</ciManagement>
8389

8490
<properties>
85-
<scmpublish.content>target/staging/mrm</scmpublish.content>
91+
<scmpublish.content>${project.build.directory}/staging/mrm</scmpublish.content>
8692
<mavenVersion>2.2.1</mavenVersion>
8793
<mojo.java.target>1.8</mojo.java.target>
8894
<jetty.version>9.4.46.v20220331</jetty.version>
@@ -179,31 +185,18 @@
179185
<build>
180186
<pluginManagement>
181187
<plugins>
182-
<plugin>
183-
<groupId>org.apache.maven.plugins</groupId>
184-
<artifactId>maven-scm-publish-plugin</artifactId>
185-
<configuration>
186-
<content>${project.build.directory}/staging/mrm</content>
187-
</configuration>
188-
</plugin>
189188
<plugin>
190189
<groupId>org.eclipse.jetty</groupId>
191190
<artifactId>jetty-maven-plugin</artifactId>
192191
<version>${jetty.version}</version>
193192
</plugin>
194-
<plugin>
195-
<artifactId>maven-release-plugin</artifactId>
196-
<configuration>
197-
<autoVersionSubmodules>true</autoVersionSubmodules>
198-
</configuration>
199-
</plugin>
200193
</plugins>
201194
</pluginManagement>
195+
202196
<plugins>
203197
<plugin>
204198
<groupId>org.apache.maven.plugins</groupId>
205199
<artifactId>maven-enforcer-plugin</artifactId>
206-
<version>3.1.0</version>
207200
<executions>
208201
<execution>
209202
<id>enforce-java</id>
@@ -239,18 +232,6 @@
239232
</execution>
240233
</executions>
241234
</plugin>
242-
<plugin>
243-
<groupId>org.apache.maven.plugins</groupId>
244-
<artifactId>maven-invoker-plugin</artifactId>
245-
<configuration>
246-
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
247-
<showErrors>true</showErrors>
248-
<streamLogs>true</streamLogs>
249-
<settingsFile>src/it/settings.xml</settingsFile>
250-
<postBuildHookScript>verify</postBuildHookScript>
251-
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
252-
</configuration>
253-
</plugin>
254235
<plugin>
255236
<groupId>org.apache.maven.plugins</groupId>
256237
<artifactId>maven-site-plugin</artifactId>

src/site/site.xml

+11
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919
<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2020
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd"
2121
name="Mock Repository Manager">
22+
23+
<custom>
24+
<fluidoSkin>
25+
<gitHub>
26+
<projectId>mojohaus/mrm</projectId>
27+
<ribbonOrientation>right</ribbonOrientation>
28+
<ribbonColor>gray</ribbonColor>
29+
</gitHub>
30+
</fluidoSkin>
31+
</custom>
32+
2233
<body>
2334
<menu ref="parent" inherit="top"/>
2435

0 commit comments

Comments
 (0)