Skip to content

Commit

Permalink
Removed unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
juulhobert committed Mar 15, 2024
1 parent 45f4360 commit 127c964
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
public class EffectivePomMojo
extends AbstractEffectiveMojo
{

// ----------------------------------------------------------------------
// Mojo parameters
// ----------------------------------------------------------------------
Expand Down Expand Up @@ -102,7 +101,6 @@ public class EffectivePomMojo

/**
* Output POM input location as comments.
*
* @since 3.2.0
*/
@Parameter( property = "verbose", defaultValue = "false" )
Expand All @@ -115,9 +113,7 @@ public class EffectivePomMojo
// Public methods
// ----------------------------------------------------------------------

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public void execute()
throws MojoExecutionException
{
Expand Down Expand Up @@ -219,7 +215,6 @@ private void writeEffectivePom( MavenProject project, XMLWriter writer )
Model pom = project.getModel();
cleanModel( pom );

// TODO: Rewrite
inputLocationFormatter = InputLocationFormatterFactory.produce( getLog(), project );

StringWriter sWriter = new StringWriter();
Expand Down Expand Up @@ -297,19 +292,19 @@ private static void cleanModel( Model pom )
private void warnWriteMavenXpp3WriterEx( Throwable t )
{
getLog().warn( "Unexpected exception while running Maven Model Extended Writer, "
+ "falling back to old internal implementation.", t );
+ "falling back to old internal implementation.", t );
}

private boolean writeMavenXpp3WriterEx( Writer writer, MavenProject project, Model model )
throws IOException
throws IOException
{
try
{
Class<?> mavenXpp3WriterExClass = Class.forName( "org.apache.maven.model.io.xpp3.MavenXpp3WriterEx" );
Object mavenXpp3WriterEx = mavenXpp3WriterExClass.getDeclaredConstructor().newInstance();

Method setStringFormatter =
mavenXpp3WriterExClass.getMethod( "setStringFormatter", InputLocation.StringFormatter.class );
mavenXpp3WriterExClass.getMethod( "setStringFormatter", InputLocation.StringFormatter.class );
setStringFormatter.invoke( mavenXpp3WriterEx, inputLocationFormatter );

Method write = mavenXpp3WriterExClass.getMethod( "write", Writer.class, Model.class );
Expand Down Expand Up @@ -345,7 +340,7 @@ else if ( e.getTargetException() instanceof RuntimeException )
* Xpp3 extended writer extension to improve default InputSource display
*/
private static class EffectiveWriterExOldSupport
extends MavenXpp3WriterExOldSupport
extends MavenXpp3WriterExOldSupport
{
private final InputLocation.StringFormatter inputLocationFormatter;

Expand Down

0 comments on commit 127c964

Please sign in to comment.