|
 |
4c9427 |
%global pkg_name tycho
|
|
 |
4c9427 |
%{?scl:%scl_package %{pkg_name}}
|
|
 |
4c9427 |
# Bootstrap build
|
|
 |
4c9427 |
# Tycho depends on itself, and Eclipse to build but in certain cases
|
|
 |
4c9427 |
# these requirements may not be satisfiable.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Set 'tycho_bootstrap' if Tycho from buildroot is broken or non-existent
|
|
 |
4c9427 |
# This basically uses javac + xmvn to build only the Tycho components
|
|
 |
4c9427 |
# required to perform a full Tycho build
|
|
 |
4c9427 |
# Most common usage : A library (in Fedora) used by Tycho's runtime broke API
|
|
 |
4c9427 |
%global tycho_bootstrap 0
|
|
 |
4c9427 |
# Set 'eclipse_bootstrap' if Eclipse from buildroot cannot help build Tycho
|
|
 |
4c9427 |
# This basically provides a location for usage of pre-bundled Eclipse
|
|
 |
4c9427 |
# Possible uses : Need to build Tycho before Eclipse in fresh buildroot
|
|
 |
4c9427 |
%global eclipse_bootstrap 0
|
|
 |
4c9427 |
# When building version under development (non-release)
|
|
 |
4c9427 |
# %%global snap -SNAPSHOT
|
|
 |
4c9427 |
%global snap %{nil}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%global git_tag tycho-0.23.0
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%global fp_p2_sha 09403d
|
|
 |
4c9427 |
%global fp_p2_version 0.0.1
|
|
 |
4c9427 |
%global fp_p2_snap -SNAPSHOT
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%define __requires_exclude osgi*
|
|
 |
4c9427 |
%{?java_common_find_provides_and_requires}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Name: %{?scl_prefix}tycho
|
|
 |
4c9427 |
Version: 0.23.0
|
|
 |
4c9427 |
Release: 8.2%{?dist}
|
|
 |
4c9427 |
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# license file is missing but all files having some licensing information are ASL 2.0
|
|
 |
4c9427 |
License: ASL 2.0 and EPL
|
|
 |
4c9427 |
URL: http://eclipse.org/tycho
|
|
 |
4c9427 |
Source0: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/org.eclipse.tycho-%{git_tag}.tar.xz
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# this is a workaround for maven-plugin-plugin changes that happened after
|
|
 |
4c9427 |
# version 2.4.3 (impossible to have empty mojo created as aggregate). This
|
|
 |
4c9427 |
# should be fixed upstream properly
|
|
 |
4c9427 |
Source1: EmptyMojo.java
|
|
 |
4c9427 |
Source2: %{pkg_name}-scripts.sh
|
|
 |
4c9427 |
Source3: %{pkg_name}-bootstrap.sh
|
|
 |
4c9427 |
Source4: %{pkg_name}-debundle.sh
|
|
 |
4c9427 |
# Fedora Eclipse bundles (needed when Eclipse not present) to build Tycho
|
|
 |
4c9427 |
%if %{eclipse_bootstrap}
|
|
 |
4c9427 |
Source5: eclipse-bootstrap.tar.xz
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
# Eclipse Plugin Project supporting filesystem as p2 repository
|
|
 |
4c9427 |
# https://github.com/rgrunber/fedoraproject-p2
|
|
 |
4c9427 |
# Generated using 'git archive --prefix=fedoraproject-p2/ -o fedoraproject-p2-%%{fp_p2_sha}.tar %%{fp_p2_sha} && xz fedoraproject-p2-%%{fp_p2_sha}.tar'
|
|
 |
4c9427 |
Source6: fedoraproject-p2-%{fp_p2_sha}.tar.xz
|
|
 |
4c9427 |
# Script that can be used to install or simulate installation of P2
|
|
 |
4c9427 |
# artifacts. It is used in OSGi requires generation.
|
|
 |
4c9427 |
Source7: p2-install.sh
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Patch0: %{pkg_name}-fix-build.patch
|
|
 |
4c9427 |
Patch1: %{pkg_name}-port-to-maven-3.0.5.patch
|
|
 |
