Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Java (http://www.linux-archive.org/debian-java/)
-   -   Packaging Jena, and mh_make trouble (http://www.linux-archive.org/debian-java/634516-packaging-jena-mh_make-trouble.html)

Alexander Dutton 02-17-2012 10:51 PM

Packaging Jena, and mh_make trouble
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

First off, I'm new to Java packaging, so apologies if I'm missing
something obvious.

I'd like to get Jena¹, a Java framework for semantic web applications,
into Debian, picking up on #563793². That ITP references work done 5
years ago, and doesn't cover other facets of Jena, such as ARQ, TDB,
and Fuseki.

Following the instructions at
<http://wiki.debian.org/Java/MavenDebianHelper> I started by running the
following:

> mh_make
> --from-svn=https://svn.apache.org/repos/asf/incubator/jena/Jena2/IRI/trunk/
> -pjena-iri -blibjena-iri-java -ttrue -dtrue

which complained about being unable to find the parent POM, even though
it was told to ignore it:

> In pom.xml: Ignore the parent POM for this POM?
> org.apache.jena:jena-top:pom:0-incubating [y]/n > y [ERROR] Cannot
> find parent dependency org.apache.jena:jena-top:pom:0-incubating,
> use --no-parent option to resolve this issue or install the parent
> POM in the Maven repository

and eventually died with the following:

> 17-Feb-2012 21:40:36
> org.debian.maven.packager.DependenciesSolver$ToRes olve resolve
> SEVERE: Cannot resolve dependencies on ./pom.xml
> java.lang.ClassCastException: org.debian.maven.repo.Dependency
> cannot be cast to java.lang.Comparable at
> java.util.TreeMap.put(TreeMap.java:559) at
> java.util.TreeSet.add(TreeSet.java:255) at
> org.debian.maven.packager.DependenciesSolver.resol veDependencies(DependenciesSolver.java:611)
>
>
at
org.debian.maven.packager.DependenciesSolver.acces s$000(DependenciesSolver.java:46)
> at
> org.debian.maven.packager.DependenciesSolver$ToRes olve.resolve(DependenciesSolver.java:279)
>
>
at
org.debian.maven.packager.DependenciesSolver.resol veDependenciesNow(DependenciesSolver.java:568)
> at
> org.debian.maven.packager.DependenciesSolver.solve Dependencies(DependenciesSolver.java:448)
>
>
at
org.debian.maven.packager.DependenciesSolver.main( DependenciesSolver.java:916)
> [ERROR] Cannot find parent dependency
> org.apache.jena:jena-top:pom:0-incubating, use --no-parent option
> to resolve this issue or install the parent POM in the Maven
> repository [ERROR] Cannot find parent dependency
> org.apache.jena:jena-top:pom:0-incubating, use --no-parent option
> to resolve this issue or install the parent POM in the Maven
> repository [ERROR] Cannot find parent dependency
> org.apache.jena:jena-top:pom:0-incubating, use --no-parent option
> to resolve this issue or install the parent POM in the Maven
> repository [ERROR] Cannot find parent dependency
> org.apache.jena:jena-top:pom:0-incubating, use --no-parent option
> to resolve this issue or install the parent POM in the Maven
> repository ERROR: pom.xml: Dependency is not packaged in the Maven
> repository for Debian: junit:junit:${ver.junit}


Trying another approach, I noticed plexus-cdc referenced as an
exemplar³, and copied bits that looked relevant. This seemed to get me
somewhere, but throws source version errors:

> compile: [mkdir] Created dir:
> /home/alex/debian-packaging/jena-iri/build/generated-sources
> [javac] /usr/share/maven-ant-helper/maven-build.xml:295: warning:
> 'includeantruntime' was not set, defaulting to
> build.sysclasspath=last; set to false for repeatable builds [javac]
> Compiling 43 source files to
> /home/alex/debian-packaging/jena-iri/build/classes [javac]
> /home/alex/debian-packaging/jena-iri/src/main/java/com/hp/hpl/jena/iri/IRI.java:83:
> generics are not supported in -source 1.4 [javac] (use -source 5 or
> higher to enable generics) [javac] abstract public
> Iterator<Violation> violations(boolean includeWarnings); [javac]
> ^ [javac]
> /home/alex/debian-packaging/jena-iri/src/main/java/com/hp/hpl/jena/iri/IRI.java:394:
> annotations are not supported in -source 1.4 [javac] (use -source 5
> or higher to enable annotations) [javac] @Override [snip]

I can't work out how to tell it how it to use a more recent source
version.

What I've got so far is at
<https://github.com/alexsdutton/debian-jena-iri>.

Is there documentation I've missed? Where should I go from here?


Kind regards,

Alexander

¹ http://incubator.apache.org/jena/
² http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563793
³ http://wiki.debian.org/Java/MavenBuilder

- --
Alexander Dutton
Developer, InfoDev; data.ox.ac.uk, OxPoints
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPPuf+AAoJEPotabD1ANF73ksH/3CE+f5W2VCytfm5XKckZQB1
lvLi/kpgsSy/KxFUNtiPv+ClL8lBxBqCt8SGW7pQrVo8n/ayiSbp0xZy6ueHHYYB
ECXE/yEJoP0sauec5FFwcNYR1YT0PR8fFgtN20Cw0znV/Dft9bwVSYy5nLeRlt1z
SecU2HI3EBqN6whSKjeyI2BSkgQ4u8QrhNijrLRwlZKIOe50+m nogvkm1gbRR4O/
2C3BggRQC2oEJ+k3/cNkM/UCOg8/Gf1P3xqFycht8D8++xLNwsRGcdWYKrwb0D0F
kCmdrBSjdw5a7WJpP+NgW/irDzo5ZIpQsdLv8wH5tikc9ZfAI19QodZ1W5h6nx0=
=R+iv
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4F3EE7FE.9000405@oucs.ox.ac.uk">http://lists.debian.org/4F3EE7FE.9000405@oucs.ox.ac.uk

Ludovic Claude 03-05-2012 10:05 PM

Packaging Jena, and mh_make trouble
 
Hello Alexander,

Things can get quickly hairy with Java packaging, and when coupled with
Maven, you'd better have more a just a passing familiarity with Maven...

mh_make tries to make the heavy lifting for you, but it's never perfect
and I find always new cases, like yours.

With a more recent version of mh_make, I have been able to get a bit
further, but not by much. I will try to keep improving the tool for
those use cases.

Using the --no-parent option is something that is tricky. In some cases,
it's quite harmless to do, as the parent only contains some developer
information, license, defaults for some plugins which can be ignored,
but in your case the parent contains important information
(dependencies) which cannot be ignored. So you need to package as well
the parent POM.

Now it seems useless to create a package for a single file (and the FTP
team will not like you for doing so), so you need to include this file
in your package. You can either copy it in the debian/ folder, or you
can use the technique of source packages with multiple upstreams. I'm
using it, and it rocks.

I'm sending you my work in progress on this package. There is one
troublesome dependency remaining: it's ic4j, and the version used by
Jena is 3.4.4, while versions 4.0, 4.2 and 4.4 (!) are packaged in
Debian. Maybe you can suggest upstream to do an upgrade or patch the
package to make it work with a new version of this library.

Hope this helps,
Ludovic

On 18/02/2012 00:51, Alexander Dutton wrote:
> Hi all,
>
> First off, I'm new to Java packaging, so apologies if I'm missing
> something obvious.
>
> I'd like to get Jena¹, a Java framework for semantic web applications,
> into Debian, picking up on #563793². That ITP references work done 5
> years ago, and doesn't cover other facets of Jena, such as ARQ, TDB,
> and Fuseki.
>
> Following the instructions at
> <http://wiki.debian.org/Java/MavenDebianHelper> I started by running the
> following:
>
>> mh_make
>> --from-svn=https://svn.apache.org/repos/asf/incubator/jena/Jena2/IRI/trunk/
>> -pjena-iri -blibjena-iri-java -ttrue -dtrue
>
> which complained about being unable to find the parent POM, even though
> it was told to ignore it:
>
>> In pom.xml: Ignore the parent POM for this POM?
>> org.apache.jena:jena-top:pom:0-incubating [y]/n > y [ERROR] Cannot
>> find parent dependency org.apache.jena:jena-top:pom:0-incubating,
>> use --no-parent option to resolve this issue or install the parent
>> POM in the Maven repository
>
> and eventually died with the following:
>
>> 17-Feb-2012 21:40:36
>> org.debian.maven.packager.DependenciesSolver$ToRes olve resolve
>> SEVERE: Cannot resolve dependencies on ./pom.xml
>> java.lang.ClassCastException: org.debian.maven.repo.Dependency
>> cannot be cast to java.lang.Comparable at
>> java.util.TreeMap.put(TreeMap.java:559) at
>> java.util.TreeSet.add(TreeSet.java:255) at
>> org.debian.maven.packager.DependenciesSolver.resol veDependencies(DependenciesSolver.java:611)
>
>
> at
> org.debian.maven.packager.DependenciesSolver.acces s$000(DependenciesSolver.java:46)
>> at
>> org.debian.maven.packager.DependenciesSolver$ToRes olve.resolve(DependenciesSolver.java:279)
>
>
> at
> org.debian.maven.packager.DependenciesSolver.resol veDependenciesNow(DependenciesSolver.java:568)
>> at
>> org.debian.maven.packager.DependenciesSolver.solve Dependencies(DependenciesSolver.java:448)
>
>
> at
> org.debian.maven.packager.DependenciesSolver.main( DependenciesSolver.java:916)
>> [ERROR] Cannot find parent dependency
>> org.apache.jena:jena-top:pom:0-incubating, use --no-parent option
>> to resolve this issue or install the parent POM in the Maven
>> repository [ERROR] Cannot find parent dependency
>> org.apache.jena:jena-top:pom:0-incubating, use --no-parent option
>> to resolve this issue or install the parent POM in the Maven
>> repository [ERROR] Cannot find parent dependency
>> org.apache.jena:jena-top:pom:0-incubating, use --no-parent option
>> to resolve this issue or install the parent POM in the Maven
>> repository [ERROR] Cannot find parent dependency
>> org.apache.jena:jena-top:pom:0-incubating, use --no-parent option
>> to resolve this issue or install the parent POM in the Maven
>> repository ERROR: pom.xml: Dependency is not packaged in the Maven
>> repository for Debian: junit:junit:${ver.junit}
>
>
> Trying another approach, I noticed plexus-cdc referenced as an
> exemplar³, and copied bits that looked relevant. This seemed to get me
> somewhere, but throws source version errors:
>
>> compile: [mkdir] Created dir:
>> /home/alex/debian-packaging/jena-iri/build/generated-sources
>> [javac] /usr/share/maven-ant-helper/maven-build.xml:295: warning:
>> 'includeantruntime' was not set, defaulting to
>> build.sysclasspath=last; set to false for repeatable builds [javac]
>> Compiling 43 source files to
>> /home/alex/debian-packaging/jena-iri/build/classes [javac]
>> /home/alex/debian-packaging/jena-iri/src/main/java/com/hp/hpl/jena/iri/IRI.java:83:
>> generics are not supported in -source 1.4 [javac] (use -source 5 or
>> higher to enable generics) [javac] abstract public
>> Iterator<Violation> violations(boolean includeWarnings); [javac]
>> ^ [javac]
>> /home/alex/debian-packaging/jena-iri/src/main/java/com/hp/hpl/jena/iri/IRI.java:394:
>> annotations are not supported in -source 1.4 [javac] (use -source 5
>> or higher to enable annotations) [javac] @Override [snip]
>
> I can't work out how to tell it how it to use a more recent source
> version.
>
> What I've got so far is at
> <https://github.com/alexsdutton/debian-jena-iri>.
>
> Is there documentation I've missed? Where should I go from here?
>
>
> Kind regards,
>
> Alexander
>
> ¹ http://incubator.apache.org/jena/
> ² http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563793
> ³ http://wiki.debian.org/Java/MavenBuilder
>
>
>


All times are GMT. The time now is 08:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.