Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugins</artifactId>
<version>39</version>
<version>40</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -68,10 +68,6 @@ under the License.

<properties>
<mavenVersion>3.2.5</mavenVersion>
<!--
! The following property is used in the integration tests MCOMPILER-157
-->
<mavenPluginPluginVersion>3.5</mavenPluginPluginVersion>
<plexusCompilerVersion>2.13.0</plexusCompilerVersion>

<groovyVersion>2.4.21</groovyVersion>
Expand Down Expand Up @@ -180,6 +176,13 @@ under the License.
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- used by maven-plugin-testing-harness -->
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down Expand Up @@ -208,22 +211,27 @@ under the License.
</repositories>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<java>
<includes>
<include>src/**/*.java</include>
</includes>
</java>
</configuration>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<java>
<includes>
<include>src/**/*.java</include>
</includes>
</java>
</configuration>
</plugin>
</plugins>
</build>

Expand All @@ -236,8 +244,6 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<!-- TODO: verify the version override is still needed when upgrading parent -->
<version>3.5.0</version>
<executions>
<execution>
<id>integration-test</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,17 +382,9 @@ private TestCompilerMojo getTestCompilerMojo(CompilerMojo compilerMojo, String p
when(handler.isAddedToClasspath()).thenReturn(true);
when(junitArtifact.getArtifactHandler()).thenReturn(handler);

File artifactFile;
String localRepository = System.getProperty("localRepository");
if (localRepository != null) {
artifactFile = new File(localRepository, "junit/junit/3.8.1/junit-3.8.1.jar");
} else {
// for IDE
String junitURI =
org.junit.Test.class.getResource("Test.class").toURI().toString();
junitURI = junitURI.substring("jar:".length(), junitURI.indexOf('!'));
artifactFile = new File(URI.create(junitURI));
}
String junitURI = org.junit.Test.class.getResource("Test.class").toURI().toString();
junitURI = junitURI.substring("jar:".length(), junitURI.indexOf('!'));
File artifactFile = new File(URI.create(junitURI));
when(junitArtifact.getFile()).thenReturn(artifactFile);

testClasspathList.add(artifactFile.getAbsolutePath());
Expand Down