4c9427 |
Patch2: %{pkg_name}-fix-surefire.patch
|
|
 |
4c9427 |
Patch3: %{pkg_name}-use-custom-resolver.patch
|
|
 |
4c9427 |
Patch4: %{pkg_name}-maven-delegation.patch
|
|
 |
4c9427 |
# Additional changes needed just for bootstrap build
|
|
 |
4c9427 |
Patch5: %{pkg_name}-fix-bootstrap-build.patch
|
|
 |
4c9427 |
Patch6: %{pkg_name}-port-to-jetty-9.3.0.patch
|
|
 |
4c9427 |
Patch7: %{pkg_name}-java-7-compatibility.patch
|
|
 |
4c9427 |
Patch8: %{pkg_name}-port-to-xmvn-2.1.0.patch
|
|
 |
4c9427 |
|
|
 |
4c9427 |
BuildArch: noarch
|
|
 |
4c9427 |
|
|
 |
4c9427 |
#BuildRequires: java-devel >= 1:1.8
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}maven-local >= 4.2.0
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}maven-clean-plugin
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}maven-dependency-plugin
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}maven-install-plugin
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}maven-release-plugin
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}maven-verifier
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}objectweb-asm5
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}plexus-containers-component-metadata
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}apache-commons-exec
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}bcel
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix}decentxml
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}easymock3
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}ecj >= 4.4.2
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}maven-plugin-testing-harness
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}xmvn-parent-pom
|
|
 |
4c9427 |
%if %{tycho_bootstrap}
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}maven-deploy-plugin
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}maven-site-plugin
|
|
 |
4c9427 |
%else
|
|
 |
4c9427 |
BuildRequires: %{name}
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
%if %{eclipse_bootstrap}
|
|
 |
4c9427 |
# Dependencies for Eclipse bundles we use
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix}eclipse-filesystem
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}apache-commons-jxpath
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}geronimo-annotation
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}glassfish-jsp-api
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix}icu4j
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}sac
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix}sat4j
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}xz-java
|
|
 |
4c9427 |
%else
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix}eclipse-platform
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}jetty-http
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}jetty-util
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}jetty-security
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}jetty-server
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_java_common}jetty-servlet
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix_maven}maven-shared-utils
|
|
 |
4c9427 |
BuildRequires: %{?scl_prefix}mockito
|
|
 |
4c9427 |
BuildRequires: zip
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Requires: %{?scl_prefix_maven}apache-commons-exec
|
|
 |
4c9427 |
Requires: %{?scl_prefix}decentxml
|
|
 |
4c9427 |
Requires: %{?scl_prefix_java_common}maven-local >= 4.2.0
|
|
 |
4c9427 |
Requires: %{?scl_prefix_maven}maven-dependency-plugin
|
|
 |
4c9427 |
Requires: %{?scl_prefix_maven}maven-verifier
|
|
 |
4c9427 |
Requires: %{?scl_prefix_java_common}objectweb-asm5
|
|
 |
4c9427 |
Requires: %{?scl_prefix_java_common}ecj >= 4.4.2
|
|
 |
4c9427 |
%if ! %{eclipse_bootstrap}
|
|
 |
4c9427 |
Requires: %{?scl_prefix}eclipse-platform
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Tycho always tries to resolve all build plugins, even if they are
|
|
 |
4c9427 |
# not needed during Maven lifecycle. This means that Tycho will try
|
|
 |
4c9427 |
# to resolve plugins like clean, deploy or site, which aren't normally
|
|
 |
4c9427 |
# used during package build. See rhbz#971301
|
|
 |
4c9427 |
Requires: %{?scl_prefix_maven}maven-clean-plugin
|
|
 |
4c9427 |
Requires: %{?scl_prefix_maven}maven-deploy-plugin
|
|
 |
4c9427 |
Requires: %{?scl_prefix_maven}maven-install-plugin
|
|
 |
4c9427 |
Requires: %{?scl_prefix_maven}maven-site-plugin
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%description
|
|
 |
