You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gb...@apache.org on 2017/06/26 21:26:09 UTC
svn commit: r1799997 - in /maven/enforcer/trunk: ./ enforcer-rules/
maven-enforcer-plugin/ maven-enforcer-plugin/src/it/projects/display-info/
maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/
Author: gboue
Date: Mon Jun 26 21:26:08 2017
New Revision: 1799997
URL: http://svn.apache.org/viewvc?rev=1799997&view=rev
Log:
Remove usage of commons-lang in the project, to only have commons-lang3 on the classpath. In DisplayInfoMojo, we can simply get the Java version from the system properties.
Added:
maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/
maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/pom.xml (with props)
maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/verify.groovy (with props)
Modified:
maven/enforcer/trunk/enforcer-rules/pom.xml
maven/enforcer/trunk/maven-enforcer-plugin/pom.xml
maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java
maven/enforcer/trunk/pom.xml
Modified: maven/enforcer/trunk/enforcer-rules/pom.xml
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/pom.xml?rev=1799997&r1=1799996&r2=1799997&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/pom.xml (original)
+++ maven/enforcer/trunk/enforcer-rules/pom.xml Mon Jun 26 21:26:08 2017
@@ -61,7 +61,6 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
- <version>3.5</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
Modified: maven/enforcer/trunk/maven-enforcer-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/pom.xml?rev=1799997&r1=1799996&r2=1799997&view=diff
==============================================================================
--- maven/enforcer/trunk/maven-enforcer-plugin/pom.xml (original)
+++ maven/enforcer/trunk/maven-enforcer-plugin/pom.xml Mon Jun 26 21:26:08 2017
@@ -56,10 +56,6 @@
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer-api</artifactId>
</dependency>
Added: maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/pom.xml
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/pom.xml?rev=1799997&view=auto
==============================================================================
--- maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/pom.xml (added)
+++ maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/pom.xml Mon Jun 26 21:26:08 2017
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.its.enforcer</groupId>
+ <artifactId>display-info</artifactId>
+ <version>1.0</version>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>@project.version@</version>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>display-info</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/verify.groovy
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/verify.groovy?rev=1799997&view=auto
==============================================================================
--- maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/verify.groovy (added)
+++ maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/verify.groovy Mon Jun 26 21:26:08 2017
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+assert buildLog.text.contains( 'Maven Version:' )
+assert buildLog.text.contains( 'JDK Version:' )
Propchange: maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/verify.groovy
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/enforcer/trunk/maven-enforcer-plugin/src/it/projects/display-info/verify.groovy
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java?rev=1799997&r1=1799996&r2=1799997&view=diff
==============================================================================
--- maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java (original)
+++ maven/enforcer/trunk/maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/DisplayInfoMojo.java Mon Jun 26 21:26:08 2017
@@ -19,7 +19,6 @@ package org.apache.maven.plugins.enforce
* under the License.
*/
-import org.apache.commons.lang.SystemUtils;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecution;
@@ -80,9 +79,10 @@ public class DisplayInfoMojo
throws MojoExecutionException
{
String mavenVersion = session.getSystemProperties().getProperty( "maven.version" );
+ String javaVersion = System.getProperty( "java.version" );
getLog().info( "Maven Version: " + mavenVersion );
- getLog().info( "JDK Version: " + SystemUtils.JAVA_VERSION + " normalized as: "
- + RequireJavaVersion.normalizeJDKVersion( SystemUtils.JAVA_VERSION_TRIMMED ) );
+ getLog().info( "JDK Version: " + javaVersion + " normalized as: "
+ + RequireJavaVersion.normalizeJDKVersion( javaVersion ) );
RequireOS os = new RequireOS();
os.displayOSInfo( getLog(), true );
}
Modified: maven/enforcer/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/pom.xml?rev=1799997&r1=1799996&r2=1799997&view=diff
==============================================================================
--- maven/enforcer/trunk/pom.xml (original)
+++ maven/enforcer/trunk/pom.xml Mon Jun 26 21:26:08 2017
@@ -129,9 +129,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.5</version> <!-- commons-lang3 >= 3.6 require at least Java 7 -->
</dependency>
<dependency>
<groupId>commons-codec</groupId>