Compare commits

...

2 Commits

Author SHA1 Message Date
Stanislav Ochotnicky ef719174b8 Add bootstrap-repo creating script 2011-10-14 23:11:32 +02:00
Stanislav Ochotnicky f00f3b2bdf Scratch commit for 0.13 update 2011-10-14 23:07:43 +02:00
5 changed files with 105 additions and 240 deletions

View File

@ -1,192 +0,0 @@
From 1fc5ec4dcccd0951860f9db6f485fd3c00a4a684 Mon Sep 17 00:00:00 2001
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
Date: Tue, 29 Mar 2011 17:58:43 +0200
Subject: [PATCH] Remove tycho-testing-harness
It needs maven2 parts to build, but we need depmap for other parts of tycho.
Thus we disable it for now and this is not a big deal because we are not
running tests anyway (yet).
---
maven-osgi-compiler-plugin/pom.xml | 10 ++++------
maven-osgi-packaging-plugin/pom.xml | 10 ++++------
maven-tycho-plugin/pom.xml | 6 ------
pom.xml | 1 -
tycho-osgi-components/pom.xml | 10 ++++------
tycho-p2/tycho-p2-director-plugin/pom.xml | 6 ------
tycho-p2/tycho-p2-publisher-plugin/pom.xml | 6 ------
tycho-release/tycho-versions-plugin/pom.xml | 8 +-------
8 files changed, 13 insertions(+), 44 deletions(-)
diff --git a/maven-osgi-compiler-plugin/pom.xml b/maven-osgi-compiler-plugin/pom.xml
index 6e55905..9d0979a 100644
--- a/maven-osgi-compiler-plugin/pom.xml
+++ b/maven-osgi-compiler-plugin/pom.xml
@@ -64,18 +64,16 @@
<artifactId>tycho-compiler-jdt</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-testing-harness</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/maven-osgi-packaging-plugin/pom.xml b/maven-osgi-packaging-plugin/pom.xml
index d7faeac..7fc5e5a 100644
--- a/maven-osgi-packaging-plugin/pom.xml
+++ b/maven-osgi-packaging-plugin/pom.xml
@@ -24,12 +24,6 @@
<artifactId>tycho-equinox</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-testing-harness</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>commons-lang</groupId>
@@ -41,6 +35,10 @@
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
</dependency>
<dependency>
diff --git a/maven-tycho-plugin/pom.xml b/maven-tycho-plugin/pom.xml
index 5f6c55e..af1ea97 100644
--- a/maven-tycho-plugin/pom.xml
+++ b/maven-tycho-plugin/pom.xml
@@ -65,12 +65,6 @@
<artifactId>maven-plugin-testing-harness</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-testing-harness</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/pom.xml b/pom.xml
index 7197d73..14cce0b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -509,7 +509,6 @@
<module>tycho-equinox</module>
<module>tycho-bootstrap-maven-plugin</module>
<module>tycho-osgi-components</module>
- <module>tycho-testing-harness</module>
</modules>
</profile>
diff --git a/tycho-osgi-components/pom.xml b/tycho-osgi-components/pom.xml
index 8967ed4..1bb9d77 100644
--- a/tycho-osgi-components/pom.xml
+++ b/tycho-osgi-components/pom.xml
@@ -50,6 +50,10 @@
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
</dependency>
<dependency>
@@ -76,12 +80,6 @@
</dependency>
<dependency>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-testing-harness</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.0</version>
diff --git a/tycho-p2/tycho-p2-director-plugin/pom.xml b/tycho-p2/tycho-p2-director-plugin/pom.xml
index 5340831..85357dc 100644
--- a/tycho-p2/tycho-p2-director-plugin/pom.xml
+++ b/tycho-p2/tycho-p2-director-plugin/pom.xml
@@ -41,12 +41,6 @@
</dependency>
<dependency>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-testing-harness</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.0</version>
diff --git a/tycho-p2/tycho-p2-publisher-plugin/pom.xml b/tycho-p2/tycho-p2-publisher-plugin/pom.xml
index f736ff1..ee2fb63 100644
--- a/tycho-p2/tycho-p2-publisher-plugin/pom.xml
+++ b/tycho-p2/tycho-p2-publisher-plugin/pom.xml
@@ -37,12 +37,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-testing-harness</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-booter</artifactId>
</dependency>
diff --git a/tycho-release/tycho-versions-plugin/pom.xml b/tycho-release/tycho-versions-plugin/pom.xml
index 24a0275..e9274a8 100644
--- a/tycho-release/tycho-versions-plugin/pom.xml
+++ b/tycho-release/tycho-versions-plugin/pom.xml
@@ -28,12 +28,6 @@
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-testing-harness</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
@@ -46,4 +40,4 @@
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
--
1.7.4