4c9427 |
Tycho is a set of Maven plugins and extensions for building Eclipse
|
|
 |
4c9427 |
plugins and OSGI bundles with Maven. Eclipse plugins and OSGI bundles
|
|
 |
4c9427 |
have their own metadata for expressing dependencies, source folder
|
|
 |
4c9427 |
locations, etc. that are normally found in a Maven POM. Tycho uses
|
|
 |
4c9427 |
native metadata for Eclipse plugins and OSGi bundles and uses the POM
|
|
 |
4c9427 |
to configure and drive the build. Tycho supports bundles, fragments,
|
|
 |
4c9427 |
features, update site projects and RCP applications. Tycho also knows
|
|
 |
4c9427 |
how to run JUnit test plugins using OSGi runtime and there is also
|
|
 |
4c9427 |
support for sharing build results using Maven artifact repositories.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Tycho plugins introduce new packaging types and the corresponding
|
|
 |
4c9427 |
lifecycle bindings that allow Maven to use OSGi and Eclipse metadata
|
|
 |
4c9427 |
during a Maven build. OSGi rules are used to resolve project
|
|
 |
4c9427 |
dependencies and package visibility restrictions are honored by the
|
|
 |
4c9427 |
OSGi-aware JDT-based compiler plugin. Tycho will use OSGi metadata and
|
|
 |
4c9427 |
OSGi rules to calculate project dependencies dynamically and injects
|
|
 |
4c9427 |
them into the Maven project model at build time. Tycho supports all
|
|
 |
4c9427 |
attributes supported by the Eclipse OSGi resolver (Require-Bundle,
|
|
 |
4c9427 |
Import-Package, Eclipse-GenericRequire, etc). Tycho will use proper
|
|
 |
4c9427 |
classpath access rules during compilation. Tycho supports all project
|
|
 |
4c9427 |
types supported by PDE and will use PDE/JDT project metadata where
|
|
 |
4c9427 |
possible. One important design goal in Tycho is to make sure there is
|
|
 |
4c9427 |
no duplication of metadata between POM and OSGi metadata.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%package javadoc
|
|
 |
4c9427 |
Summary: Javadocs for %{pkg_name}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%description javadoc
|
|
 |
4c9427 |
This package contains the API documentation for %{pkg_name}.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%prep
|
|
 |
4c9427 |
%setup -q -n org.eclipse.tycho-%{git_tag}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Prepare fedoraproject-p2
|
|
 |
4c9427 |
tar -xf %{SOURCE6}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
|
|
 |
4c9427 |
%pom_disable_module org.fedoraproject.p2.tests fedoraproject-p2
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%patch0 -p1
|
|
 |
4c9427 |
%patch1 -p1
|
|
 |
4c9427 |
%patch2 -p1
|
|
 |
4c9427 |
%patch3 -p1
|
|
 |
4c9427 |
%patch4 -p1
|
|
 |
4c9427 |
%patch6 -p0
|
|
 |
4c9427 |
%patch7 -p1
|
|
 |
4c9427 |
%patch8 -p1
|
|
 |
4c9427 |
|
|
 |
4c9427 |
find tycho-core -iname '*html' -delete
|
|
 |
4c9427 |
|
|
 |
4c9427 |
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
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# place empty mojo in place
|
|
 |
4c9427 |
mkdir -p tycho-maven-plugin/src/main/java/org/fedoraproject
|
|
 |
4c9427 |
pushd tycho-maven-plugin/src/main/java/org/fedoraproject
|
|
 |
4c9427 |
cp %{SOURCE1} .
|
|
 |
4c9427 |
popd
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# These units cannot be found during a regular build
|
|
 |
4c9427 |
sed -i '/^
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# We do not ship org.eclipse.jdt.compiler.apt
|
|
 |
4c9427 |
%pom_remove_dep "org.eclipse.tycho:org.eclipse.jdt.compiler.apt"
|
|
 |
4c9427 |
%pom_remove_dep "org.eclipse.tycho:org.eclipse.jdt.compiler.apt" tycho-compiler-jdt
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# org.ow2.asm:asm-debug-all -> org.ow2.asm:asm-all
|
|
 |
