Update to latest upstream version
- Drop ant build parts - Versionless jars & javadocs - Enable tests again
This commit is contained in:
parent
c5f7fd7eba
commit
04db474a29
7
.gitignore
vendored
7
.gitignore
vendored
@ -1 +1,6 @@
|
||||
plexus-classworlds-2.2.3.tar.xz
|
||||
target/
|
||||
.project
|
||||
.classpath
|
||||
.settings/
|
||||
bin
|
||||
/plexus-classworlds-2.4.tar.gz
|
||||
|
@ -1,27 +0,0 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.2</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>1.0.4</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP/plexus</groupId>
|
||||
<artifactId>utils</artifactId>
|
||||
<version>1.4.5</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
@ -1,47 +0,0 @@
|
||||
<settings>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>JPP</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>internal</id>
|
||||
<layout>jpp</layout>
|
||||
<url>__JPP_URL_PLACEHOLDER__</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>external</id>
|
||||
<layout>jpp</layout>
|
||||
<url>__JAVADIR_PLACEHOLDER__</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>local</id>
|
||||
<layout>jpp</layout>
|
||||
<url>__MAVENREPO_DIR_PLACEHOLDER__</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>plugins-internal</id>
|
||||
<name>plugins-internal</name>
|
||||
<layout>jpp</layout>
|
||||
<url>__JPP_URL_PLACEHOLDER__</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>plugins-external</id>
|
||||
<name>plugins-external</name>
|
||||
<layout>jpp</layout>
|
||||
<url>__JAVADIR_PLACEHOLDER__</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>plugins-maven</id>
|
||||
<name>plugins-maven</name>
|
||||
<layout>jpp</layout>
|
||||
<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
<activeProfiles>
|
||||
<activeProfile>JPP</activeProfile>
|
||||
</activeProfiles>
|
||||
</settings>
|
@ -1,26 +0,0 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>3.0</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP/objectweb-asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>3.2</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<maven>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.6.5</version>
|
||||
</maven>
|
||||
<jpp>
|
||||
<groupId>JPP</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.6.5</version>
|
||||
</jpp>
|
||||
</dependency>
|
||||
</dependencies>
|
@ -28,38 +28,26 @@
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
%global with_maven 1
|
||||
|
||||
%global parent plexus
|
||||
%global subname classworlds
|
||||
|
||||
Name: %{parent}-%{subname}
|
||||
Version: 2.2.3
|
||||
Release: 2%{?dist}
|
||||
Version: 2.4
|
||||
Release: 1%{?dist}
|
||||
Summary: Plexus Classworlds Classloader Framework
|
||||
License: ASL 2.0 and Plexus
|
||||
Group: Development/Libraries
|
||||
URL: http://plexus.codehaus.org/
|
||||
# svn export http://svn.codehaus.org/plexus/plexus-classworlds/tags/plexus-classworlds-2.2.3 plexus-classworlds-2.2.3
|
||||
# tar caf plexus-classworlds-2.2.3.tar.xz plexus-classworlds-2.2.3
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
# git clone git://github.com/sonatype/plexus-classworlds.git
|
||||
# git archive --prefix="plexus-classworlds/" --format=tar plexus-classworlds-2.4 > plexus-classworlds-2.4.tar.gz
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
# Generated with mvn ant:ant
|
||||
Source1: plexus-classworlds-1.2-build.xml
|
||||
# Fedora-specific maven bits
|
||||
Source3: plexus-classworlds-settings.xml
|
||||
|
||||
# workaround objectweb-asm depmap
|
||||
Source5: %{name}.depmap
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: ant
|
||||
BuildRequires: apache-commons-logging
|
||||
BuildRequires: xml-commons-jaxp-1.3-apis
|
||||
%if %{with_maven}
|
||||
BuildRequires: maven2
|
||||
BuildRequires: maven-compiler-plugin
|
||||
BuildRequires: maven-install-plugin
|
||||
@ -74,7 +62,6 @@ BuildRequires: maven-shared-reporting-impl
|
||||
BuildRequires: maven-dependency-plugin
|
||||
BuildRequires: maven-surefire-maven-plugin
|
||||
BuildRequires: maven-surefire-provider-junit
|
||||
%endif
|
||||
BuildRequires: plexus-utils
|
||||
|
||||
Requires(post): jpackage-utils
|
||||
@ -99,59 +86,41 @@ Requires: jpackage-utils
|
||||
API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%setup -q -n %{name}
|
||||
for j in $(find . -name "*.jar" | grep -v /test-data/ | grep -v /test-jars/); do
|
||||
mv $j $j.no
|
||||
rm $j
|
||||
done
|
||||
cp %{SOURCE1} build.xml
|
||||
cp %{SOURCE3} settings.xml
|
||||
|
||||
mkdir -p lib
|
||||
ln -sf $(build-classpath xml-commons-jaxp-1.3-apis) lib/xml-apis-1.3.02.jar
|
||||
ln -sf $(build-classpath ant) lib/ant-1.6.5.jar
|
||||
ln -sf $(build-classpath commons-logging) lib/commons-logging-1.0.3.jar
|
||||
# fix ant groupId
|
||||
sed -i 's:<groupId>ant</groupId>:<groupId>org.apache.ant</groupId>:' pom.xml
|
||||
|
||||
%build
|
||||
|
||||
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
|
||||
mkdir -p $MAVEN_REPO_LOCAL
|
||||
|
||||
# tests skipped because of old commons-cli package these fail
|
||||
|
||||
%if %{with_maven}
|
||||
mvn-jpp \
|
||||
-e \
|
||||
-Dmaven.test.skip=true \
|
||||
mvn-jpp -e \
|
||||
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
||||
-Dmaven2.jpp.depmap.file=%{SOURCE5} \
|
||||
install javadoc:javadoc
|
||||
|
||||
%else
|
||||
export CLASSPATH=
|
||||
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
|
||||
|
||||
ant -Dbuild.sysclasspath=only jar javadoc
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
# jars
|
||||
install -Dpm 644 target/%{name}-%{version}.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/plexus/%{subname}-%{version}.jar
|
||||
$RPM_BUILD_ROOT%{_javadir}/plexus/%{subname}.jar
|
||||
%add_to_maven_depmap org.codehaus.plexus %{name} %{version} JPP/%{parent} %{subname}
|
||||
|
||||
(cd $RPM_BUILD_ROOT%{_javadir}/%{parent} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||||
|
||||
# pom
|
||||
install -Dpm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{parent}-%{subname}.pom
|
||||
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%pre javadoc
|
||||
# workaround for rpm bug, can be removed in F-17
|
||||
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
|
||||
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
@ -168,9 +137,16 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_javadocdir}/*
|
||||
%doc LICENSE.txt
|
||||
%doc %{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Wed Feb 2 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.4-1
|
||||
- Update to latest upstream version
|
||||
- Drop ant build parts
|
||||
- Versionless jars & javadocs
|
||||
- Enable tests again
|
||||
|
||||
* Tue Dec 21 2010 Alexander Kurtakov <akurtako@redhat.com> 2.2.3-2
|
||||
- Fix FTBFS.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user