[Bug 1060753] New: ivy-local should add a Requires on maven-local
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1060753
Bug ID: 1060753
Summary: ivy-local should add a Requires on maven-local
Product: Fedora
Version: rawhide
Component: javapackages-tools
Severity: medium
Assignee: sochotni(a)redhat.com
Reporter: pmackinn(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: java-sig-commits(a)lists.fedoraproject.org,
mizdebsk(a)redhat.com, msimacek(a)redhat.com,
msrb(a)redhat.com, sochotni(a)redhat.com
I think ivy-local should require maven-local otherwise the xmvn resolver in
/etc/ivy/ivysettings.xml is non-functional.
Without maven-local:
[ivy:resolve]
[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve] [XMvn] No XMvn configuration files were found. Using default
embedded configuration.
[ivy:resolve] module not found: xmlenc#xmlenc;0.52
[ivy:resolve] ==== local: tried
[ivy:resolve] /root/.ivy2/local/xmlenc/xmlenc/0.52/ivys/ivy.xml
[ivy:resolve] -- artifact xmlenc#xmlenc;0.52!xmlenc.jar:
[ivy:resolve] /root/.ivy2/local/xmlenc/xmlenc/0.52/jars/xmlenc.jar
[ivy:resolve] module not found: commons-codec#commons-codec;1.4
....
With maven-local:
ivy-resolve:
[ivy:resolve] :: resolving dependencies :: org.apache.pig#pig;0.12.0
[ivy:resolve] confs: [master, default, runtime, compile, test, javadoc,
releaseaudit, jdiff, checkstyle, buildJar, hadoop20, hadoop23, hbase94,
hbase95]
[ivy:resolve] found xmlenc#xmlenc;SYSTEM in xmvn
[ivy:resolve] [SYSTEM] xmlenc#xmlenc;0.52 (forced)
[ivy:resolve] found commons-codec#commons-codec;SYSTEM in xmvn
[ivy:resolve] [SYSTEM] commons-codec#commons-codec;1.4 (forced)
....
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=7hdl2x44rp&a=cc_unsubscribe
10 years, 2 months
[javapackages] [doc] Add initial explanation for two common errors
by Stanislav Ochotnicky
commit 88b232ce46e7962129eaf979b5bcf788c41b3567
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Mon Feb 3 15:12:59 2014 +0100
[doc] Add initial explanation for two common errors
doc/common_errors.txt | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/doc/common_errors.txt b/doc/common_errors.txt
index 5085f5f..b024a08 100644
--- a/doc/common_errors.txt
+++ b/doc/common_errors.txt
@@ -91,6 +91,23 @@ Following dependencies were not resolved and requires cannot be generated. Eithe
org.apache.maven.doxia:doxia-core::tests:UNKNOWN
------
+Most often this error happens when one part of the package depends on an
+attached artifact which is not being installed. Automatic RPM requires generator
+then tries to generate requires on artifact which is not being installed. This
+would most likely result in a broken RPM package so generator halts the build.
+
+There are usually two possible solutions for this problem:
+
+ - Install attached artifact in question. For the above error following macro
+ would install artifacts with `tests` classifiers into `tests` subpackage.
+
+ %mvn_package :::tests: %{name}-tests
+
+ - Remove dependency on problematic artifact. This can involve `pom.xml`
+ modifications, disabling tests or even code changes so it is usually easier
+ to install the dependency.
+
+
[[error_scope_system]]
=== Dependencies with scope "system"
@@ -102,3 +119,15 @@ dependencies are not supported by XMvn installer. You should either
remove any dependencies with scope "system" before the build or not run
XMvn instaler. -> [Help 1]
------
+
+Some Maven artifacts try to depend on exact system paths. Most usually this
+dependency is either on `com.sun:tools` or `sun.jdk:jconsole`. Dependencies with
+system scope cause issues with our tooling and requires generators so they are
+not supported.
+
+Easiest way to solve this for above two dependencies is by removing and adding
+back the dependency without `<scope>` or `<systemPath>` nodes:
+
+ %pom_remove_dep com.sun:tools
+ %pom_add_dep com.sun:tools
+
10 years, 2 months
[javapackages] [test] Fix loading of macros in testsuite
by Stanislav Ochotnicky
commit a8de8ebce7aee4acdc517b38f4aea2884e78bba7
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Mon Feb 3 13:46:36 2014 +0100
[test] Fix loading of macros in testsuite
test/test_rpmbuild.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/test/test_rpmbuild.py b/test/test_rpmbuild.py
index 9299028..51251d3 100644
--- a/test/test_rpmbuild.py
+++ b/test/test_rpmbuild.py
@@ -173,13 +173,13 @@ class Package(object):
shutil.copy(sourcepath, os.path.join(destpath, targetname))
def _prepare_macros():
- etcpath = os.path.join(DIRPATH, '..', 'etc')
+ macropath = os.path.join(DIRPATH, '..', 'macros.d')
java_utils = os.path.abspath(os.path.join(DIRPATH, '..', 'java-utils'))
with open('.rpmmacros', 'w') as rpmmacros:
- for filepath in os.listdir(etcpath):
+ for filepath in os.listdir(macropath):
if filepath.startswith('macros'):
- with open(os.path.join(etcpath, filepath), 'r') as macrofile:
+ with open(os.path.join(macropath, filepath), 'r') as macrofile:
for line in macrofile:
if '/usr/share/java-utils' in line:
rpmmacros.write(re.sub(r'/usr/share/java-utils',
10 years, 2 months
[javapackages] Install rpm macros into proper place
by Stanislav Ochotnicky
commit e6bc9990787a0224c74d2d66e37d79fadc37ee31
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Mon Feb 3 13:12:53 2014 +0100
Install rpm macros into proper place
For rpm 4.11+ preferred directory for macros is /usr/lib/rpm/macros.d so let's
install macros there. Also have them in a separate macros.d directory in git
build | 6 +++---
configure | 2 +-
install | 6 +++---
{etc => macros.d}/macros.fjava | 0
{etc => macros.d}/macros.jpackage | 0
{etc => macros.d}/macros.xmvn | 0
6 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/build b/build
index 8a23526..b3aacdf 100755
--- a/build
+++ b/build
@@ -81,9 +81,9 @@ expand bin/rebuild-jar-repository
expand bin/shade-jar
expand bin/xmvn-builddep
expand etc/java.conf
-expand etc/macros.jpackage
-expand etc/macros.fjava
-expand etc/macros.xmvn
+expand macros.d/macros.jpackage
+expand macros.d/macros.fjava
+expand macros.d/macros.xmvn
expand java-utils/java-functions
manpage abs2rel
diff --git a/configure b/configure
index 3288fda..6ee66d8 100755
--- a/configure
+++ b/configure
@@ -74,6 +74,6 @@ test -z "${rpmconfigdir}" && rpmconfigdir="${prefix}/lib/rpm"
test -z "${m2home}" && m2home="${datadir}/xmvn"
-eval $(sed -n 's/^%_\('"$vars_re"'\)\ *\(.*\)$/\1="\2"/;T;s/%{_\(.*}\)/${\1/;p' etc/macros.jpackage)
+eval $(sed -n 's/^%_\('"$vars_re"'\)\ *\(.*\)$/\1="\2"/;T;s/%{_\(.*}\)/${\1/;p' macros.d/macros.jpackage)
set | sed -n 's/^\('"$vars_re"'\)=/&/;T;p' >config.status
diff --git a/install b/install
index 71a80f7..a88c533 100755
--- a/install
+++ b/install
@@ -122,8 +122,8 @@ inst_data target/java-functions "${javadir}-utils"
inst_data java-utils/maven_depmap.py "${javadir}-utils"
inst_data java-utils/pom_editor.py "${javadir}-utils"
-inst_data target/macros.jpackage "${sysconfdir}/rpm"
-inst_data target/macros.fjava "${sysconfdir}/rpm"
+inst_data target/macros.jpackage "${rpmconfigdir}/macros.d"
+inst_data target/macros.fjava "${rpmconfigdir}/macros.d"
inst_data target/build-classpath.1 "${mandir}/man1"
inst_data target/build-jar-repository.1 "${mandir}/man1"
@@ -162,7 +162,7 @@ exec >files-maven
dir "${m2home}"
-inst_data target/macros.xmvn "${sysconfdir}/rpm"
+inst_data target/macros.xmvn "${rpmconfigdir}/macros.d"
inst_data java-utils/builddep.py "${javadir}-utils"
inst_data java-utils/mvn_alias.py "${javadir}-utils"
diff --git a/etc/macros.fjava b/macros.d/macros.fjava
similarity index 100%
rename from etc/macros.fjava
rename to macros.d/macros.fjava
diff --git a/etc/macros.jpackage b/macros.d/macros.jpackage
similarity index 100%
rename from etc/macros.jpackage
rename to macros.d/macros.jpackage
diff --git a/etc/macros.xmvn b/macros.d/macros.xmvn
similarity index 100%
rename from etc/macros.xmvn
rename to macros.d/macros.xmvn
10 years, 2 months
[randomizedtesting] fix junit4-ant deps scope
by gil
commit 92ac66329a930cfea25a184f63cb823ed552e473
Author: gil <puntogil(a)libero.it>
Date: Sun Feb 2 14:48:05 2014 +0100
fix junit4-ant deps scope
randomizedtesting.spec | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/randomizedtesting.spec b/randomizedtesting.spec
index b122996..e6ec0f6 100644
--- a/randomizedtesting.spec
+++ b/randomizedtesting.spec
@@ -1,6 +1,6 @@
Name: randomizedtesting
Version: 2.0.15
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Java Testing Framework
License: ASL 2.0
URL: http://labs.carrotsearch.com/randomizedtesting.html
@@ -94,11 +94,12 @@ sed -i '/script.js/d' \
%pom_disable_module examples/ant
%pom_disable_module packaging
%pom_disable_module junit4-maven-plugin-tests
-
+# Disable repackaged and shaded deps
%pom_remove_plugin com.pyx4me:proguard-maven-plugin junit4-ant
%pom_remove_plugin org.codehaus.mojo:exec-maven-plugin junit4-ant
%pom_remove_plugin :maven-dependency-plugin junit4-ant
-
+# Fix deps scope
+%pom_xpath_remove "pom:scope[text()='provided']" junit4-ant
sed -i 's/\r//' README randomized-runner/README
%build
@@ -110,11 +111,16 @@ sed -i 's/\r//' README randomized-runner/README
%install
%mvn_install
+#mkdir -p %%{buildroot}%%{_sysconfdir}/ant.d
+#echo "ant ant/ant-junit commons-io google-gson guava junit junit4-ant objectweb-asm3/asm %%{name}/randomizedtesting-runner simple-xml" > %%{name}-junit4-ant
+#install -p -m 644 %%{name}-junit4-ant %%{buildroot}%%{_sysconfdir}/ant.d/%%{name}-junit4-ant
+
%files
%dir %{_javadir}/%{name}
%doc LICENSE README
%files junit4-ant -f .mfiles-junit4-ant
+#%%config(noreplace) %%{_sysconfdir}/ant.d/%%{name}-junit4-ant
%files junit4-maven-plugin -f .mfiles-junit4-maven-plugin
@@ -125,6 +131,9 @@ sed -i 's/\r//' README randomized-runner/README
%doc LICENSE
%changelog
+* Sun Feb 02 2014 gil cattaneo <puntogil(a)libero.it> 2.0.15-2
+- Fix junit4-ant deps scope
+
* Thu Jan 23 2014 gil cattaneo <puntogil(a)libero.it> 2.0.15-1
- update to 2.0.15
10 years, 2 months