4c9427 |
%pom_xpath_set "pom:dependency[pom:artifactId='asm-debug-all']/pom:artifactId" "asm-all" tycho-artifactcomparator
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# we don't have org.apache.commons:commons-compress:jar:sources
|
|
 |
4c9427 |
%pom_xpath_remove "pom:dependency[pom:classifier='sources' and pom:artifactId='commons-compress']" tycho-p2/tycho-p2-director-plugin
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Previously, JUnit would re-export Hamcrest
|
|
 |
4c9427 |
# Now modules using org.hamcrest.core must state the requirement explicitly
|
|
 |
4c9427 |
for mod in tycho-bundles/org.eclipse.tycho.{p2.{maven.repository.tests,resolver.impl.test,tools.tests},test.utils,core.shared.tests}; do
|
|
 |
4c9427 |
sed -i 's/^Require-Bundle://
|
|
 |
4c9427 |
/org\.junit/ i Require-Bundle: org.hamcrest.core,' \
|
|
 |
4c9427 |
$mod/META-INF/MANIFEST.MF
|
|
 |
4c9427 |
done
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Fix bundle names
|
|
 |
4c9427 |
sed -i -e 's/org\.hamcrest/org.hamcrest.core/' tycho-bundles/pom.xml
|
|
 |
4c9427 |
sed -i -e 's/org\.mockito/org.mockito.mockito-core/' tycho-bundles/org.eclipse.tycho.p2.tools.tests/META-INF/MANIFEST.MF
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Bootstrap Build
|
|
 |
4c9427 |
%if %{eclipse_bootstrap}
|
|
 |
4c9427 |
tar -xf %{SOURCE5}
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%if %{tycho_bootstrap}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%patch5 -p1
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Perform the 'minimal' (bootstrap) build of Tycho
|
|
 |
4c9427 |
cp %{SOURCE2} %{SOURCE3} .
|
|
 |
4c9427 |
./%{pkg_name}-bootstrap.sh %{eclipse_bootstrap}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%patch5 -p1 -R
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Non-Bootstrap Build
|
|
 |
4c9427 |
%else
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Set some temporary build version so that the bootstrapped build has
|
|
 |
4c9427 |
# a different version from the nonbootstrapped. Otherwise there will
|
|
 |
4c9427 |
# be cyclic dependencies.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
medadataFile=%{_datadir}/maven-metadata/tycho.xml
|
|
 |
4c9427 |
sysVer=`grep -C 1 "<artifactId>tycho</artifactId>" %{_mavenpomdir}/JPP.tycho-main.pom | grep "version" | sed 's/.*>\(.*\)<.*/\1/'`
|
|
 |
4c9427 |
mkdir boot
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Copy Tycho POMs from system repo and set their versions to %%{version}-SNAPSHOT.
|
|
 |
4c9427 |
for pom in $(grep 'pom</ns[0-9]:path>' $medadataFile | sed 's|.*>\(.*\)<.*|\1|'); do
|
|
 |
4c9427 |
sed '
|
|
 |
4c9427 |
s/$sysVer/%{version}-SNAPSHOT/g
|
|
 |
4c9427 |
s/%{fp_p2_version}%{fp_p2_snap}/%{fp_p2_version}/
|
|
 |
4c9427 |
' <$pom >boot/$(basename $pom)
|
|
 |
4c9427 |
done
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Update Maven lifecycle mappings for Tycho packaging types provided by tycho-maven-plugin.
|
|
 |
4c9427 |
cp %{_javadir}/tycho/tycho-maven-plugin.jar boot/tycho-maven-plugin.jar
|
|
 |
4c9427 |
jar xf boot/tycho-maven-plugin.jar META-INF/plexus/components.xml
|
|
 |
4c9427 |
sed -i s/$sysVer/%{version}-SNAPSHOT/ META-INF/plexus/components.xml
|
|
 |
4c9427 |
jar uf boot/tycho-maven-plugin.jar META-INF/plexus/components.xml
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Create XMvn metadata for the new JARs and POMs by customizing system Tycho metadata.
|
|
 |
