re-import sources as agreed with the maintainer
This commit is contained in:
parent
cd3ced290d
commit
9b4d330b04
9
.gitignore
vendored
9
.gitignore
vendored
@ -1 +1,8 @@
|
||||
SOURCES/maven-plugin-tools-3.5.1-source-release.zip
|
||||
maven-plugin-tools-2.1-src.tar.gz
|
||||
maven-plugin-tools-2.6.tar.xz
|
||||
maven-plugin-tools-2.7-source-release.zip
|
||||
/maven-plugin-tools-3.1-source-release.zip
|
||||
/maven-plugin-tools-3.3-source-release.zip
|
||||
/maven-plugin-tools-3.4-source-release.zip
|
||||
/maven-plugin-tools-3.5-source-release.zip
|
||||
/maven-plugin-tools-3.5.1-source-release.zip
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
From 4d7b7bbd40fb82ef78f0a27135a8dc9075d132ea Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Mon, 27 Apr 2020 12:52:15 +0200
|
||||
Subject: [PATCH 1/3] Disable help MOJO generation
|
||||
|
||||
---
|
||||
.../plugin/plugin/HelpGeneratorMojo.java | 20 +------------------
|
||||
.../generator/PluginDescriptorGenerator.java | 11 ----------
|
||||
2 files changed, 1 insertion(+), 30 deletions(-)
|
||||
|
||||
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
|
||||
index 767567b..1004867 100644
|
||||
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
|
||||
+++ b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/HelpGeneratorMojo.java
|
||||
@@ -28,8 +28,6 @@ import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||
import org.apache.maven.tools.plugin.generator.Generator;
|
||||
-import org.apache.maven.tools.plugin.generator.PluginHelpGenerator;
|
||||
-import org.codehaus.plexus.velocity.VelocityComponent;
|
||||
|
||||
/**
|
||||
* Generates a <code>HelpMojo</code> class.
|
||||
@@ -58,12 +56,6 @@ public class HelpGeneratorMojo
|
||||
@Parameter
|
||||
private String helpPackageName;
|
||||
|
||||
- /**
|
||||
- * Velocity component.
|
||||
- */
|
||||
- @Component
|
||||
- private VelocityComponent velocity;
|
||||
-
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@@ -77,7 +69,7 @@ public class HelpGeneratorMojo
|
||||
*/
|
||||
protected Generator createGenerator()
|
||||
{
|
||||
- return new PluginHelpGenerator().setHelpPackageName( helpPackageName ).setVelocityComponent( this.velocity );
|
||||
+ return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,16 +78,6 @@ public class HelpGeneratorMojo
|
||||
public void execute()
|
||||
throws MojoExecutionException
|
||||
{
|
||||
- // force value for this plugin
|
||||
- skipErrorNoDescriptorsFound = true;
|
||||
-
|
||||
- super.execute();
|
||||
-
|
||||
- if ( !project.getCompileSourceRoots().contains( outputDirectory.getAbsolutePath() ) && !skip )
|
||||
- {
|
||||
- project.addCompileSourceRoot( outputDirectory.getAbsolutePath() );
|
||||
- }
|
||||
-
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
|
||||
index 1375cae..9e3d556 100644
|
||||
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
|
||||
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java
|
||||
@@ -66,22 +66,11 @@ public class PluginDescriptorGenerator
|
||||
public void execute( File destinationDirectory, PluginToolsRequest request )
|
||||
throws GeneratorException
|
||||
{
|
||||
- // eventually rewrite help mojo class to match actual package name
|
||||
- PluginHelpGenerator.rewriteHelpMojo( request, log );
|
||||
-
|
||||
try
|
||||
{
|
||||
// write complete plugin.xml descriptor
|
||||
File f = new File( destinationDirectory, "plugin.xml" );
|
||||
writeDescriptor( f, request, false );
|
||||
-
|
||||
- // write plugin-help.xml help-descriptor
|
||||
- MavenProject mavenProject = request.getProject();
|
||||
-
|
||||
- f = new File( mavenProject.getBuild().getOutputDirectory(),
|
||||
- PluginHelpGenerator.getPluginHelpPath( mavenProject ) );
|
||||
-
|
||||
- writeDescriptor( f, request, true );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
--
|
||||
2.25.2
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
From 39be64eff05c5db20b863ac971d2de5707ae8017 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Mon, 27 Apr 2020 12:56:04 +0200
|
||||
Subject: [PATCH 2/3] Remove dependency on jtidy
|
||||
|
||||
---
|
||||
.../plugin/generator/GeneratorUtils.java | 55 +------------------
|
||||
1 file changed, 1 insertion(+), 54 deletions(-)
|
||||
|
||||
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
|
||||
index 771b08b..0346778 100644
|
||||
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
|
||||
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
|
||||
@@ -51,7 +51,6 @@ import org.apache.maven.reporting.MavenReport;
|
||||
import org.codehaus.plexus.component.repository.ComponentDependency;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.codehaus.plexus.util.xml.XMLWriter;
|
||||
-import org.w3c.tidy.Tidy;
|
||||
|
||||
/**
|
||||
* Convenience methods to play with Maven plugins.
|
||||
@@ -254,58 +253,6 @@ public final class GeneratorUtils
|
||||
return decoded.toString();
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Fixes some javadoc comment to become a valid XHTML snippet.
|
||||
- *
|
||||
- * @param description Javadoc description with HTML tags, may be <code>null</code>.
|
||||
- * @return The description with valid XHTML tags, never <code>null</code>.
|
||||
- */
|
||||
- public static String makeHtmlValid( String description )
|
||||
- {
|
||||
- if ( StringUtils.isEmpty( description ) )
|
||||
- {
|
||||
- return "";
|
||||
- }
|
||||
-
|
||||
- String commentCleaned = decodeJavadocTags( description );
|
||||
-
|
||||
- // Using jTidy to clean comment
|
||||
- Tidy tidy = new Tidy();
|
||||
- tidy.setDocType( "loose" );
|
||||
- tidy.setXHTML( true );
|
||||
- tidy.setXmlOut( true );
|
||||
- tidy.setInputEncoding( "UTF-8" );
|
||||
- tidy.setOutputEncoding( "UTF-8" );
|
||||
- tidy.setMakeClean( true );
|
||||
- tidy.setNumEntities( true );
|
||||
- tidy.setQuoteNbsp( false );
|
||||
- tidy.setQuiet( true );
|
||||
- tidy.setShowWarnings( false );
|
||||
- try
|
||||
- {
|
||||
- ByteArrayOutputStream out = new ByteArrayOutputStream( commentCleaned.length() + 256 );
|
||||
- tidy.parse( new ByteArrayInputStream( commentCleaned.getBytes( "UTF-8" ) ), out );
|
||||
- commentCleaned = out.toString( "UTF-8" );
|
||||
- }
|
||||
- catch ( UnsupportedEncodingException e )
|
||||
- {
|
||||
- // cannot happen as every JVM must support UTF-8, see also class javadoc for java.nio.charset.Charset
|
||||
- }
|
||||
-
|
||||
- if ( StringUtils.isEmpty( commentCleaned ) )
|
||||
- {
|
||||
- return "";
|
||||
- }
|
||||
-
|
||||
- // strip the header/body stuff
|
||||
- String ls = System.getProperty( "line.separator" );
|
||||
- int startPos = commentCleaned.indexOf( "<body>" + ls ) + 6 + ls.length();
|
||||
- int endPos = commentCleaned.indexOf( ls + "</body>" );
|
||||
- commentCleaned = commentCleaned.substring( startPos, endPos );
|
||||
-
|
||||
- return commentCleaned;
|
||||
- }
|
||||
-
|
||||
/**
|
||||
* Converts a HTML fragment as extracted from a javadoc comment to a plain text string. This method tries to retain
|
||||
* as much of the text formatting as possible by means of the following transformations:
|
||||
@@ -337,7 +284,7 @@ public final class GeneratorUtils
|
||||
|
||||
try
|
||||
{
|
||||
- parser.parse( new StringReader( makeHtmlValid( html ) ), htmlCallback, true );
|
||||
+ parser.parse( new StringReader( html ), htmlCallback, true );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
--
|
||||
2.25.2
|
||||
|
||||
@ -1,90 +0,0 @@
|
||||
From 8d455cd296ab9b3d762ddac71b3f51df234b66c1 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Mon, 27 Apr 2020 12:57:13 +0200
|
||||
Subject: [PATCH 3/3] Disable reporting
|
||||
|
||||
---
|
||||
.../plugin/generator/GeneratorUtils.java | 62 -------------------
|
||||
1 file changed, 62 deletions(-)
|
||||
|
||||
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
|
||||
index 0346778..6ac66f8 100644
|
||||
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
|
||||
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/GeneratorUtils.java
|
||||
@@ -47,7 +47,6 @@ import org.apache.maven.model.Dependency;
|
||||
import org.apache.maven.plugin.descriptor.MojoDescriptor;
|
||||
import org.apache.maven.plugin.descriptor.PluginDescriptor;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
-import org.apache.maven.reporting.MavenReport;
|
||||
import org.codehaus.plexus.component.repository.ComponentDependency;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.codehaus.plexus.util.xml.XMLWriter;
|
||||
@@ -592,65 +591,4 @@ public final class GeneratorUtils
|
||||
return packageName;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * @param impl a Mojo implementation, not null
|
||||
- * @param project a MavenProject instance, could be null
|
||||
- * @return <code>true</code> is the Mojo implementation implements <code>MavenReport</code>,
|
||||
- * <code>false</code> otherwise.
|
||||
- * @throws IllegalArgumentException if any
|
||||
- */
|
||||
- @SuppressWarnings( "unchecked" )
|
||||
- public static boolean isMavenReport( String impl, MavenProject project )
|
||||
- throws IllegalArgumentException
|
||||
- {
|
||||
- if ( impl == null )
|
||||
- {
|
||||
- throw new IllegalArgumentException( "mojo implementation should be declared" );
|
||||
- }
|
||||
-
|
||||
- ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
|
||||
- if ( project != null )
|
||||
- {
|
||||
- List<String> classPathStrings;
|
||||
- try
|
||||
- {
|
||||
- classPathStrings = project.getCompileClasspathElements();
|
||||
- if ( project.getExecutionProject() != null )
|
||||
- {
|
||||
- classPathStrings.addAll( project.getExecutionProject().getCompileClasspathElements() );
|
||||
- }
|
||||
- }
|
||||
- catch ( DependencyResolutionRequiredException e )
|
||||
- {
|
||||
- throw new IllegalArgumentException( e );
|
||||
- }
|
||||
-
|
||||
- List<URL> urls = new ArrayList<>( classPathStrings.size() );
|
||||
- for ( String classPathString : classPathStrings )
|
||||
- {
|
||||
- try
|
||||
- {
|
||||
- urls.add( new File( classPathString ).toURL() );
|
||||
- }
|
||||
- catch ( MalformedURLException e )
|
||||
- {
|
||||
- throw new IllegalArgumentException( e );
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- classLoader = new URLClassLoader( urls.toArray( new URL[urls.size()] ), classLoader );
|
||||
- }
|
||||
-
|
||||
- try
|
||||
- {
|
||||
- Class<?> clazz = Class.forName( impl, false, classLoader );
|
||||
-
|
||||
- return MavenReport.class.isAssignableFrom( clazz );
|
||||
- }
|
||||
- catch ( ClassNotFoundException e )
|
||||
- {
|
||||
- return false;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
}
|
||||
--
|
||||
2.25.2
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_contexts:
|
||||
- osci_compose_gate
|
||||
rules:
|
||||
# https://docs.engineering.redhat.com/display/RHELPLAN/Maven+Bootstrap+manual+gating+test
|
||||
- !PassingTestCaseRule {test_case_name: manual.sst_cs_apps.maven.bootstrap}
|
||||
Loading…
Reference in New Issue
Block a user