View File

@ -1,4 +1,4 @@
<dependencies>
<dependencies>
<dependency>
<maven>
<groupId>org.apache.maven</groupId>
@ -35,6 +35,30 @@
<version>3.0.3</version>
</jpp>
</dependency>
<dependency>
<maven>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.0.3</version>
</maven>
<jpp>
<groupId>JPP/maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.0.3</version>
</jpp>
</dependency>
<dependency>
<maven>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>3.0.3</version>
</maven>
<jpp>
<groupId>JPP/maven</groupId>
<artifactId>maven-model</artifactId>
<version>3.0.3</version>
</jpp>
</dependency>
<dependency>
<maven>
<groupId>org.sonatype.tycho</groupId>

8
make_bootstrap_repo.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
rm -rf $(pwd)/.m2
export TYCHO_TARGET_PLATFORM=/usr/lib64/eclipse
mvn-local -Dmaven.repo.local=$(pwd)/.m2 -Dmaven.local.debug=true -X -Dmaven.test.skip install || exit
tar caf maven-repo.tar.xz .m2

View File

@ -1,2 +1 @@
feda402d0f9cc1cfd22dc11a7c85dd4c maven-repo.tar.bz2
f2ff10d3f25941d2746c030b57a0218b tycho-0.10.0.tar.xz
2605877260f5930c43aac4d92cc2e5ff maven-repo.tar.bz2

View File

