diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..89b8a1c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/maven-plugin-testing-2.1-source-release.zip diff --git a/.rh-maven33-maven-plugin-testing.metadata b/.rh-maven33-maven-plugin-testing.metadata new file mode 100644 index 0000000..936aa29 --- /dev/null +++ b/.rh-maven33-maven-plugin-testing.metadata @@ -0,0 +1 @@ +cf06ddd959bdad0c2b956c3291c0035dab7af5eb SOURCES/maven-plugin-testing-2.1-source-release.zip diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Port-to-plexus-utils-3.0.21.patch b/SOURCES/0001-Port-to-plexus-utils-3.0.21.patch new file mode 100644 index 0000000..fe98d30 --- /dev/null +++ b/SOURCES/0001-Port-to-plexus-utils-3.0.21.patch @@ -0,0 +1,26 @@ +diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java +index dec1a81..ae9f06f 100644 +--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java ++++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java +@@ -111,7 +111,7 @@ public abstract class AbstractMojoTestCase + XmlStreamReader reader = ReaderFactory.newXmlReader( is ); + + InterpolationFilterReader interpolationFilterReader = +- new InterpolationFilterReader( new BufferedReader( reader ), container.getContext().getContextData() ); ++ new InterpolationFilterReader( new BufferedReader( reader ), ( Map ) container.getContext().getContextData() ); + + PluginDescriptor pluginDescriptor = new PluginDescriptorBuilder().build( interpolationFilterReader ); + +diff --git a/pom.xml b/pom.xml +index 589682d..d77ef4f 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -182,7 +182,7 @@ under the License. + + org.codehaus.plexus + plexus-utils +- 3.0.8 ++ 3.0.21 + provided + + diff --git a/SOURCES/0002-Port-to-current-maven-artifact.patch b/SOURCES/0002-Port-to-current-maven-artifact.patch new file mode 100644 index 0000000..573814d --- /dev/null +++ b/SOURCES/0002-Port-to-current-maven-artifact.patch @@ -0,0 +1,62 @@ +diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java +index b38ccab..3099a8a 100644 +--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java ++++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java +@@ -51,7 +51,7 @@ public class StubArtifactCollector + } + + public ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact, +- Map managedVersions, ArtifactResolutionRequest repositoryRequest, ++ Map managedVersions, ArtifactResolutionRequest repositoryRequest, + ArtifactMetadataSource source, ArtifactFilter filter, + List listeners, + List conflictResolvers ) +@@ -60,7 +60,7 @@ public class StubArtifactCollector + } + + public ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact, +- Map managedVersions, ArtifactRepository localRepository, ++ Map managedVersions, ArtifactRepository localRepository, + List remoteRepositories, + ArtifactMetadataSource source, ArtifactFilter filter, + List listeners, +@@ -70,7 +70,7 @@ public class StubArtifactCollector + } + + public ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact, +- Map managedVersions, ArtifactRepository localRepository, ++ Map managedVersions, ArtifactRepository localRepository, + List remoteRepositories, + ArtifactMetadataSource source, ArtifactFilter filter, + List listeners ) +diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java +index 77d3b32..ae98cb8 100644 +--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java ++++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java +@@ -141,7 +141,7 @@ public class StubArtifactResolver + * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource) + */ + public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, +- Map managedVersions, ArtifactRepository localRepository, ++ Map managedVersions, ArtifactRepository localRepository, + List remoteRepositories, ArtifactMetadataSource source ) + throws ArtifactResolutionException, ArtifactNotFoundException + { +@@ -153,7 +153,7 @@ public class StubArtifactResolver + * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource, org.apache.maven.artifact.resolver.filter.ArtifactFilter) + */ + public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, +- Map managedVersions, ArtifactRepository localRepository, ++ Map managedVersions, ArtifactRepository localRepository, + List remoteRepositories, ArtifactMetadataSource source, + ArtifactFilter filter ) + throws ArtifactResolutionException, ArtifactNotFoundException +@@ -166,7 +166,7 @@ public class StubArtifactResolver + * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource, org.apache.maven.artifact.resolver.filter.ArtifactFilter, java.util.List) + */ + public ArtifactResolutionResult resolveTransitively( Set artifacts, Artifact originatingArtifact, +- Map managedVersions, ArtifactRepository localRepository, ++ Map managedVersions, ArtifactRepository localRepository, + List remoteRepositories, ArtifactMetadataSource source, + ArtifactFilter filter, List listeners ) + throws ArtifactResolutionException, ArtifactNotFoundException diff --git a/SOURCES/0003-Port-to-Maven-3.1.patch b/SOURCES/0003-Port-to-Maven-3.1.patch new file mode 100644 index 0000000..6a683dd --- /dev/null +++ b/SOURCES/0003-Port-to-Maven-3.1.patch @@ -0,0 +1,66 @@ +diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java +index ae9f06f..4e6e602 100644 +--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java ++++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java +@@ -49,7 +49,7 @@ import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder; + import org.apache.maven.plugin.logging.Log; + import org.apache.maven.project.MavenProject; + import org.apache.maven.repository.RepositorySystem; +-import org.apache.maven.repository.internal.MavenRepositorySystemSession; ++import org.apache.maven.repository.internal.MavenRepositorySystemUtils; + import org.codehaus.plexus.ContainerConfiguration; + import org.codehaus.plexus.DefaultContainerConfiguration; + import org.codehaus.plexus.DefaultPlexusContainer; +@@ -373,7 +373,7 @@ public abstract class AbstractMojoTestCase + MavenExecutionRequest request = new DefaultMavenExecutionRequest(); + MavenExecutionResult result = new DefaultMavenExecutionResult(); + +- MavenSession session = new MavenSession( container, new MavenRepositorySystemSession(), request, result ); ++ MavenSession session = new MavenSession( container, MavenRepositorySystemUtils.newSession(), request, result ); + session.setCurrentProject( project ); + session.setProjects( Arrays.asList( project ) ); + return session; +diff --git a/maven-plugin-testing-tools/src/main/java/org/apache/maven/shared/test/plugin/ProjectTool.java b/maven-plugin-testing-tools/src/main/java/org/apache/maven/shared/test/plugin/ProjectTool.java +index 4cb36a1..90b094e 100644 +--- a/maven-plugin-testing-tools/src/main/java/org/apache/maven/shared/test/plugin/ProjectTool.java ++++ b/maven-plugin-testing-tools/src/main/java/org/apache/maven/shared/test/plugin/ProjectTool.java +@@ -50,7 +50,7 @@ import org.apache.maven.project.ProjectBuilder; + import org.apache.maven.project.ProjectBuildingException; + import org.apache.maven.project.ProjectBuildingRequest; + import org.apache.maven.project.artifact.ProjectArtifactMetadata; +-import org.apache.maven.repository.internal.MavenRepositorySystemSession; ++import org.apache.maven.repository.internal.MavenRepositorySystemUtils; + import org.codehaus.plexus.component.annotations.Component; + import org.codehaus.plexus.component.annotations.Requirement; + import org.codehaus.plexus.util.FileUtils; +@@ -241,7 +241,7 @@ public class ProjectTool + { + ProjectBuildingRequest request = new DefaultProjectBuildingRequest(); + request.setLocalRepository( artifactRepositoryFactory.createArtifactRepository( "local", new File( "target/localrepo" ).getCanonicalFile().toURL().toExternalForm(), "default", null, null ) ); +- request.setRepositorySession( new MavenRepositorySystemSession() ); ++ request.setRepositorySession( MavenRepositorySystemUtils.newSession() ); + MavenProject project = projectBuilder.build( pomInfo.getPomFile(), request ).getProject(); + + Artifact artifact = artifactFactory.createArtifact( project.getGroupId(), project.getArtifactId(), project +diff --git a/maven-plugin-testing-tools/src/main/java/org/apache/maven/shared/test/plugin/RepositoryTool.java b/maven-plugin-testing-tools/src/main/java/org/apache/maven/shared/test/plugin/RepositoryTool.java +index 30bd492..de9c31d 100644 +--- a/maven-plugin-testing-tools/src/main/java/org/apache/maven/shared/test/plugin/RepositoryTool.java ++++ b/maven-plugin-testing-tools/src/main/java/org/apache/maven/shared/test/plugin/RepositoryTool.java +@@ -40,7 +40,7 @@ import org.apache.maven.model.io.xpp3.MavenXpp3Reader; + import org.apache.maven.plugin.LegacySupport; + import org.apache.maven.project.MavenProject; + import org.apache.maven.project.artifact.ProjectArtifactMetadata; +-import org.apache.maven.repository.internal.MavenRepositorySystemSession; ++import org.apache.maven.repository.internal.MavenRepositorySystemUtils; + import org.apache.maven.settings.MavenSettingsBuilder; + import org.apache.maven.settings.Settings; + import org.codehaus.plexus.PlexusConstants; +@@ -218,7 +218,7 @@ public class RepositoryTool + destination.getParentFile().mkdirs(); + } + +- legacySupport.setSession( new MavenSession( container, new MavenRepositorySystemSession(), ++ legacySupport.setSession( new MavenSession( container, MavenRepositorySystemUtils.newSession(), + new DefaultMavenExecutionRequest(), + new DefaultMavenExecutionResult() ) ); + try diff --git a/SPECS/maven-plugin-testing.spec b/SPECS/maven-plugin-testing.spec new file mode 100644 index 0000000..98cc07e --- /dev/null +++ b/SPECS/maven-plugin-testing.spec @@ -0,0 +1,245 @@ +%global pkg_name maven-plugin-testing +%{?scl:%scl_package %{pkg_name}} +%{?maven_find_provides_and_requires} + +Name: %{?scl_prefix}%{pkg_name} +Version: 2.1 +Release: 11.16%{?dist} +Summary: Maven Plugin Testing +License: ASL 2.0 +URL: http://maven.apache.org/plugin-testing/ +Source0: http://repo1.maven.org/maven2/org/apache/maven/plugin-testing/%{pkg_name}/%{version}/%{pkg_name}-%{version}-source-release.zip +Patch0: 0001-Port-to-plexus-utils-3.0.21.patch +Patch1: 0002-Port-to-current-maven-artifact.patch +Patch2: 0003-Port-to-Maven-3.1.patch +BuildArch: noarch + +BuildRequires: %{?scl_prefix_java_common}easymock2 +BuildRequires: %{?scl_prefix_java_common}junit +BuildRequires: %{?scl_prefix}maven-local +BuildRequires: %{?scl_prefix}maven-resources-plugin +BuildRequires: %{?scl_prefix}maven-source-plugin +BuildRequires: %{?scl_prefix}plexus-containers-component-metadata +BuildRequires: %{?scl_prefix}maven-javadoc-plugin +BuildRequires: %{?scl_prefix}maven-doxia-sitetools +BuildRequires: %{?scl_prefix}maven-reporting-impl +#BuildRequires: %{?scl_prefix}maven-test-tools + +%description +The Maven Plugin Testing contains the necessary modules +to be able to test Maven Plugins. + +%package javadoc +Summary: Javadoc for %{pkg_name} + +%description javadoc +API documentation for %{pkg_name}. + +%package harness +Summary: Maven Plugin Testing Mechanism + +%description harness +The Maven Plugin Testing Harness provides mechanisms to manage tests on Mojo. + +%package tools +Summary: Maven Plugin Testing Tools + +%description tools +A set of useful tools to help the Maven Plugin testing. + +%package -n %{?scl_prefix}maven-test-tools +Summary: Maven Testing Tool + +%description -n %{?scl_prefix}maven-test-tools +Framework to test Maven Plugins with Easymock objects. + +%prep +%setup -q -n %{pkg_name}-%{version} +%{?scl:scl enable %{scl} - <<"EOF"} +set -e -x +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%{?scl:EOF} + +%build +%{?scl:scl enable %{scl} - <<"EOF"} +set -e -x +%mvn_alias : org.apache.maven.shared: +# Tests are skipped due to some test failures most probably caused by issues +# with our plexus container +%mvn_build -f -s +%{?scl:EOF} + +%install +%{?scl:scl enable %{scl} - <<"EOF"} +set -e -x +%mvn_install +%{?scl:EOF} + +%files -f .mfiles-%{pkg_name} +%{_javadir}/%{pkg_name} +%dir %{_mavenpomdir}/%{pkg_name} +%doc LICENSE NOTICE +%files harness -f .mfiles-%{pkg_name}-harness +%dir %{_javadir}/%{pkg_name} +%dir %{_mavenpomdir}/%{pkg_name} +%files tools -f .mfiles-%{pkg_name}-tools +%dir %{_javadir}/%{pkg_name} +%dir %{_mavenpomdir}/%{pkg_name} +%files -n %{?scl_prefix}maven-test-tools -f .mfiles-maven-test-tools +%dir %{_javadir}/%{pkg_name} +%dir %{_mavenpomdir}/%{pkg_name} +%files javadoc -f .mfiles-javadoc +%doc LICENSE NOTICE + +%changelog +* Mon Feb 08 2016 Michal Srb - 2.1-11.16 +- Fix BR on maven-local & co. + +* Wed Jan 20 2016 Michal Srb - 2.1-11.15 +- Fix FTBFS + +* Mon Jan 11 2016 Michal Srb - 2.1-11.14 +- maven33 rebuild #2 + +* Sat Jan 09 2016 Michal Srb - 2.1-11.13 +- maven33 rebuild + +* Thu Jan 15 2015 Michael Simacek - 2.1-11.12 +- Add common dirs to subpackages + +* Thu Jan 15 2015 Mikolaj Izdebski - 2.1-11.11 +- Add directory ownership on %%{_mavenpomdir} subdir + +* Tue Jan 13 2015 Michael Simacek - 2.1-11.10 +- Mass rebuild 2015-01-13 + +* Tue Jan 06 2015 Michael Simacek - 2.1-11.9 +- Mass rebuild 2015-01-06 + +* Mon May 26 2014 Mikolaj Izdebski - 2.1-11.8 +- Mass rebuild 2014-05-26 + +* Wed Feb 19 2014 Mikolaj Izdebski - 2.1-11.7 +- Mass rebuild 2014-02-19 + +* Tue Feb 18 2014 Mikolaj Izdebski - 2.1-11.6 +- Mass rebuild 2014-02-18 + +* Tue Feb 18 2014 Mikolaj Izdebski - 2.1-11.5 +- Rebuild to fix incorrect auto-requires + +* Mon Feb 17 2014 Michal Srb - 2.1-11.4 +- SCL-ize subpackage's name + +* Fri Feb 14 2014 Mikolaj Izdebski - 2.1-11.3 +- SCL-ize requires and build-requires + +* Thu Feb 13 2014 Mikolaj Izdebski - 2.1-11.2 +- Rebuild to regenerate auto-requires + +* Tue Feb 11 2014 Mikolaj Izdebski - 2.1-11.1 +- First maven30 software collection build + +* Fri Dec 27 2013 Daniel Mach - 2.1-11 +- Mass rebuild 2013-12-27 + +* Tue Oct 08 2013 Stanislav Ochotnicky - 2.1-10 +- Remove not needed workaround for 1002873 +- Resolves: rhbz#1002873 + +* Mon Sep 16 2013 Stanislav Ochotnicky - 2.1-9 +- Workaround installation problem with easymock2 compat package +- Related: rhbz#1002873 + +* Fri Jun 28 2013 Mikolaj Izdebski - 2.1-8 +- Rebuild to regenerate API documentation +- Resolves: CVE-2013-1571 + +* Mon Apr 22 2013 Michal Srb - 2.1-7 +- Another rebuild (Fix artifactId=None issue) + +* Wed Apr 10 2013 Mikolaj Izdebski - 2.1-6 +- Rebuild + +* Mon Mar 11 2013 Mikolaj Izdebski - 2.1-5 +- Install missing license files +- Build with xmvn +- Resolves: rhbz#920258 + +* Thu Feb 14 2013 Fedora Release Engineering - 2.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Feb 06 2013 Java SIG - 2.1-3 +- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild +- Replace maven BuildRequires with maven-local + +* Wed Jan 9 2013 Mikolaj Izdebski - 2.1-2 +- Fix easymock requires + +* Mon Jan 07 2013 Tomas Radej - 2.1-1 +- Updated to latest upstream version +- Cleanup - removed patches, old files etc. +- Added requires to subpackages + +* Thu Jul 19 2012 Fedora Release Engineering - 2.0-4.alpha1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 2.0-3.alpha1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Nov 10 2011 Jaromir Capik 2.0-2.alpha1 +- Structuring mess cleanup (depmap fragments split, removing jar duplicities) + +* Wed Nov 09 2011 Jaromir Capik 2.0-1.alpha1 +- Update to 2.0-alpha1 +- Spec file changes according to the latest guidelines + +* Thu Feb 10 2011 Alexander Kurtakov 1.2-9 +- Fix building. +- Adapt to current guidelines. + +* Tue Feb 08 2011 Fedora Release Engineering - 1.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Sep 20 2010 Yong Yang 1.1-7 +- Build with plexus-containers 1.5.4 + +* Mon May 31 2010 Alexander Kurtakov 1.2-6 +- Proper obsolete for maven-shared-test-tools. + +* Mon May 31 2010 Alexander Kurtakov 1.2-5 +- One more item to the depmap. + +* Mon May 31 2010 Alexander Kurtakov 1.2-4 +- Add depmap to fix build. + +* Sat May 29 2010 Alexander Kurtakov 1.2-3 +- Obsolete maven-shared-test-tools. + +* Thu May 27 2010 Yong Yang 1:1.2-2.8 +- Fix parent pom install + +* Thu May 27 2010 Yong Yang 1:1.2-2.7 +- Fix installed pom.xml source path + +* Thu May 27 2010 Yong Yang 1:1.2-2.6 +- Add more maven depmap for maven-test-tools and maven-plugin-testing-tools for backward compatibility + +* Thu May 27 2010 Yong Yang 1:1.2-2.5 +- Fix maven-plugin-testing-tools pom name + +* Thu May 27 2010 Yong Yang 1:1.2-2.4 +- Change JPP.%{name}.%{name}-harness.pom to JPP.%{name}-%{name}-harness.pom + +* Thu May 27 2010 Yong Yang 1:1.2-2.3 +- Remove epoch in Requires of maven-test-tools + +* Wed May 12 2010 Alexander Kurtakov 1:1.2-2 +- Fix line lengths and use macroses consistently. +- Add comment for the tests skip. +- Add missing requires and set permissions. + +* Wed May 12 2010 Alexander Kurtakov 1:1.2-1 +- Initial package.