4c9427 |
sed '
|
|
 |
4c9427 |
s|>/[^<]*/\([^/]*\.pom\)</\(ns[0-9]\):path>|>'$PWD'/boot/\1</\2:path>|
|
|
 |
4c9427 |
s|>'$sysVer'</\(ns[0-9]\):version>|>%{version}-SNAPSHOT</\1:version><\1:compatVersions><\1:version>%{version}-SNAPSHOT</\1:version></\1:compatVersions>|
|
|
 |
4c9427 |
s|>'%{fp_p2_version}%{fp_p2_snap}'</\(ns[0-9]\):version>|>%{fp_p2_version}</\1:version><\1:compatVersions><\1:version>%{fp_p2_version}</\1:version></\1:compatVersions>|
|
|
 |
4c9427 |
s|%{_javadir}/tycho/tycho-maven-plugin.jar|'$PWD'/boot/tycho-maven-plugin.jar|
|
|
 |
4c9427 |
' $medadataFile >boot/tycho-metadata.xml
|
|
 |
4c9427 |
%mvn_config resolverSettings/metadataRepositories/repository $PWD/boot/tycho-metadata.xml
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Tests are skipped anyways, so remove some test dependencies
|
|
 |
4c9427 |
%pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-compiler-plugin
|
|
 |
4c9427 |
%pom_xpath_remove "pom:dependency[pom:classifier='tests']" tycho-packaging-plugin
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%{?scl:EOF}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%build
|
|
 |
4c9427 |
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
|
|
 |
4c9427 |
xmvn -o -Dtycho-version=%{version}-SNAPSHOT -Dmaven.test.skip=true \
|
|
 |
4c9427 |
-Dmaven.repo.local=$(pwd)/.m2 -Dfedora.p2.repos=$(pwd)/bootstrap \
|
|
 |
4c9427 |
-f fedoraproject-p2/pom.xml \
|
|
 |
4c9427 |
clean install org.apache.maven.plugins:maven-javadoc-plugin:aggregate
|
|
 |
4c9427 |
|
|
 |
4c9427 |
xmvn -o -DtychoBootstrapVersion=%{version}-SNAPSHOT -Dmaven.test.skip=true \
|
|
 |
4c9427 |
-Dmaven.repo.local=$(pwd)/.m2 -Dfedora.p2.repos=$(pwd)/bootstrap \
|
|
 |
4c9427 |
clean install org.apache.maven.plugins:maven-javadoc-plugin:aggregate
|
|
 |
4c9427 |
%{?scl:EOF}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%install
|
|
 |
4c9427 |
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
cp %{SOURCE2} %{SOURCE4} .
|
|
 |
4c9427 |
|
|
 |
4c9427 |
install -dm 755 $RPM_BUILD_ROOT%{_javadir}/tycho
|
|
 |
4c9427 |
install -dm 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# fedoraproject-p2 parent
|
|
 |
4c9427 |
mod=fedoraproject-p2
|
|
 |
4c9427 |
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-$mod.pom
|
|
 |
4c9427 |
%add_maven_depmap JPP.%{pkg_name}-$mod.pom
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# fedoraproject-p2
|
|
 |
4c9427 |
for mod in fedoraproject-p2/{org.fedoraproject.p2,xmvn-p2-installer-plugin}; do
|
|
 |
4c9427 |
echo $mod
|
|
 |
4c9427 |
aid=`basename $mod`
|
|
 |
4c9427 |
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-$aid.pom
|
|
 |
4c9427 |
install -m 644 $mod/target/$aid-%{fp_p2_version}%{fp_p2_snap}.jar $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/$aid.jar
|
|
 |
4c9427 |
%add_maven_depmap JPP.%{pkg_name}-$aid.pom %{pkg_name}/$aid.jar -a "org.eclipse.tycho:$aid"
|
|
 |
4c9427 |
done
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# pom and jar installation
|
|
 |
4c9427 |
for mod in target-platform-configuration tycho-compiler-{jdt,plugin} \
|
|
 |
