From 43e579bd3bdf06cd27d7bd66a653719c7feaa758 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Thu, 9 Jan 2014 15:05:09 -0500 Subject: [PATCH] Fix bootstrap build. --- sources | 2 +- tycho-fix-bootstrap-build.patch | 63 +++++++++++++++++++++++---------- tycho.spec | 27 +++++++------- 3 files changed, 60 insertions(+), 32 deletions(-) diff --git a/sources b/sources index 9d741ae..4ba858c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 012fd267fc85a6b3372acac6e4860e76 tycho-0.19.x.tar.bz2 -42dfaf1a7768e5ddb6268ae7e4ad2e11 maven-repo.tar.xz +183829fbd3e779e4ee68f91d2140d90f maven-repo.tar.xz diff --git a/tycho-fix-bootstrap-build.patch b/tycho-fix-bootstrap-build.patch index 77867b1..ba7a35f 100644 --- a/tycho-fix-bootstrap-build.patch +++ b/tycho-fix-bootstrap-build.patch @@ -1,4 +1,4 @@ -From 446e73cd3c2ef5ed8d5dc57615d88ef36445bafa Mon Sep 17 00:00:00 2001 +From 4ff6d1a5652d8825611cb3dd016b50eb0454883b Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Mon, 19 Nov 2012 10:33:43 -0500 Subject: [PATCH] Minor fixes of limited scope to get a Tycho bootstrapped @@ -18,12 +18,26 @@ the same. Change-Id: Ib8f471e5df40eb06da4f2d4ca6c2d3ab14f5dc99 --- - .../main/java/org/eclipse/tycho/test/util/HttpServer.java | 5 ++--- - .../tycho-bundles-target/tycho-bundles-target.target | 12 ++++++------ - .../java/org/eclipse/tycho/core/osgitools/OsgiManifest.java | 12 ++++++------ - tycho-surefire/pom.xml | 2 +- - 4 files changed, 15 insertions(+), 16 deletions(-) + .../META-INF/MANIFEST.MF | 2 +- + .../java/org/eclipse/tycho/test/util/HttpServer.java | 5 ++--- + .../tycho-bundles-target/tycho-bundles-target.target | 20 ++++++++++---------- + .../eclipse/tycho/core/osgitools/OsgiManifest.java | 12 ++++++------ + tycho-surefire/pom.xml | 2 +- + 5 files changed, 20 insertions(+), 21 deletions(-) +diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF +index 0a01dd5..1d0965a 100644 +--- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF ++++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF +@@ -9,7 +9,7 @@ Fragment-Host: org.eclipse.tycho.p2.maven.repository + Require-Bundle: org.junit, + org.eclipse.equinox.p2.publisher, + org.eclipse.equinox.ds, +- org.mockito.mockito-core ++ org.mockito + Import-Package: org.eclipse.tycho.locking.facade, + org.eclipse.tycho.repository.local.testutil, + org.eclipse.tycho.repository.streaming.testutil, diff --git a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java index 47423e5..4b4c600 100644 --- a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java @@ -50,24 +64,37 @@ index 47423e5..4b4c600 100644 jetty.addConnector(connector); diff --git a/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target b/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target -index 2a04214..400117a 100644 +index b099b7d..6031d7b 100644 --- a/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target +++ b/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target -@@ -2,16 +2,16 @@ - +@@ -1,14 +1,14 @@ + + - -- -- -- -- +- +- +- +- +- +- ++ + + + + - ++ - +- ++ + + + +@@ -18,10 +18,10 @@ + + + +- ++ - - @@ -132,7 +159,7 @@ index 1aec480..0eeb0fa 100644 throw new OsgiManifestParserException(location, e); } diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml -index 7b9697c..43ab800 100644 +index 811dff0..ea2f657 100644 --- a/tycho-surefire/pom.xml +++ b/tycho-surefire/pom.xml @@ -41,7 +41,7 @@ @@ -145,5 +172,5 @@ index 7b9697c..43ab800 100644 -- -1.8.1.4 +1.8.3.1 diff --git a/tycho.spec b/tycho.spec index 0d87a76..d112137 100644 --- a/tycho.spec +++ b/tycho.spec @@ -9,7 +9,7 @@ Name: tycho Version: 0.19.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven Group: Development/Libraries @@ -95,6 +95,10 @@ Requires: maven-jar-plugin Requires: maven-resources-plugin Requires: maven-site-plugin Requires: maven-surefire-plugin +%if %{bootstrap} +BuildRequires: maven-deploy-plugin +BuildRequires: maven-site-plugin +%endif %description @@ -162,7 +166,7 @@ tar -xf %{SOURCE4} # EXACT version in reactor cache to build against when bootstrapping # If we built our own Tycho locally and put it into reactor cache instead # of using upstream's then we need to make sure the build finds it. -sed -i 's/0.16.0<\/tychoBootstrapVersion>/0.18.0<\/tychoBootstrapVersion>/' pom.xml +sed -i 's/0.18.1<\/tychoBootstrapVersion>/0.18.1<\/tychoBootstrapVersion>/' pom.xml # gid:aid used by bootstrapped build dependencies mkdir -p .m2/org/ow2/asm/asm-debug-all/4.0/ @@ -173,8 +177,9 @@ popd %patch7 -p1 -# Tycho can't use cached composite repository metadata so use other type -sed -i 's/releases\/kepler\//releases\/kepler\/201306260900/' tycho-bundles/tycho-bundles-target/tycho-bundles-target.target +# Tests are skipped anyways, so remove some test dependencies +%pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-compiler-plugin +%pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-packaging-plugin # Non-Bootstrap Build %else @@ -211,7 +216,7 @@ fi %endif %build -%mvn_build -f -i -g clean -- -Dmaven.repo.local=$(pwd)/.m2 +xmvn -o -Dmaven.test.skip=true -Dmaven.repo.local=$(pwd)/.m2 clean install org.apache.maven.plugins:maven-javadoc-plugin:aggregate %install @@ -254,7 +259,7 @@ install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-main.pom %add_maven_depmap JPP.%{name}-main.pom -a "org.eclipse.tycho:$aid,org.sonatype.tycho:$aid" # standalone p2 director -pushd .m2/org/eclipse/tycho/tycho-standalone-p2-director/%{version}*/ +pushd .m2/org/eclipse/tycho/tycho-standalone-p2-director/%{version}%{snap}/ install -m 644 tycho-standalone-p2-director-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-standalone-p2-director.zip install -pm 644 tycho-standalone-p2-director-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-standalone-p2-director.pom popd @@ -272,13 +277,6 @@ osgiJarPath=`find ".m2" -name "org.eclipse.osgi_*.jar"` osgiJar=`basename $osgiJarPath` osgiVer=`echo $osgiJar | sed 's/^.*_//' | sed 's/.jar//'` -mvn-rpmbuild org.apache.maven.plugins:maven-install-plugin:install-file \ --Dfile=$osgiJarPath \ --Dpackaging=jar \ --DgroupId=org.eclipse.tycho \ --DartifactId=org.eclipse.osgi \ --Dversion=$osgiVer - osgiPomPath=`find ".m2/org/eclipse/tycho/org.eclipse.osgi" -name "org.eclipse.osgi-$osgiVer.pom"` install -pm 644 $osgiPomPath $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.tycho-osgi.pom @@ -296,6 +294,9 @@ install -m 644 $osgiJarPath $RPM_BUILD_ROOT%{_javadir}/%{name}/osgi.jar %{_javadocdir}/%{name} %changelog +* Thu Jan 09 2014 Roland Grunberg - 0.19.0-7 +- Fix bootstrap build. + * Mon Jan 6 2014 Mikolaj Izdebski - 0.19.0-6 - Fix usage of %%add_maven_depmap for zip files - Resolves: rhbz#1004310