@ -1,13 +1,17 @@
%global bootstrap 0
%global bootstrap 1
%global e_osgi org.eclipse.osgi
%global e_osgi_v 3.6.0.v20100517
%global e_osgi_v 3.6.2.R36x_v20110210
%global e_osgi_v2 3.8.0.v20110726-1606
%global e_core org.eclipse.jdt.core
%global e_core_v 3.6.0.v_A58
%global e_core_v 3.6.2.v_A76_R36x
%global e_core_v2 3.8.0.v_C03
%global eclipsedir %{_libdir}/eclipse
Name: tycho
Version: 0.10.0
Release: 3%{?dist}
Version: 0.13.0
Release: 0.1.a74b1717%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
Group: Development/Libraries
@ -15,7 +19,7 @@ Group: Development/Libraries
License: ASL 2.0
URL: http://tycho.sonatype.org/
# git clone git://github.com/sonatype/sonatype-tycho
# git archive --prefix="tycho-0.10.0/" --format=tar tycho-0.10.0 | xz > tycho-0.10.0.tar.xz
# git archive --prefix="tycho-0.12.0/" --format=tar a74b1717 | xz > tycho-0.12.0.tar.xz
Source0: %{name}-%{version}.tar.xz
# this is a workaround for maven-plugin-plugin changes that happened after
@ -26,10 +30,11 @@ Source1: EmptyMojo.java
# we need to make sure we are using maven 3 deps
Source2: depmap.xml
%if %{bootstrap}
Source3: maven-repo.tar.bz2
Source3: maven-repo.tar.xz
%endif
Patch0: 0001-Remove-tycho-testing-harness.patch
Patch0: 0001-Port-to-surefire-2.9.patch
Patch1: 0002-Remove-tycho-testing-harness.patch
BuildArch: noarch
@ -99,82 +104,102 @@ This package contains the API documentation for %{name}.
%prep
%setup -q
%patch0 -p1 -b .harness
%patch1 -p1 -b .container
find tycho-core -iname '*html' -delete
# this will make tycho accept any version of bundle
sed -Ei 's/(<plugin.*)version=".*?"/\1 version="0.0.0"/' \
tycho-bundles/tycho-p2-runtime/tycho-p2-runtime.product
sed -i 's:<groupId>org.sonatype.tycho|<groupId>org.eclipse.tycho' tycho-bundles/tycho-p2-runtime/pom.xml
# place empty mojo in place
mkdir -p tycho-maven-plugin/src/main/java/org/fedoraproject
pushd tycho-maven-plugin/src/main/java/org/fedoraproject
cp %{SOURCE1} .
popd
mkdir -p tycho-bootstrap-maven-plugin/src/main/java/org/fedoraproject
pushd tycho-bootstrap-maven-plugin/src/main/java/org/fedoraproject
cp %{SOURCE1} .
popd
# remove dependency on non-existent jars from deltapack
sed -i '/equinox.security.\(macosx\|win32\)/d' \
tycho-p2/tycho-p2-runtime/tycho-p2-runtime.product
%if %{bootstrap}
tar xf %{SOURCE3}
#cp -Lr %{eclipsedir}/* .m2/org/sonatype/tycho/tycho-p2-runtime/0.10.0/eclipse/
%endif
# prepare directories for eclipse symlinks
mkdir -p .m2/org/sonatype/tycho
mkdir -p .m2/org/sonatype/tycho/%{e_osgi}/%{e_osgi_v}/
mkdir -p .m2/org/sonatype/tycho/%{e_core}/%{e_core_v}/
mkdir -p .m2/org/eclipse/tycho
mkdir -p .m2/org/eclipse/tycho/%{e_osgi}/%{e_osgi_v2}/
mkdir -p .m2/org/eclipse/tycho/%{e_core}/%{e_core_v2}/
# maven resolver doesn't know how to resolve from directories other than _javadir
pushd .m2/org/sonatype/tycho
ln -sf %{_libdir}/eclipse/plugins/org.eclipse.osgi_*.jar \
ln -sf %{eclipsedir}/plugins/org.eclipse.osgi_*.jar \
%{e_osgi}/%{e_osgi_v}/%{e_osgi}-%{e_osgi_v}.jar
ln -sf %{_libdir}/eclipse/dropins/jdt/plugins/org.eclipse.jdt.core_*.jar \
#ln -sf %{eclipsedir}/plugins/org.eclipse.jdt.core_*.jar \
# %{e_core}/%{e_core_v}/%{e_core}-%{e_core_v}.jar || \
ln -sf %{eclipsedir}/dropins/jdt/plugins/org.eclipse.jdt.core_*.jar \
%{e_core}/%{e_core_v}/%{e_core}-%{e_core_v}.jar
popd
pushd .m2/org/eclipse/tycho
ln -sf %{eclipsedir}/plugins/org.eclipse.osgi_*.jar \
%{e_osgi}/%{e_osgi_v2}/%{e_osgi}-%{e_osgi_v2}.jar
#ln -sf %{eclipsedir}/plugins/org.eclipse.jdt.core_*.jar \
# %{e_core}/%{e_core_v2}/%{e_core}-%{e_core_v2}.jar || \
ln -sf %{eclipsedir}/dropins/jdt/plugins/org.eclipse.jdt.core_*.jar \
%{e_core}/%{e_core_v2}/%{e_core}-%{e_core_v2}.jar
popd
%build
export TYCHO_TARGET_PLATFORM=%{_libdir}/eclipse
export TYCHO_TARGET_PLATFORM=%{eclipsedir}
# not needed when bootstrap is 0, but we build it anyway
mvn-rpmbuild -Dmaven.test.skip=true \
mvn-rpmbuild -Dmaven.local.debug=true -X -Dmaven.test.skip=true \
-Dmaven.local.depmap.file=%{SOURCE2} \
-Pbootstrap-1 \
-Dtycho.targetPlatform=$TYCHO_TARGET_PLATFORM install
mvn-rpmbuild -Dmaven.test.skip=true \
-Dmaven.local.depmap.file=%{SOURCE2} \
-Pbootstrap-2 \
-Dtycho.targetPlatform=$TYCHO_TARGET_PLATFORM install javadoc:aggregate
%install
mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
for mod in maven-osgi-{compiler,packaging,source}-plugin maven-tycho-plugin \
target-platform-configuration tycho-bootstrap-maven-plugin \
tycho-compiler-jdt tycho-equinox tycho-maven-plugin \
tycho-osgi-components tycho-release/tycho-{enforcer-rules,versions-plugin} \
tycho-p2/org.sonatype.tycho.{noopsecurity,p2{,.impl,.maven.repository,.publisher}}\
tycho-p2/tycho-p2-{director-plugin,facade,plugin,publisher-plugin,runtime} \
tycho-surefire/{maven-osgi-test-plugin,org.sonatype.tycho.surefire.{junit,junit4,osgibooter}};do
for mod in target-platform-configuration tycho-compiler-{jdt,plugin} \
tycho-{core,embedder-api,equinox{,-api,-launching}} \
tycho-{metadata-model,p2/tycho-p2-{director-plugin,facade,plugin,{publisher,repository}-plugin}} \
tycho-{maven,packaging,pomgenerator,source}-plugin tycho-release/tycho-versions-plugin \
tycho-p2-resolver/org.eclipse.tycho.p2.{resolver,tools}.facade \
tycho-p2-resolver/tycho-p2-resolver-impl/org* \
tycho-surefire/{tycho-surefire-plugin,org.eclipse.tycho.surefire.{osgibooter,junit,junit4}}; do
echo $mod
aid=`basename $mod`
suff=".jar"
if [ "$aid" == "tycho-p2-runtime" ];then
suff=".zip"
fi
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom
install -m 644 $mod/target/$aid-%{version}$suff %{buildroot}%{_javadir}/%{name}/$aid$suff
install -m 644 $mod/target/$aid-%{version}.jar %{buildroot}%{_javadir}/%{name}/$aid.jar
%add_to_maven_depmap org.eclipse.tycho $aid %{version} JPP/%{name} $aid
%add_to_maven_depmap org.sonatype.tycho $aid %{version} JPP/%{name} $aid
done
for pommod in tycho-p2 tycho-surefire;do
install -pm 644 $pommod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$pommod.pom
%add_to_maven_depmap org.sonatype.tycho $pommod %{version} JPP/%{name} $pommod
for pommod in tycho-p2 tycho-p2-resolver{,/tycho-p2-resolver-impl} \
tycho-surefire tycho-release \
;do
aid=`basename $pommod`
install -pm 644 $pommod/pom.xml \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom
%add_to_maven_depmap org.eclipse.tycho $aid %{version} JPP/%{name} $aid
%add_to_maven_depmap org.sonatype.tycho $aid %{version} JPP/%{name} $aid
done
# runtime
pushd tycho-p2-resolver/tycho-p2-resolver-impl/tycho-p2-runtime
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-p2-runtime.pom
install -m 644 target/tycho-p2-runtime-%{version}*.zip %{buildroot}%{_javadir}/%{name}/tycho-p2-runtime.zip
%add_to_maven_depmap org.eclipse.tycho tycho-p2-runtime %{version} JPP/%{name} tycho-p2-runtime
%add_to_maven_depmap org.sonatype.tycho tycho-p2-runtime %{version} JPP/%{name} tycho-p2-runtime
popd
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-main.pom
%add_to_maven_depmap org.eclipse.tycho %{name} %{version} JPP/%{name} main
%add_to_maven_depmap org.sonatype.tycho %{name} %{version} JPP/%{name} main
# javadoc
@ -189,17 +214,18 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
%update_maven_depmap
%files
%defattr(-,root,root,-)
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/%{name}
%{_javadir}/%{name}/
%doc README.md
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
* Fri May 27 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.12.0-0.1.a74b1717
- Update to new version do bootstrap from scratch
* Fri May 6 2011 Alexander Kurtakov <akurtako@redhat.com> 0.10.0-3
- Non-bootstrap build.