4c9427 |
tycho-{artifactcomparator,core,embedder-api,metadata-model,testing-harness} \
|
|
 |
4c9427 |
sisu-equinox/sisu-equinox{-api,-launching,-embedder} \
|
|
 |
4c9427 |
tycho-p2/tycho-p2-{facade,plugin,{director,publisher,repository}-plugin} \
|
|
 |
4c9427 |
tycho-{maven,packaging,pomgenerator,release/tycho-versions,source}-plugin \
|
|
 |
4c9427 |
tycho-bundles/org* \
|
|
 |
4c9427 |
tycho-surefire/{tycho-surefire-plugin,org.eclipse.tycho.surefire.{osgibooter,junit,junit4{,7}}}; do
|
|
 |
4c9427 |
echo $mod
|
|
 |
4c9427 |
aid=`basename $mod`
|
|
 |
4c9427 |
install -pm 644 $mod/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-$aid.pom
|
|
 |
4c9427 |
install -m 644 $mod/target/$aid-%{version}%{snap}.jar $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/$aid.jar
|
|
 |
4c9427 |
%add_maven_depmap JPP.%{pkg_name}-$aid.pom %{pkg_name}/$aid.jar -a "org.eclipse.tycho:$aid"
|
|
 |
4c9427 |
done
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# pom installation
|
|
 |
4c9427 |
for pommod in tycho-p2 tycho-bundles tycho-surefire \
|
|
 |
4c9427 |
tycho-release sisu-equinox; do
|
|
 |
4c9427 |
aid=`basename $pommod`
|
|
 |
4c9427 |
install -pm 644 $pommod/pom.xml \
|
|
 |
4c9427 |
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-$aid.pom
|
|
 |
4c9427 |
%add_maven_depmap JPP.%{pkg_name}-$aid.pom -a "org.eclipse.tycho:$aid"
|
|
 |
4c9427 |
done
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# p2 runtime
|
|
 |
4c9427 |
dir=.m2/org/eclipse/tycho/tycho-bundles-external/%{version}%{snap}
|
|
 |
4c9427 |
%if ! %{eclipse_bootstrap}
|
|
 |
4c9427 |
./%{pkg_name}-debundle.sh tycho-bundles/tycho-bundles-external/ $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/tycho-bundles-external-manifest.txt
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
install -pm 644 $dir/tycho-bundles-external-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-tycho-bundles-external.pom
|
|
 |
4c9427 |
install -m 644 $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/tycho-bundles-external.zip
|
|
 |
4c9427 |
%add_maven_depmap JPP.%{pkg_name}-tycho-bundles-external.pom %{pkg_name}/tycho-bundles-external.zip -a "org.eclipse.tycho:tycho-bundles-external"
|
|
 |
4c9427 |
%if ! %{eclipse_bootstrap}
|
|
 |
4c9427 |
%add_maven_depmap org.eclipse.tycho:tycho-bundles-external:txt:manifest:%{version}%{snap} %{pkg_name}/tycho-bundles-external-manifest.txt
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# main
|
|
 |
4c9427 |
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-main.pom
|
|
 |
4c9427 |
%add_maven_depmap JPP.%{pkg_name}-main.pom
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# standalone p2 director
|
|
 |
4c9427 |
%if ! %{eclipse_bootstrap}
|
|
 |
4c9427 |
./%{pkg_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
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
pushd .m2/org/eclipse/tycho/tycho-standalone-p2-director/%{version}%{snap}/
|
|
 |
4c9427 |
install -m 644 tycho-standalone-p2-director-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}/tycho-standalone-p2-director.zip
|
|
 |
4c9427 |
install -pm 644 tycho-standalone-p2-director-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{pkg_name}-tycho-standalone-p2-director.pom
|
|
 |
4c9427 |
popd
|
|
 |
4c9427 |
%add_maven_depmap JPP.%{pkg_name}-tycho-standalone-p2-director.pom tycho/tycho-standalone-p2-director.zip -a "org.eclipse.tycho:tycho-standalone-p2-director"
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# javadoc
|
|
 |
4c9427 |
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/tycho
|
|
 |
