Need help from someone with experience with %pom_ macros


If you have a spare time, and can do a quick test I would really

I only know some basic heuristics based on build errors...

Test should be:

$ fedpkg co jacop; cd jacop; fedpkg local

I thought it could be related to scala, but it fails with either current
scala, or a rebuild wth patch at
<a href="" title=""></a>

error is:

[ERROR] UndeclaredThrowableException: InvocationTargetException:
Plugin org.codehaus.mojo:javacc-maven-plugin:2.6 or one of its
dependencies could not be resolved: Cannot access scala
(<a href="" title=""></a>) in offline mode and the
artifact has not been
downloaded from it before.



Re: Need help from someone with experience with %pom_ macros

By Mikolaj Izdebski at 11/14/2017 - 12:30

On 11/14/2017 02:58 PM, Paulo César Pereira de Andrade wrote:
I can't reproduce this. On rawhide I'm getting compilation errors instead.

In general, for questions like this one I recommend asking on Java SIG
IRC channel [1].

[1] <a href="" title=""></a>

Re: Need help from someone with experience with %pom_ macros

By =?ISO-8859-1?Q?... at 11/14/2017 - 13:40

2017-11-14 11:30 GMT-05:00 Mikolaj Izdebski < ... at redhat dot com>:
Many thanks. I was just trying to fix it hacking pom_ macros, but on my
rawhide computer. Something is bogus, besides apparently all ok, I am
running rawhide for more than 3 years...

Based on your response it was clear something was bogus, so, just
created a new mock rawhide chroot, noticed there were two missing
build requires:

$ git diff
diff --git a/jacop.spec b/jacop.spec
index 3effe0e..cf593d1 100644
--- a/jacop.spec
+++ b/jacop.spec
@@ -14,11 +14,14 @@ BuildRequires: apache-commons-jexl
BuildRequires: java-devel
BuildRequires: javacc-maven-plugin
BuildRequires: maven-local
+BuildRequires: maven-plugin-build-helper
BuildRequires: maven-plugin-bundle
+BuildRequires: maven-source-plugin
BuildRequires: scala
BuildRequires: slf4j-log4j12
Requires: javapackages-tools
BuildArch: noarch
+Patch0: %{name}-privilege.patch

Java Constraint Programming solver, JaCoP in short, is an open-source Java
@@ -37,6 +40,7 @@ This package contains the API documentation for %{name}.

%setup -q -n %{name}-%{commit}
+%patch0 -p0
%pom_remove_plugin "org.scala-tools:maven-scala-plugin" pom.xml
%pom_remove_dep "org.perf4j" pom.xml
%pom_change_dep commons-jexl: org.apache.commons:

and this patch corrects the build errors:
diff -up src/main/java/org/jacop/fz/
--- src/main/java/org/jacop/fz/ 2017-11-14
09:22:26.471948651 -0500
+++ src/main/java/org/jacop/fz/ 2017-11-14
09:22:31.760948854 -0500
@@ -75,7 +75,7 @@ class SimpleNode implements Node {

- int getId() {
+ public int getId() {
return id;


Sorry for the noise :(

Re: Need help from someone with experience with %pom_ macros

By Christopher at 11/14/2017 - 17:50

On Tue, Nov 14, 2017 at 12:52 PM Paulo César Pereira de Andrade <

I believe that 'fedpkg local' will use ~/.m2/repository (or wherever your
local maven repository is located) to resolve previously downloaded
dependencies, even with xmvn using offline mode. That may result in a
different build experience. Try using 'fedpkg mockbuild --no-cleanup-after'
instead to build your maven-based package.

Re: Need help from someone with experience with %pom_ macros

By Mikolaj Izdebski at 11/14/2017 - 18:03

On 11/14/2017 10:50 PM, Christopher wrote:
Correct, thanks for pointing this out. We should document it somewhere,
so I've filed [1].

[1] <a href="" title=""></a>