diff --git a/.gitignore b/.gitignore index 910d22a..9ddc454 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ maven-repo.tar.xz /eclipse-bootstrap.tar.xz /fedoraproject-p2-*.tar.xz /eclipse-bootstrap-neon.tar.xz +/eclipse-bootstrap-oxygen.tar.xz diff --git a/sources b/sources index e4146de..edd1e49 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -81f33bc522de3d1848d1d1b6a91f4d3f fedoraproject-p2-f0168e8.tar.xz -153d63d4b78d9b64eedc84ab6e780368 org.eclipse.tycho-tycho-0.26.0.tar.xz -05f6c0c84ad6e8a58000bca28c9ee3e5 eclipse-bootstrap-neon.tar.xz +SHA512 (fedoraproject-p2-f0168e8.tar.xz) = 4f6028b7e3901fd218ec61b368329bf3871d74b96b7339efc39a07bd009f194c7eeeb5abe77a7b94a4f6c13b5cb31b4a7914a28d90cfaed9a2706632e93556e3 +SHA512 (org.eclipse.tycho-tycho-1.0.0.tar.xz) = 31a082931e578c03d1a7e435944c0d61b1062a99b54c25ae67a705858691855fbd163eba01642210a7a11376e53f7ffa65b29df1f41f3f2dc71771df9d13f10a +SHA512 (eclipse-bootstrap-oxygen.tar.xz) = fb16850817ea87f8b458c050aa842c0662646c8a1f2c28a7e14c77bacb41a7a3cc978fc0ba2d6dfab854f6878c907e1e97a177f698c85ac5592de7b632ca9ec9 diff --git a/tycho-bootstrap.sh b/tycho-bootstrap.sh index 1e17239..c6e7ec2 100755 --- a/tycho-bootstrap.sh +++ b/tycho-bootstrap.sh @@ -120,7 +120,7 @@ mkdir -p 'eclipse/configuration' echo '#Product Runtime Configuration File #Thu Dec 19 21:40:37 EST 2013 -osgi.bundles=org.apache.commons.codec,org.apache.commons.logging,org.apache.httpcomponents.httpclient,org.apache.httpcomponents.httpcore,org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.net,org.eclipse.core.runtime@4\:start,org.eclipse.core.runtime.compatibility.registry,org.eclipse.ecf,org.eclipse.ecf.filetransfer,org.eclipse.ecf.identity,org.eclipse.ecf.provider.filetransfer,org.eclipse.ecf.provider.filetransfer.httpclient4,org.eclipse.ecf.provider.filetransfer.httpclient4.ssl,org.eclipse.ecf.provider.filetransfer.ssl,org.eclipse.ecf.ssl,org.eclipse.equinox.app,org.eclipse.equinox.common@2\:start,org.eclipse.equinox.concurrent,org.eclipse.equinox.ds@2\:start,org.eclipse.equinox.frameworkadmin,org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.launcher,org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.jarprocessor,org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.publisher.eclipse,org.eclipse.equinox.p2.repository,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.equinox.p2.transport.ecf,org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.equinox.security,org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.util,org.eclipse.osgi.services,org.eclipse.osgi.compatibility.state,org.eclipse.tycho.noopsecurity,org.sat4j.core,org.sat4j.pb,org.fedoraproject.p2 +osgi.bundles=org.apache.commons.codec,org.apache.commons.logging,org.apache.httpcomponents.httpclient,org.apache.httpcomponents.httpcore,org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.net,org.eclipse.core.runtime@4\:start,org.eclipse.core.runtime.compatibility.registry,org.eclipse.ecf,org.eclipse.ecf.filetransfer,org.eclipse.ecf.identity,org.eclipse.ecf.provider.filetransfer,org.eclipse.ecf.provider.filetransfer.httpclient4,org.eclipse.ecf.provider.filetransfer.httpclient4.ssl,org.eclipse.ecf.provider.filetransfer.ssl,org.eclipse.ecf.ssl,org.eclipse.equinox.app,org.eclipse.equinox.common@2\:start,org.eclipse.equinox.concurrent,org.eclipse.equinox.ds@2\:start,org.eclipse.equinox.frameworkadmin,org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.launcher,org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.jarprocessor,org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.publisher.eclipse,org.eclipse.equinox.p2.repository,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.equinox.p2.transport.ecf,org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.equinox.security,org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.util,org.eclipse.osgi.services,org.eclipse.osgi.compatibility.state,org.eclipse.tycho.noopsecurity,org.sat4j.core,org.sat4j.pb,org.apache.felix.scr,org.kxml2,org.xmlpull,org.fedoraproject.p2 osgi.bundles.defaultStartLevel=4 eclipse.product=org.eclipse.equinox.p2.director.app.product osgi.splashPath=platform\:/base/plugins/org' > 'eclipse/configuration/config.ini' diff --git a/tycho-debundle.sh b/tycho-debundle.sh index 59c046b..b7255f1 100755 --- a/tycho-debundle.sh +++ b/tycho-debundle.sh @@ -3,8 +3,8 @@ . $(pwd)/tycho-scripts.sh projLoc=$1 -zipLoc=$2 -mfLoc=$3 +zipLoc=$projLoc/target/*.zip +mfLoc=$2 zipDir=`dirname ${zipLoc}` zipFile=`basename ${zipLoc}` diff --git a/tycho-fix-bootstrap-build.patch b/tycho-fix-bootstrap-build.patch index bd3f3d4..04c4b8b 100644 --- a/tycho-fix-bootstrap-build.patch +++ b/tycho-fix-bootstrap-build.patch @@ -22,7 +22,7 @@ diff --git a/tycho-compiler-jdt/pom.xml b/tycho-compiler-jdt/pom.xml index 4c0c304..bfa9030 100644 --- a/tycho-compiler-jdt/pom.xml +++ b/tycho-compiler-jdt/pom.xml -@@ -23,8 +23,17 @@ +@@ -26,8 +26,17 @@ @@ -107,7 +107,7 @@ index 9f79a46..10628cf 100644 - org.apache.maven maven-compat - test + diff --git a/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml b/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml index 040a199..8fb2005 100644 --- a/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml @@ -165,7 +165,7 @@ diff --git a/tycho-p2/tycho-p2-publisher-plugin/pom.xml b/tycho-p2/tycho-p2-publ index e52cf18..bcd8c91 100644 --- a/tycho-p2/tycho-p2-publisher-plugin/pom.xml +++ b/tycho-p2/tycho-p2-publisher-plugin/pom.xml -@@ -52,17 +52,6 @@ +@@ -53,17 +53,6 @@ ${project.version} maven-plugin diff --git a/tycho-fix-surefire.patch b/tycho-fix-surefire.patch index 19d37bd..a5531bd 100644 --- a/tycho-fix-surefire.patch +++ b/tycho-fix-surefire.patch @@ -33,7 +33,7 @@ diff --git a/pom.xml b/pom.xml index c43cc8d..6e5fde4 100644 --- a/pom.xml +++ b/pom.xml -@@ -380,7 +380,7 @@ +@@ -390,7 +390,7 @@ org.apache.maven.plugins maven-surefire-plugin @@ -157,7 +157,7 @@ index 991edc1..83732d5 100644 +++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF @@ -5,9 +5,10 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2", Eclipse-AutoStart: true - Bundle-Version: 0.26.0 + Bundle-Version: 1.0.0 Bundle-ClassPath: ., - jars/surefire-booter-2.17.jar, - jars/surefire-api-2.17.jar, @@ -166,7 +166,7 @@ index 991edc1..83732d5 100644 + jars/surefire-api-2.19.1.jar, + jars/maven-surefire-common-2.19.1.jar, + jars/plexus-utils-3.0.jar - Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application (Incubation) + Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.tycho.surefire.osgibooter;singleton:=true diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml @@ -268,7 +268,7 @@ index cb2b826..bbe5f29 100644 --- a/tycho-surefire/pom.xml +++ b/tycho-surefire/pom.xml @@ -26,7 +26,7 @@ - Tycho Surefire Parent (Incubation) + Tycho Surefire Parent - 2.17 diff --git a/tycho-scripts.sh b/tycho-scripts.sh index e0568c4..216750c 100755 --- a/tycho-scripts.sh +++ b/tycho-scripts.sh @@ -57,7 +57,7 @@ cp "${basedir}/pom.xml" "${loc}/${bName}-${version}.pom" function copyBundles () { # scls='scl1 scl2 scl3' -baseLocations=( '/usr/share/java' '/usr/lib/java' '/usr/lib*/eclipse' ) +baseLocations=( '/usr/share/java' '/usr/lib/java' '/usr/lib/eclipse' ) osgiLocations=(${baseLocations[@]} ${osgiLocations[@]} ) for scl in ${scls} ; do osgiLocations=( ${baseLocations[@]/#//opt/rh/${scl}/root} ${osgiLocations[@]} ) diff --git a/tycho-use-custom-resolver.patch b/tycho-use-custom-resolver.patch index 4daf2a9..aa895d6 100644 --- a/tycho-use-custom-resolver.patch +++ b/tycho-use-custom-resolver.patch @@ -53,7 +53,7 @@ diff --git a/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/e index ed01c2d..759f005 100644 --- a/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java +++ b/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java -@@ -230,7 +230,14 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled implements Equino +@@ -239,7 +239,14 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled implements Equino if (verIdx > 0) { bundles.append(name.substring(0, verIdx)); } else { @@ -69,7 +69,7 @@ index ed01c2d..759f005 100644 } } } -@@ -238,7 +245,7 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled implements Equino +@@ -247,7 +254,7 @@ public class DefaultEquinoxEmbedder extends AbstractLogEnabled implements Equino } protected boolean isFrameworkBundle(File file) { @@ -350,10 +350,13 @@ diff --git a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product index 7c99168..28ad59f 100644 --- a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product +++ b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product -@@ -77,6 +77,7 @@ +@@ -77,6 +77,10 @@ ++ ++ ++ + @@ -450,7 +453,7 @@ index dfd4b6f..c05fcd8 100644 import org.eclipse.tycho.core.ee.shared.ExecutionEnvironmentConfiguration; import org.eclipse.tycho.core.osgitools.targetplatform.LocalDependencyResolver; import org.eclipse.tycho.core.osgitools.targetplatform.MultiEnvironmentDependencyArtifacts; -@@ -91,15 +94,35 @@ public abstract class AbstractTychoProject extends AbstractLogEnabled implements +@@ -94,15 +97,35 @@ public abstract class AbstractTychoProject extends AbstractLogEnabled implements String configuredForcedProfile = tpConfiguration.getExecutionEnvironment(); if (configuredForcedProfile != null) { @@ -490,7 +493,7 @@ diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundl index fae4eb7..3f5289c 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java -@@ -492,6 +492,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro +@@ -502,6 +502,7 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro String pdeProfile = getEclipsePluginProject(DefaultReactorProject.adapt(project)).getBuildProperties() .getJreCompilationProfile(); if (pdeProfile != null) { @@ -498,7 +501,7 @@ index fae4eb7..3f5289c 100644 sink.setProfileConfiguration(pdeProfile.trim(), "build.properties"); } else { -@@ -502,13 +503,13 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro +@@ -512,13 +513,13 @@ public class OsgiBundleProject extends AbstractTychoProject implements BundlePro switch (tpConfiguration.getBREEHeaderSelectionPolicy()) { case first: @@ -544,7 +547,7 @@ index c7d95df..ac5bae7 100644 import java.util.ArrayList; import java.util.List; import java.util.Map; -@@ -162,36 +164,49 @@ public class TychoOsgiRuntimeLocator implements EquinoxRuntimeLocator { +@@ -163,36 +165,49 @@ public class TychoOsgiRuntimeLocator implements EquinoxRuntimeLocator { File artifactFile = new File(session.getLocalRepository().getBasedir(), session.getLocalRepository() .pathOf(artifact)); File eclipseDir = new File(artifactFile.getParentFile(), "eclipse"); @@ -620,7 +623,7 @@ diff --git a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolve index ae2dc38..a0c9969 100644 --- a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java +++ b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java -@@ -86,6 +86,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory; +@@ -88,6 +88,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory; import org.eclipse.tycho.p2.target.facade.PomDependencyCollector; import org.eclipse.tycho.p2.target.facade.TargetPlatformConfigurationStub; import org.eclipse.tycho.repository.registry.facade.ReactorRepositoryManagerFacade; @@ -628,7 +631,7 @@ index ae2dc38..a0c9969 100644 @Component(role = DependencyResolver.class, hint = P2DependencyResolver.ROLE_HINT, instantiationStrategy = "per-lookup") public class P2DependencyResolver extends AbstractLogEnabled implements DependencyResolver, Initializable { -@@ -206,6 +207,13 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen +@@ -208,6 +209,13 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen pomDependencies.setProjectLocation(project.getBasedir()); } diff --git a/tycho.spec b/tycho.spec index cdced07..55a56ac 100644 --- a/tycho.spec +++ b/tycho.spec @@ -15,7 +15,7 @@ # %%global snap -SNAPSHOT %global snap %{nil} -%global git_tag tycho-0.26.0 +%global git_tag tycho-1.0.0 %global fp_p2_sha f0168e8 %global fp_p2_version 0.0.1 @@ -24,8 +24,8 @@ %define __requires_exclude osgi* Name: tycho -Version: 0.26.0 -Release: 3%{?dist} +Version: 1.0.0 +Release: 1%{?dist} Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven # license file is missing but all files having some licensing information are ASL 2.0 @@ -43,7 +43,7 @@ Source4: tycho-debundle.sh # Fedora Eclipse bundles needed to build Tycho when Eclipse is not present # or when the Eclipse that is present is not compatible %if %{eclipse_bootstrap} -Source5: eclipse-bootstrap-neon.tar.xz +Source5: eclipse-bootstrap-oxygen.tar.xz %endif # Eclipse Plugin Project supporting filesystem as p2 repository # https://github.com/rgrunber/fedoraproject-p2 @@ -94,14 +94,14 @@ BuildRequires: %{name} # Dependencies for Eclipse bundles we use BuildRequires: eclipse-filesystem BuildRequires: apache-commons-jxpath -BuildRequires: geronimo-annotation +BuildRequires: felix-scr BuildRequires: glassfish-jsp-api BuildRequires: icu4j BuildRequires: sac BuildRequires: sat4j BuildRequires: xz-java %else -BuildRequires: eclipse-platform >= 1:4.6.0 +BuildRequires: eclipse-platform >= 1:4.7.0 %endif BuildRequires: jetty-http BuildRequires: jetty-util @@ -111,17 +111,11 @@ BuildRequires: jetty-servlet BuildRequires: maven-shared-utils BuildRequires: mockito -Requires: apache-commons-exec -Requires: decentxml Requires: maven-local Requires: xmvn -Requires: maven-dependency-plugin -Requires: maven-verifier -Requires: objectweb-asm Requires: ecj >= 1:4.5.2-2 -Requires: maven-plugin-testing-harness %if ! %{eclipse_bootstrap} -Requires: eclipse-platform >= 1:4.6.0 +Requires: eclipse-platform >= 1:4.7.0 %endif # Tycho always tries to resolve all build plugins, even if they are @@ -129,6 +123,7 @@ Requires: eclipse-platform >= 1:4.6.0 # to resolve plugins like clean, deploy or site, which aren't normally # used during package build. See rhbz#971301 Requires: maven-clean-plugin +Requires: maven-dependency-plugin Requires: maven-deploy-plugin Requires: maven-install-plugin Requires: maven-site-plugin @@ -185,8 +180,6 @@ tar -xf %{SOURCE6} %patch7 -p0 %patch8 -p0 -find tycho-core -iname '*html' -delete - sed -i -e 's/org.apache.maven.it.util.DirectoryScanner/org.apache.maven.shared.utils.io.DirectoryScanner/g' tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java # Move from org.sonatype.aether to org.eclipse.aether @@ -218,19 +211,19 @@ done sed -i -e 's/org\.hamcrest/org.hamcrest.core/' tycho-bundles/pom.xml sed -i -e 's/org\.mockito/org.mockito.mockito-core/' \ tycho-bundles/org.eclipse.tycho.p2.tools.tests/META-INF/MANIFEST.MF \ - tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF + tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF \ + tycho-bundles/org.eclipse.tycho.p2.resolver.shared.tests/META-INF/MANIFEST.MF # Bootstrap Build %if %{eclipse_bootstrap} # Unpack a compatible version of Eclipse we can use to build against tar -xf %{SOURCE5} -ln -s lib64 bootstrap/usr/lib # Install OSGi bundles into local repo to override any incompatible system version # that may be already installed pushd bootstrap -for f in usr/lib64/eclipse/plugins/org.eclipse.osgi.compatibility.state_*.jar \ - usr/lib64/eclipse/plugins/org.eclipse.osgi.services_*.jar \ - usr/lib64/eclipse/plugins/org.eclipse.osgi_*.jar ; do +for f in usr/lib/eclipse/plugins/org.eclipse.osgi.compatibility.state_*.jar \ + usr/lib/eclipse/plugins/org.eclipse.osgi.services_*.jar \ + usr/lib/eclipse/plugins/org.eclipse.osgi_*.jar ; do xmvn -o install:install-file -Dfile=$f -Dpackaging=jar -DgroupId=org.eclipse.tycho -Dmaven.repo.local=$(pwd)/../.m2 \ -DartifactId=$(echo $(basename $f) | cut -d_ -f1) -Dversion=$(echo "${f%.jar}" | cut -d_ -f2) done @@ -255,7 +248,7 @@ cp %{SOURCE2} %{SOURCE3} . # be cyclic dependencies. medadataFile=%{_datadir}/maven-metadata/tycho.xml -sysVer=`grep -C 1 "tycho" %{_mavenpomdir}/JPP.tycho-main.pom | grep "version" | sed 's/.*>\(.*\)<.*/\1/'` +sysVer=`grep -C 1 "tycho" %{_mavenpomdir}/tycho/tycho.pom | grep "version" | sed 's/.*>\(.*\)<.*/\1/'` mkdir boot # Copy Tycho POMs from system repo and set their versions to %%{version}-SNAPSHOT. @@ -274,9 +267,9 @@ jar uf boot/tycho-maven-plugin.jar META-INF/plexus/components.xml # Create XMvn metadata for the new JARs and POMs by customizing system Tycho metadata. sed ' - s|>/[^<]*/\([^/]*\.pom\)|>'$PWD'/boot/\1| - s|>'$sysVer'|>%{version}-SNAPSHOT<\1:compatVersions><\1:version>%{version}-SNAPSHOT| - s|>'%{fp_p2_version}%{fp_p2_snap}'|>%{fp_p2_version}<\1:compatVersions><\1:version>%{fp_p2_version}| + s|>/[^<]*/\([^/]*\.pom\)|>'$PWD'/boot/\1| + s|>'$sysVer'|>%{version}-SNAPSHOT%{version}-SNAPSHOT| + s|>'%{fp_p2_version}%{fp_p2_snap}'|>%{fp_p2_version}%{fp_p2_version}| s|%{_javadir}/tycho/tycho-maven-plugin.jar|'$PWD'/boot/tycho-maven-plugin.jar| ' $medadataFile >boot/tycho-metadata.xml %mvn_config resolverSettings/metadataRepositories/repository $PWD/boot/tycho-metadata.xml @@ -287,126 +280,75 @@ sed ' %pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-compiler-plugin %pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-packaging-plugin +# Glassfish instead of tomcat servlet api (fix submitted upstream ebz#515691) sed -i -e "s|javax.servlet|javax.servlet-api|g" tycho-bundles/org.eclipse.tycho.test.utils/META-INF/MANIFEST.MF +# Avoid duplicate execution of clean when generating javadocs, see ebz#399756 +%pom_add_plugin :maven-clean-plugin tycho-bundles/tycho-standalone-p2-director " + + + default-clean-1 + initialize + + true + + +" + +# Add fp-p2 to main build +%pom_xpath_inject "pom:modules" "fedoraproject-p2" + %build -xmvn -o -Dtycho-version=%{version}-SNAPSHOT -Dmaven.test.skip=true \ --Dmaven.repo.local=$(pwd)/.m2 -Dfedora.p2.repos=$(pwd)/bootstrap \ --f fedoraproject-p2/pom.xml \ -clean install org.apache.maven.plugins:maven-javadoc-plugin:aggregate +%mvn_build -f -- \ + -Dtycho-version=%{version}-SNAPSHOT -DtychoBootstrapVersion=%{version}-SNAPSHOT \ + -Dmaven.repo.local=$(pwd)/.m2 -Dfedora.p2.repos=$(pwd)/bootstrap -xmvn -o -DtychoBootstrapVersion=%{version}-SNAPSHOT -Dmaven.test.skip=true \ --Dmaven.repo.local=$(pwd)/.m2 -Dfedora.p2.repos=$(pwd)/bootstrap \ -clean install org.apache.maven.plugins:maven-javadoc-plugin:aggregate +%mvn_artifact fedoraproject-p2/org.fedoraproject.p2/pom.xml -%install -cp %{SOURCE2} %{SOURCE4} . +# Relying on xmvn p2 plugin being present would be a circular dep +# So install as if all artifacts are normal jar files +sed -i -e 's|type>eclipse.*<|type>jar<|' .xmvn-reactor -install -dm 755 $RPM_BUILD_ROOT%{_javadir}/tycho -install -dm 755 $RPM_BUILD_ROOT%{_mavenpomdir} - -# fedoraproject-p2 parent -mod=fedoraproject-p2 -install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$mod.pom -%add_maven_depmap JPP.%{name}-$mod.pom - -# fedoraproject-p2 -for mod in fedoraproject-p2/{org.fedoraproject.p2,xmvn-p2-installer-plugin}; do - echo $mod - aid=`basename $mod` - install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom - install -m 644 $mod/target/$aid-%{fp_p2_version}%{fp_p2_snap}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$aid.jar - %add_maven_depmap JPP.%{name}-$aid.pom %{name}/$aid.jar -a "org.eclipse.tycho:$aid" -done +# Don't package target platform definition files +%mvn_package "::target::" __noinstall -# pom and jar installation -for mod in target-platform-configuration tycho-compiler-{jdt,plugin} \ - tycho-{artifactcomparator,core,embedder-api,metadata-model,testing-harness} \ - sisu-equinox/sisu-equinox{-api,-launching,-embedder} \ - tycho-p2/tycho-p2-{facade,plugin,{director,publisher,repository}-plugin} \ - tycho-{maven,packaging,pomgenerator,release/tycho-versions,source}-plugin \ - tycho-bundles/org* \ - tycho-surefire/{tycho-surefire-plugin,org.eclipse.tycho.surefire.{osgibooter,testng,junit,junit4{,7}}}; do - echo $mod - aid=`basename $mod` - install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom - install -m 644 $mod/target/$aid-%{version}%{snap}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/$aid.jar - %add_maven_depmap JPP.%{name}-$aid.pom %{name}/$aid.jar -a "org.eclipse.tycho:$aid" -done - -# pom installation -for pommod in tycho-p2 tycho-bundles tycho-surefire \ - tycho-release sisu-equinox; do - aid=`basename $pommod` - install -pm 644 $pommod/pom.xml \ - $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom - %add_maven_depmap JPP.%{name}-$aid.pom -a "org.eclipse.tycho:$aid" -done +%install +# Get debundling scripts +cp %{SOURCE2} %{SOURCE4} . -# p2 runtime -dir=.m2/org/eclipse/tycho/tycho-bundles-external/%{version}%{snap} %if ! %{eclipse_bootstrap} -./%{name}-debundle.sh tycho-bundles/tycho-bundles-external/ $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external-manifest.txt -%endif -install -pm 644 $dir/tycho-bundles-external-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-bundles-external.pom -install -m 644 $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external.zip -%add_maven_depmap JPP.%{name}-tycho-bundles-external.pom %{name}/tycho-bundles-external.zip -a "org.eclipse.tycho:tycho-bundles-external" -%if ! %{eclipse_bootstrap} -%add_maven_depmap org.eclipse.tycho:tycho-bundles-external:txt:manifest:%{version}%{snap} %{name}/tycho-bundles-external-manifest.txt -%endif +# Debundle p2 runtime +./%{name}-debundle.sh $(pwd)/tycho-bundles/tycho-bundles-external \ + $(pwd)/tycho-bundles/tycho-bundles-external/target/tycho-bundles-external-manifest.txt +%mvn_artifact org.eclipse.tycho:tycho-bundles-external:txt:manifest:%{version} tycho-bundles/tycho-bundles-external/target/tycho-bundles-external-manifest.txt -# main -install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-main.pom -%add_maven_depmap JPP.%{name}-main.pom - -# standalone p2 director -%if ! %{eclipse_bootstrap} -./%{name}-debundle.sh tycho-bundles/tycho-standalone-p2-director/ .m2/org/eclipse/tycho/tycho-standalone-p2-director/%{version}%{snap}/tycho-standalone-p2-director-%{version}*.zip +# Debundle standalone p2 director +./%{name}-debundle.sh $(pwd)/tycho-bundles/tycho-standalone-p2-director %endif -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 -%add_maven_depmap JPP.%{name}-tycho-standalone-p2-director.pom tycho/tycho-standalone-p2-director.zip -a "org.eclipse.tycho:tycho-standalone-p2-director" - -# javadoc -install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/tycho -cp -pr target/site/api*/* $RPM_BUILD_ROOT%{_javadocdir}/tycho - -# p2-install script -install -dm 755 $RPM_BUILD_ROOT%{_javadir}-utils/ -install -pm 755 %{SOURCE7} $RPM_BUILD_ROOT%{_javadir}-utils/ +# Install our own copy of OSGi runtime when bootstrapping to avoid external dep on Eclipse %if %{eclipse_bootstrap} -# org.eclipse.osgi -osgiJarPath=$(find .m2/org/eclipse/tycho/org.eclipse.osgi/*/ -name "*.jar") -osgiPomPath=$(find .m2/org/eclipse/tycho/org.eclipse.osgi/*/ -name "*.pom") - -install -pm 644 $osgiPomPath $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.tycho-osgi.pom -install -m 644 -T $osgiJarPath $RPM_BUILD_ROOT%{_javadir}/tycho/osgi.jar -%add_maven_depmap JPP.tycho-osgi.pom tycho/osgi.jar -a "org.eclipse.osgi:org.eclipse.osgi" - -# org.eclipse.osgi.compatibility.state -osgiStateJarPath=$(find .m2/org/eclipse/tycho/org.eclipse.osgi.compatibility.state/*/ -name "*.jar") -osgiStatePomPath=$(find .m2/org/eclipse/tycho/org.eclipse.osgi.compatibility.state/*/ -name "*.pom") - -install -pm 644 $osgiStatePomPath $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.tycho-osgi.compatibility.state.pom -install -m 644 -T $osgiStateJarPath $RPM_BUILD_ROOT%{_javadir}/tycho/osgi.compatibility.state.jar -%add_maven_depmap JPP.tycho-osgi.compatibility.state.pom tycho/osgi.compatibility.state.jar -a "org.eclipse.osgi:org.eclipse.osgi.compatibility.state" +for b in org.eclipse.osgi \ + org.eclipse.osgi.compatibility.state \ + org.eclipse.osgi.services ; do + osgiJarPath=$(find .m2/org/eclipse/tycho/$b/*/ -name "*.jar") + osgiPomPath=$(find .m2/org/eclipse/tycho/$b/*/ -name "*.pom") + %mvn_artifact $osgiPomPath $osgiJarPath + %mvn_alias "org.eclipse.tycho:$b" "org.eclipse.osgi:$b" +done +%endif -# org.eclipse.osgi.services -osgiServJarPath=$(find .m2/org/eclipse/tycho/org.eclipse.osgi.services/*/ -name "*.jar") -osgiServPomPath=$(find .m2/org/eclipse/tycho/org.eclipse.osgi.services/*/ -name "*.pom") +%mvn_install +sed -i '//d' %{buildroot}%{_datadir}/maven-metadata/tycho.xml -install -pm 644 $osgiServPomPath $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.tycho-osgi.services.pom -install -m 644 -T $osgiJarPath $RPM_BUILD_ROOT%{_javadir}/tycho/osgi.services.jar -%add_maven_depmap JPP.tycho-osgi.services.pom tycho/osgi.services.jar -a "org.eclipse.osgi:org.eclipse.osgi.services" -%endif +# p2-install script +install -dm 755 %{buildroot}%{_javadir}-utils/ +install -pm 755 %{SOURCE7} %{buildroot}%{_javadir}-utils/ # Symlink XMvn P2 plugin with all dependencies so that it can be loaded by XMvn install -dm 755 %{buildroot}%{_datadir}/xmvn/lib/installer/ %if %{eclipse_bootstrap} -ln -s %{_javadir}/tycho/osgi.jar %{buildroot}%{_datadir}/xmvn/lib/installer/ +ln -s %{_javadir}/tycho/org.eclipse.osgi.jar %{buildroot}%{_datadir}/xmvn/lib/installer/ %else ln -s %{_javadir}/eclipse/osgi.jar %{buildroot}%{_datadir}/xmvn/lib/installer/ %endif @@ -418,10 +360,15 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{_datadir}/xmvn/li %{_javadir}-utils/p2-install.sh %doc README.md -%files javadoc -%{_javadocdir}/tycho +%files javadoc -f .mfiles-javadoc %changelog +* Thu Apr 20 2017 Mat Booth - 1.0.0-1 +- Update to 1.0.0 +- Simplify artifact installation +- Tycho 1.0 requires Eclipse Oxygen +- Add felix-scr and deps to tycho-bundles-external + * Thu Apr 20 2017 Mat Booth - 0.26.0-3 - Fix and enable bootstrap mode