Skip to content

Commit 5e641bb

Browse files
committed
Pass system properties to build sub-modules in release mojo
1 parent 644aa2a commit 5e641bb

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Version 2.5.0 (2017-07-30)
1+
# Version 2.5.0 (2017-08-02)
22

33
* [new] Colorized, interactive prompter thanks to [ConsoleUI](https://github.com/awegmann/consoleui).
44
* [new] Supports [Pebble](http://www.mitchellbosecke.com/pebble/home) template language in archetypes.

pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,24 @@
196196
<version>${maven.version}.0</version>
197197
<scope>provided</scope>
198198
</dependency>
199+
<dependency>
200+
<groupId>org.apache.maven</groupId>
201+
<artifactId>maven-model</artifactId>
202+
<version>${maven.version}.0</version>
203+
<scope>provided</scope>
204+
</dependency>
205+
<dependency>
206+
<groupId>org.apache.maven</groupId>
207+
<artifactId>maven-plugin-api</artifactId>
208+
<version>${maven.version}.0</version>
209+
<scope>provided</scope>
210+
</dependency>
211+
<dependency>
212+
<groupId>org.apache.maven</groupId>
213+
<artifactId>maven-artifact</artifactId>
214+
<version>${maven.version}.0</version>
215+
<scope>provided</scope>
216+
</dependency>
199217
<dependency>
200218
<groupId>org.apache.maven.archetype</groupId>
201219
<artifactId>archetype-common</artifactId>

src/license/THIRD-PARTY.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Please fill the missing licenses for dependencies :
1414
#
1515
#
16-
#Thu Jul 27 11:38:29 CEST 2017
16+
#Wed Aug 02 14:38:38 CEST 2017
1717
classworlds--classworlds--1.1-alpha-2=
1818
commons-collections--commons-collections--3.1=
1919
dom4j--dom4j--1.6.1=

src/main/java/org/seedstack/maven/ReleaseMojo.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@
3030
import java.util.Set;
3131
import java.util.TreeSet;
3232

33-
import static org.twdata.maven.mojoexecutor.MojoExecutor.*;
33+
import static org.twdata.maven.mojoexecutor.MojoExecutor.artifactId;
34+
import static org.twdata.maven.mojoexecutor.MojoExecutor.configuration;
35+
import static org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo;
36+
import static org.twdata.maven.mojoexecutor.MojoExecutor.executionEnvironment;
37+
import static org.twdata.maven.mojoexecutor.MojoExecutor.goal;
38+
import static org.twdata.maven.mojoexecutor.MojoExecutor.groupId;
39+
import static org.twdata.maven.mojoexecutor.MojoExecutor.plugin;
40+
import static org.twdata.maven.mojoexecutor.MojoExecutor.version;
3441

3542
/**
3643
* Release the project simply by stripping the -SNAPSHOT part of the version.
@@ -238,6 +245,7 @@ private MavenProject getLocalRoot(MavenProject project) {
238245

239246
private MavenProject buildProject(File moduleProjectFile) throws ProjectBuildingException {
240247
DefaultProjectBuildingRequest request = new DefaultProjectBuildingRequest();
248+
request.setSystemProperties(System.getProperties());
241249
request.setRepositorySession(executionMavenProject.getProjectBuildingRequest().getRepositorySession());
242250
return projectBuilder.build(moduleProjectFile, request).getProject();
243251
}

0 commit comments

Comments
 (0)