Skip to content

Commit

Permalink
[MSITE-884] Drop/replace usage of Commons Lang 3
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Apr 16, 2022
1 parent af097dc commit 8382743
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,6 @@ under the License.
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.8.1</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
* under the License.
*/

import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.utils.StringUtils;

/**
* Abstract base class for staging mojos.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/

import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.model.Build;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginManagement;
Expand All @@ -30,6 +29,7 @@
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.utils.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* under the License.
*/

import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.maven.doxia.site.decoration.DecorationModel;
import org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Writer;
import org.apache.maven.plugin.MojoExecutionException;
Expand Down Expand Up @@ -117,9 +116,7 @@ protected static void writeHeader( XMLWriter writer )
{
XmlWriterUtil.writeCommentLineBreak( writer );
XmlWriterUtil.writeComment( writer, " " );
// Use ISO 8601 format for date and time
String formattedDateTime = DateFormatUtils.ISO_DATETIME_FORMAT.format( System.currentTimeMillis() );
XmlWriterUtil.writeComment( writer, "Generated by Maven Site Plugin on " + formattedDateTime );
XmlWriterUtil.writeComment( writer, "Generated by Maven Site Plugin" );
XmlWriterUtil.writeComment( writer, "See: http://maven.apache.org/plugins/maven-site-plugin/" );
XmlWriterUtil.writeComment( writer, " " );
XmlWriterUtil.writeCommentLineBreak( writer );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* under the License.
*/

import org.apache.commons.lang3.SystemUtils;

import java.util.HashMap;
import java.util.Map;

Expand All @@ -41,12 +39,12 @@ class HttpRequest
public String toString()
{
StringBuilder sb = new StringBuilder( method ).append( " path " ).append( path )
.append( SystemUtils.LINE_SEPARATOR );
.append( System.lineSeparator() );
for ( Map.Entry<String, String> entry : headers.entrySet() )
{
sb.append( entry.getKey() ).append( " : " ).append( entry.getValue() )
.append( SystemUtils.LINE_SEPARATOR );
.append( System.lineSeparator() );
}
return sb.toString();
}
}
}

0 comments on commit 8382743

Please # to comment.