[javapackages] Add definition of bisect repository
by Mikolaj Izdebski
commit 8276855595bf5686317ed47acea954daa531eb3f
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Mon Sep 9 18:48:25 2013 +0200
Add definition of bisect repository
TODO | 7 -------
configs/configuration-20.xml | 7 +++++++
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/TODO b/TODO
index 2964db2..6f5e25e 100644
--- a/TODO
+++ b/TODO
@@ -3,13 +3,6 @@
* BUGS
-** xmvn-bisect regression
-
- 1) Error notifying ProvisionListener org.eclipse.sisu.plexus.PlexusLifecycleManager of org.apache.maven.Maven.
- Reason: java.lang.RuntimeException: Repository 'bisect' is not configured.
- at ClassRealm[plexus.core, parent: null]
- while locating org.apache.maven.Maven
-
** add_maven_depmap.py fix
echo kljsgcfi >%{buildroot}/usr/lib/java/this-is-1.2.3-some.test1
diff --git a/configs/configuration-20.xml b/configs/configuration-20.xml
index 7c0e896..a37593d 100644
--- a/configs/configuration-20.xml
+++ b/configs/configuration-20.xml
@@ -134,6 +134,13 @@
</configuration>
</repository>
<repository>
+ <id>bisect</id>
+ <type>maven</type>
+ <properties>
+ <root>.m2-bisect</root>
+ </properties>
+ </repository>
+ <repository>
<id>install</id>
<type>compound</type>
<configuration>
10 years, 8 months
[javapackages] Remove obsolete markers for Tycho
by Mikolaj Izdebski
commit f485a1ea1d3f1792ff7a43d7d107336bc3bf5759
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Mon Sep 9 18:46:08 2013 +0200
Remove obsolete markers for Tycho
Tycho doesn't depend on these any longer.
bin/mvn-local | 5 -----
bin/mvn-rpmbuild | 5 -----
2 files changed, 0 insertions(+), 10 deletions(-)
---
diff --git a/bin/mvn-local b/bin/mvn-local
index 09edb60..1f8f4e0 100755
--- a/bin/mvn-local
+++ b/bin/mvn-local
@@ -30,11 +30,6 @@
#
# Authors: Mikolaj Izdebski <mizdebsk(a)redhat.com>
-# A marker informing Tycho that mvn-local was ran.
-export TYCHO_MVN_LOCAL=true
-unset TYCHO_MVN_RPMBUILD
-export TYCHO_MVN_RPMBUILD
-
# Allow -Dmaven.local.effective.pom=false to be used to disable
# resolution from effective POM repository.
XMVN_COMPAT=20-rpmbuild
diff --git a/bin/mvn-rpmbuild b/bin/mvn-rpmbuild
index ce6d51c..921f841 100755
--- a/bin/mvn-rpmbuild
+++ b/bin/mvn-rpmbuild
@@ -30,11 +30,6 @@
#
# Authors: Mikolaj Izdebski <mizdebsk(a)redhat.com>
-# A marker informing Tycho that mvn-rpmbuild was ran.
-export TYCHO_MVN_RPMBUILD=true
-unset TYCHO_MVN_LOCAL
-export TYCHO_MVN_LOCAL
-
# Support local depmaps
depmap=
for arg in "$@"; do
10 years, 8 months
[javapackages] Set config version for mvn-rpmbuild to 20
by Mikolaj Izdebski
commit d383fa2f9db6783b31f2eab5adf418b2e0aded98
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Mon Sep 9 18:45:26 2013 +0200
Set config version for mvn-rpmbuild to 20
bin/mvn-local | 4 ++--
bin/mvn-rpmbuild | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/bin/mvn-local b/bin/mvn-local
index fa0a8e2..09edb60 100755
--- a/bin/mvn-local
+++ b/bin/mvn-local
@@ -37,10 +37,10 @@ export TYCHO_MVN_RPMBUILD
# Allow -Dmaven.local.effective.pom=false to be used to disable
# resolution from effective POM repository.
-XMVN_COMPAT=19-rpmbuild
+XMVN_COMPAT=20-rpmbuild
for arg in "$@"; do
if egrep -q '^-Dmaven\.local\.effective\.pom=false' <<<"$arg"; then
- XMVN_COMPAT=19-rpmbuild-raw
+ XMVN_COMPAT=20-rpmbuild-raw
fi
done
export XMVN_COMPAT
diff --git a/bin/mvn-rpmbuild b/bin/mvn-rpmbuild
index cf80d72..ce6d51c 100755
--- a/bin/mvn-rpmbuild
+++ b/bin/mvn-rpmbuild
@@ -68,10 +68,10 @@ export MAVEN_OPTS="$MAVEN_OPTS $repo_arg"
# Allow -Dmaven.local.effective.pom=false to be used to disable
# resolution from effective POM repository.
-XMVN_COMPAT=19-rpmbuild
+XMVN_COMPAT=20-rpmbuild
for arg in "$@"; do
if egrep -q '^-Dmaven\.local\.effective\.pom=false' <<<"$arg"; then
- XMVN_COMPAT=19-rpmbuild-raw
+ XMVN_COMPAT=20-rpmbuild-raw
fi
done
export XMVN_COMPAT
10 years, 8 months
[javapackages] Fix local repository setting in mvn-rpmbuild
by Mikolaj Izdebski
commit 16e13ceb5f234b23d1495d9a8ed3ab3f20e8cacb
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Mon Sep 9 18:36:41 2013 +0200
Fix local repository setting in mvn-rpmbuild
bin/mvn-rpmbuild | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
---
diff --git a/bin/mvn-rpmbuild b/bin/mvn-rpmbuild
index 387ba97..cf80d72 100755
--- a/bin/mvn-rpmbuild
+++ b/bin/mvn-rpmbuild
@@ -40,11 +40,17 @@ depmap=
for arg in "$@"; do
if egrep -q '^-Dmaven\.local\.depmap\.file=' <<<"$arg"; then
depmap=$(sed 's/[^=]*=//' <<<"$arg")
- depmap="
- <!-- Use local depmap file. -->
+
+ mkdir -p .xmvn/config.d
+ cat >>.xmvn/config.d/mvn-rpmbuild-config.xml <<EOF
+<configuration>
+ <resolverSettings>
<metadataRepositories>
<repository>$depmap</repository>
- </metadataRepositories>"
+ </metadataRepositories>
+ </resolverSettings>
+</configuration>
+EOF
fi
done
@@ -60,19 +66,6 @@ done
export MAVEN_OPTS="$MAVEN_OPTS $repo_arg"
-mkdir -p .xmvn/config.d
-cat >>.xmvn/config.d/mvn-rpmbuild-config.xml <<EOF
-<configuration>
- <resolverSettings>
- <!-- XMvn default repo location is .xm2, but for backwards-compatibility
- we use $repo if called as mvn-rpmbuild. -->
- <localRepositories>
- <repository>$repo</repository>
- </localRepositories>$depmap
- </resolverSettings>
-</configuration>
-EOF
-
# Allow -Dmaven.local.effective.pom=false to be used to disable
# resolution from effective POM repository.
XMVN_COMPAT=19-rpmbuild
10 years, 8 months
[javapackages] Add local Maven repository to default repositories
by Mikolaj Izdebski
commit 18b2f414f6c91f9ef70f6c0601b28bb87086a810
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Mon Sep 9 18:33:45 2013 +0200
Add local Maven repository to default repositories
configs/configuration-20-rpmbuild-raw.xml | 19 ++++++++++++++++++-
configs/configuration-20-rpmbuild.xml | 19 ++++++++++++++++++-
configs/configuration-20.xml | 19 ++++++++++++++++++-
3 files changed, 54 insertions(+), 3 deletions(-)
---
diff --git a/configs/configuration-20-rpmbuild-raw.xml b/configs/configuration-20-rpmbuild-raw.xml
index 1dc0779..472b55b 100644
--- a/configs/configuration-20-rpmbuild-raw.xml
+++ b/configs/configuration-20-rpmbuild-raw.xml
@@ -57,7 +57,7 @@
</configuration>
</repository>
<repository>
- <id>resolve</id>
+ <id>resolve-system</id>
<type>compound</type>
<properties>
<prefix>/</prefix>
@@ -68,5 +68,22 @@
</repositories>
</configuration>
</repository>
+ <repository>
+ <id>resolve-local</id>
+ <type>maven</type>
+ <properties>
+ <root>.m2</root>
+ </properties>
+ </repository>
+ <repository>
+ <id>resolve</id>
+ <type>compound</type>
+ <configuration>
+ <repositories>
+ <repository>resolve-local</repository>
+ <repository>resolve-system</repository>
+ </repositories>
+ </configuration>
+ </repository>
</repositories>
</configuration>
diff --git a/configs/configuration-20-rpmbuild.xml b/configs/configuration-20-rpmbuild.xml
index 0479544..c6b91bd 100644
--- a/configs/configuration-20-rpmbuild.xml
+++ b/configs/configuration-20-rpmbuild.xml
@@ -70,7 +70,7 @@
</configuration>
</repository>
<repository>
- <id>resolve</id>
+ <id>resolve-system</id>
<type>compound</type>
<properties>
<prefix>/</prefix>
@@ -81,5 +81,22 @@
</repositories>
</configuration>
</repository>
+ <repository>
+ <id>resolve-local</id>
+ <type>maven</type>
+ <properties>
+ <root>.m2</root>
+ </properties>
+ </repository>
+ <repository>
+ <id>resolve</id>
+ <type>compound</type>
+ <configuration>
+ <repositories>
+ <repository>resolve-local</repository>
+ <repository>resolve-system</repository>
+ </repositories>
+ </configuration>
+ </repository>
</repositories>
</configuration>
diff --git a/configs/configuration-20.xml b/configs/configuration-20.xml
index b3c8c68..7c0e896 100644
--- a/configs/configuration-20.xml
+++ b/configs/configuration-20.xml
@@ -105,7 +105,7 @@
</configuration>
</repository>
<repository>
- <id>resolve</id>
+ <id>resolve-system</id>
<type>compound</type>
<properties>
<prefix>/</prefix>
@@ -117,6 +117,23 @@
</configuration>
</repository>
<repository>
+ <id>resolve-local</id>
+ <type>maven</type>
+ <properties>
+ <root>.m2</root>
+ </properties>
+ </repository>
+ <repository>
+ <id>resolve</id>
+ <type>compound</type>
+ <configuration>
+ <repositories>
+ <repository>resolve-local</repository>
+ <repository>resolve-system</repository>
+ </repositories>
+ </configuration>
+ </repository>
+ <repository>
<id>install</id>
<type>compound</type>
<configuration>
10 years, 8 months
[javapackages] Created tag 3.0.1
by Stanislav Ochotnicky
The lightweight tag '3.0.1' was created pointing to:
ced03ba... Fix pom handling when version tag is only in parent
10 years, 8 months
[javapackages] Fix pom handling when version tag is only in parent
by Stanislav Ochotnicky
commit ced03ba8546d23619e4e64ce99971d6aa3807cda
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Mon Sep 9 18:00:17 2013 +0200
Fix pom handling when version tag is only in parent
python/javapackages/pom.py | 3 ++-
python/test/data/parent-version.pom | 21 +++++++++++++++++++++
python/test/pom_test.py | 7 +++++++
3 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/python/javapackages/pom.py b/python/javapackages/pom.py
index e3d6aee..a8a665b 100644
--- a/python/javapackages/pom.py
+++ b/python/javapackages/pom.py
@@ -84,7 +84,8 @@ class POM(object):
"""
version = self.__find('./pom:version')
if version is None:
- version = self.__find('./pom:parent/pom:version').text
+ version = self.__find('./pom:parent/pom:version')
+ assert version is not None
return version.text
@property
diff --git a/python/test/data/parent-version.pom b/python/test/data/parent-version.pom
new file mode 100644
index 0000000..ffac0cc
--- /dev/null
+++ b/python/test/data/parent-version.pom
@@ -0,0 +1,21 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
+ <parent>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-parent</artifactId>
+ <version>17</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <name>Commons Lang</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/python/test/pom_test.py b/python/test/pom_test.py
index 5fc2b3e..39cb5ce 100644
--- a/python/test/pom_test.py
+++ b/python/test/pom_test.py
@@ -50,6 +50,13 @@ class TestPOM(unittest.TestCase):
self.assertEqual(p.artifactId, "xmlrpc")
self.assertEqual(p.version, "3.1.3")
+ @pomfile("parent-version.pom")
+ def test_no_xmlns(self, p):
+ self.assertEqual(p.packaging, None)
+ self.assertEqual(p.groupId, "commons-lang")
+ self.assertEqual(p.artifactId, "commons-lang")
+ self.assertEqual(p.version, "17")
+
@exception_expected(lxml.etree.XMLSyntaxError)
@pomfile("unparsable_xml.pom")
def test_unparsable_xml(self, p):
10 years, 8 months
[tycho] Add workaround for rhbz#1004310
by Mikolaj Izdebski
commit 8197b35098e6933962bc467709d68b282078e974
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Mon Sep 9 14:48:46 2013 +0200
Add workaround for rhbz#1004310
tycho.spec | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/tycho.spec b/tycho.spec
index 3919af6..23f4926 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -9,7 +9,7 @@
Name: tycho
Version: 0.18.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
Group: Development/Libraries
@@ -182,6 +182,10 @@ sed -i 's/releases\/kepler\//releases\/kepler\/201306260900/' tycho-bundles/tych
# Non-Bootstrap Build
%else
+# 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
+
# These units cannot be found during a regular build
sed -i '/^<unit id=.*$/d' tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
@@ -245,7 +249,8 @@ done
pushd tycho-bundles/tycho-bundles-external
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-bundles-external.pom
install -m 644 target/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,org.sonatype.tycho:tycho-bundles-external"
+ln -s tycho-bundles-external.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external.jar
+%add_maven_depmap -f zip JPP.%{name}-tycho-bundles-external.pom %{name}/tycho-bundles-external.jar -a "org.eclipse.tycho:tycho-bundles-external,org.sonatype.tycho:tycho-bundles-external"
popd
# main
@@ -255,9 +260,10 @@ install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-main.pom
# standalone p2 director
pushd .m2/org/eclipse/tycho/tycho-standalone-p2-director/%{version}*/
install -m 644 tycho-standalone-p2-director-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-standalone-p2-director.zip
+ln -s tycho-standalone-p2-director.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-standalone-p2-director.jar
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,org.sonatype.tycho:tycho-standalone-p2-director"
+%add_maven_depmap -f zip JPP.%{name}-tycho-standalone-p2-director.pom tycho/tycho-standalone-p2-director.jar -a "org.eclipse.tycho:tycho-standalone-p2-director,org.sonatype.tycho:tycho-standalone-p2-director"
# javadoc
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
@@ -285,9 +291,16 @@ install -m 644 $osgiJarPath $RPM_BUILD_ROOT%{_javadir}/%{name}/osgi.jar
%add_maven_depmap JPP.%{name}-osgi.pom %{name}/osgi.jar -a "org.eclipse.tycho:org.eclipse.osgi"
%endif
+# This is a temporary workaround for rhbz#1004310. This is a hack,
+# but it is needed to make tycho work until this bug is fixed
+# properly.
+sed -i 's|<maven>|&<extension>zip</extension>|' \
+ $RPM_BUILD_ROOT%{_mavendepmapfragdir}/%{name}-zip
+
%files
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/%{name}
+%{_mavendepmapfragdir}/%{name}-zip
%{_javadir}/%{name}/
%doc README.md
@@ -295,6 +308,9 @@ install -m 644 $osgiJarPath $RPM_BUILD_ROOT%{_javadir}/%{name}/osgi.jar
%{_javadocdir}/%{name}
%changelog
+* Mon Sep 9 2013 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 0.18.1-5
+- Add workaround for rhbz#1004310
+
* Tue Jul 30 2013 Roland Grunberg <rgrunber(a)redhat.com> - 0.18.1-4
- Improve artifact resolution using XMvn Resolver. (Bug 986900)
10 years, 8 months