4c9427 |
cp -pr target/site/api*/* $RPM_BUILD_ROOT%{_javadocdir}/tycho
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# p2-install script
|
|
 |
4c9427 |
install -dm 755 $RPM_BUILD_ROOT%{_javadir}-utils/
|
|
 |
4c9427 |
install -pm 755 %{SOURCE7} $RPM_BUILD_ROOT%{_javadir}-utils/
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%if %{eclipse_bootstrap}
|
|
 |
4c9427 |
# org.eclipse.osgi
|
|
 |
4c9427 |
osgiJarPath=`find ".m2/org" -name "org.eclipse.osgi_*.jar"`
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.eclipse-build.git/tree/externalpoms/org.eclipse.osgi.pom
|
|
 |
4c9427 |
echo '
|
|
 |
4c9427 |
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xsi:noNamespaceSchemaLocation="http://maven.apache.org/POM/4.0.0">
|
|
 |
4c9427 |
<modelVersion>4.0.0</modelVersion>
|
|
 |
4c9427 |
<groupId>org.eclipse.osgi</groupId>
|
|
 |
4c9427 |
<artifactId>org.eclipse.osgi</artifactId>
|
|
 |
4c9427 |
<version>3.10.100.v20150602-1500</version>
|
|
 |
4c9427 |
</project>' > JPP.tycho-osgi.pom
|
|
 |
4c9427 |
|
|
 |
4c9427 |
install -pm 644 JPP.tycho-osgi.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.tycho-osgi.pom
|
|
 |
4c9427 |
install -m 644 $osgiJarPath $RPM_BUILD_ROOT%{_javadir}/tycho/osgi.jar
|
|
 |
4c9427 |
%add_maven_depmap JPP.tycho-osgi.pom tycho/osgi.jar -a "org.eclipse.tycho:org.eclipse.osgi"
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# org.eclipse.osgi.compatibility.state
|
|
 |
4c9427 |
osgiStateJarPath=`find ".m2/org" -name "org.eclipse.osgi.compatibility.state_*.jar"`
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.eclipse-build.git/tree/externalpoms/org.eclipse.osgi.compatibility.state.pom
|
|
 |
4c9427 |
echo '
|
|
 |
4c9427 |
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xsi:noNamespaceSchemaLocation="http://maven.apache.org/POM/4.0.0">
|
|
 |
4c9427 |
<modelVersion>4.0.0</modelVersion>
|
|
 |
4c9427 |
<groupId>org.eclipse.osgi</groupId>
|
|
 |
4c9427 |
<artifactId>org.eclipse.osgi.compatibility.state</artifactId>
|
|
 |
4c9427 |
<version>1.0.100.v20150602-1500</version>
|
|
 |
4c9427 |
</project>' > JPP.tycho-osgi.compatibility.state.pom
|
|
 |
4c9427 |
|
|
 |
4c9427 |
install -pm 644 JPP.tycho-osgi.compatibility.state.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.tycho-osgi.compatibility.state.pom
|
|
 |
4c9427 |
install -m 644 $osgiStateJarPath $RPM_BUILD_ROOT%{_javadir}/tycho/osgi.compatibility.state.jar
|
|
 |
4c9427 |
%add_maven_depmap JPP.tycho-osgi.compatibility.state.pom tycho/osgi.compatibility.state.jar -a "org.eclipse.tycho:org.eclipse.osgi.compatibility.state"
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
|
|
 |
4c9427 |
# Symlink XMvn P2 plugin with all dependencies so that it can be loaded by XMvn
|
|
 |
4c9427 |
install -dm 755 %{buildroot}%{?_scl_prefix}%{?scl_maven:/%{scl_maven}/root}%{_root_datadir}/xmvn/lib/installer/
|
|
 |
4c9427 |
%if %{eclipse_bootstrap}
|
|
 |
4c9427 |
ln -s %{_javadir}/tycho/osgi.jar %{buildroot}%{?_scl_prefix}%{?scl_maven:/%{scl_maven}/root}%{_root_datadir}/xmvn/lib/installer/
|
|
 |
4c9427 |
%else
|
|
 |
4c9427 |
ln -s %{_javadir}/eclipse/osgi.jar %{buildroot}%{?_scl_prefix}%{?scl_maven:/%{scl_maven}/root}%{_root_datadir}/xmvn/lib/installer/
|
|
 |
4c9427 |
%endif
|
|
 |
4c9427 |
ln -s %{_javadir}/tycho/xmvn-p2-installer-plugin.jar %{buildroot}%{?_scl_prefix}%{?scl_maven:/%{scl_maven}/root}%{_root_datadir}/xmvn/lib/installer/
|
|
 |
4c9427 |
ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{?_scl_prefix}%{?scl_maven:/%{scl_maven}/root}%{_root_datadir}/xmvn/lib/installer/
|
|
 |
4c9427 |
%{?scl:EOF}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%files -f .mfiles
|
|
 |
4c9427 |
%dir %{_javadir}/tycho
|
|
 |
4c9427 |
%{?_scl_prefix}%{?scl_maven:/%{scl_maven}/root}%{_root_datadir}/xmvn/lib/installer/*
|
|
 |
4c9427 |
%{_javadir}-utils/p2-install.sh
|
|
 |
4c9427 |
%doc README.md
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%files javadoc
|
|
 |
4c9427 |
%{_javadocdir}/tycho
|
|
 |
4c9427 |
|
|
 |
4c9427 |
%changelog
|
|
 |
4c9427 |
* Tue Aug 04 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-8.2
|
|
 |
4c9427 |
- Tighten up the dependency on ecj, rhbz#1249293
|
|
 |
4c9427 |
|
|
 |
4c9427 |
* Tue Jul 28 2015 Roland Grunberg <rgrunber@redhat.com> - 0.23.0-8.1
|
|
 |
4c9427 |
- fedoraproject-p2: Single IU resolving requirements with multiple matches.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
* Mon Jul 06 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-5.4
|
|
 |
4c9427 |
- Non-bootstrap build
|
|
 |
4c9427 |
|
|
 |
4c9427 |
* Tue Jun 30 2015 Mat Booth <mat.booth@redhat.com> - 0.23.0-5.3
|
|
 |
4c9427 |
- fedoraproject-p2: Allow xmvn-p2-installer to work in bootstrap mode
|
|
 |
4c9427 |
|
|
 |
4c9427 |
* Mon Jun 29 2015 Roland Grunberg <rgrunber@redhat.com> - 0.23.0-5.2
|
|
 |
4c9427 |
- Support extraction of symlinks with plexus-archiver < 2.4.4-4.
|
|
 |
4c9427 |
- Re-enable o.e.tycho.p2.{maven.repository,tools}.tests.
|
|
 |
4c9427 |
- Add BuildRequires on zip.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
* Sun Jun 28 2015 Roland Grunberg <rgrunber@redhat.com> - 0.23.0-5.1
|
|
 |
4c9427 |
- Additional fixes for SCL-iziation.
|
|
 |
4c9427 |
- Port to maven-surefire 2.15
|
|
 |
4c9427 |
- Port to plexus-archiver 2.4
|
|
 |
4c9427 |
- Disable usesNativeCode due to issue with objectweb-asm.
|
|
 |
4c9427 |
- Disable o.e.tycho.p2.{maven.repository,tools}.tests due to mockito.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
* Fri Jun 26 2015 Roland Grunberg <rgrunber@redhat.com> - 0.23.0-5.1
|
|
 |
4c9427 |
- SCL-ize.
|
|
 |
4c9427 |
- Make bootstrap build work with maven-plugin-plugin < 3.2
|
|
 |
4c9427 |
- Port to work with Maven 3.0.5
|
|
 |
4c9427 |
- Port to work with Java 7
|
|
 |
4c9427 |
- Port to work with XMvn 2.1.0
|
|
 |
4c9427 |
|
|
 |
4c9427 |
* Fri Jun 26 2015 Roland Grunberg <rgrunber@redhat.com> - 0.23.0-5.1
|
|
 |
4c9427 |
- Initial import of tycho-0.23.0-5.fc23.
|