On Thursday 10 of March 2016 22:08:18 Craig Ringer wrote:
> > thanks for all your good comments! This is definitely the preferred way
> > to go, Allow me some time to process this, I'll update this thread as soon
> > as possible.
>
> Cool.
>
> It might be a good idea to speak to maintainers of some of the Maven-based
> Fedora packages, as they'll probably be able to offer some hints/guidance
> on the details when it comes to creating profiles, conditionally compiling
> files, etc.
>
> I haven't verified that you can use maven profiles to avoid the OSGi stuff,
> but it'll certainly do the job for Waffle-JNA and the couple of isolated
> files in PgJDBC that use it.
I'm getting lost TBH, it all sounds like some magic to me (taking into
account that I want to do the thing the right way, which means not
breaking actual code and conditionally allow build on offline linux).
There are two WIP testing projects/branches I prepared with kind help of
our Java guys:
https://github.com/praiskup/pgjdbc-parent-poms/commits/pgjdbc-linux-fixes
https://github.com/praiskup/pgjdbc/commits/pgjdbc-linux-fixes
Note that the patches are not final and are somehow destructive, which is
definitely not on schedule for upstream proposal -- I just need to present
where I feel blocked.
When using those changes -- after the parent-poms is built and installed
into ~/.m2, after some dependencies for osgi are installed from maven (I'm
not yet ready to fully avoid osgi code - starting with waffle as you said)
I'm able to "start" compiling with:
$ python3 /usr/share/java-utils/mvn_build.py \
-- -DwaffleEnabled=false -Dmaven.test.skip=true
Which is equivalent to:
$ xmvn --batch-mode --offline -DwaffleEnabled=false \
-Dmaven.test.skip=true verify org.fedoraproject.xmvn:xmvn-mojo:install \
org.apache.maven.plugins:maven-javadoc-plugin:aggregate \
org.fedoraproject.xmvn:xmvn-mojo:builddep
This fails with:
[ERROR] Failed to execute goal com.igormaznitsa:jcp:6.0.1:preprocess
(preprocessSources) on project postgresql: Can't find a source directory
[/home/praiskup/rh/projects/pgjdbc/pgjdbc/target/generated-sources/annotations]
-> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed
to execute goal com.igormaznitsa:jcp:6.0.1:preprocess (preprocessSources)
on project postgresql: Can't find a source directory
[/home/praiskup/rh/projects/pgjdbc/pgjdbc/target/generated-sources/annotations]
The error log is attached. Seems like something wrong is with
preprocessor. Is anybody able to help a bit? It is quite exhausting and
I start to think that, if we want to have it upstream, we need to have a
shell script or Makefile (that would be is more flexible) :( and I'm not
sure whether that will be friendly with igormaznitsa:jcp thing.
Thoughts?
Thanks,
Pavel