Re: Building maven packages
- To: Wookey <wookey@wookware.org>
- Cc: debian-java@lists.debian.org
- Subject: Re: Building maven packages
- From: Markus Koschany <apo@debian.org>
- Date: Fri, 30 Dec 2016 20:02:23 +0100
- Message-id: <[🔎] 4d7b01e8-7bca-362c-e741-f1a582cd2ee1@debian.org>
- In-reply-to: <[🔎] 20161230034443.GP3205@mail.wookware.org>
- References: <[🔎] 20161229012933.GH9774@mail.wookware.org> <[🔎] 5dfc0020-68ba-2d87-6486-9d1db20233e9@apache.org> <[🔎] 20161230005904.GO3205@mail.wookware.org> <[🔎] 21c9644e-62e1-bea1-ad79-86a1cb31684a@apache.org> <[🔎] 20161230034443.GP3205@mail.wookware.org>
On 30.12.2016 04:44, Wookey wrote: [...] > BTW. if I try to use mh_patchpoms -plibmaven-native-java and > mh_unpatchpoms -plibmaven-native-java to test if my rules are right > (quicker than doing a build), I get dpkg-source complaining that all > the pom.xml files have changed from the orig. I think this is a > dos/unix linefeed issue (the patch alleges that every line has > changed...). How does this work doing the build, but not work using > mh_patchpoms/mh_unpatchpoms? > > Is that a bug? Hmm, not sure. [...] -------------------------------------------------- > [ERROR] COMPILATION ERROR : > [INFO] ------------------------------------------------------------- > [ERROR] /home/wookey/packages/jscience/maven-native-plugin/debian/maven-native-1.0alpha8/native-maven-plugin/src/main/java/org/codehaus/mojo/natives/plugin/NativeLinkMojo.java:[33,41] package org.apache.maven.artifact.factory does not exist > [ERROR] /home/wookey/packages/jscience/maven-native-plugin/debian/maven-native-1.0alpha8/native-maven-plugin/src/main/java/org/codehaus/mojo/natives/plugin/NativeLinkMojo.java:[153,13] cannot find symbol > symbol: class ArtifactFactory > location: class org.codehaus.mojo.natives.plugin.NativeLinkMojo > > so it seems that org/apache/maven/maven-artifact is installed, and that's what the dependency is named as, but in the file native-maven-plugin/src/main/java/org/codehaus/mojo/natives/plugin/AbstractNativeMojo.java it's: > import org.apache.maven.artifact.factory.ArtifactFactory; > should that be > import org.apache.maven.maven-artifact.factory.ArtifactFactory; ? > > but in that case how does this work upstream? Is there a better way of > finding the classes in a jar than unzip foo.jar | strings? > > patching the file to load > org.apache.maven.maven-artifact.factory.ArtifactFactory doesn;t work - > it complains about missing semicolons, which I guess means that '-' > isn't permitted in import paths like this. So I'm a bit flumoxed now. You got the "cannot find symbol" error message. This can usually mean 1. The package is not listed in debian/control. Not true in this case because libmaven2-core-java is there. 2. The package does not contain the classes/methods anymore because they were already deprecated and then finally removed or they simply changed. Also not true [1] 3. Your substitution rule is wrong. These ones are correct org.apache.maven maven-artifact jar s/.*/2.2.1/ * * org.apache.maven maven-model jar s/.*/2.2.1/ * * org.apache.maven maven-plugin-api jar s/.*/2.2.1/ * * In this case s/.*/3.x won't work because a strict dependency is required. Maven is somewhat special, the API can easily break and I believe that is the reason why we neither provide a Debian version or 2.x version. If you look at the filelist you can see that there are only 2.2.1 versions. https://packages.debian.org/sid/all/libmaven2-core-java/filelist Afterwards compilation will succeed when you skip the tests. Just add maven.test.skip=true to maven.properties in your debian directory. I haven't investigated why the tests don't work though, maybe it can be trivially solved. Regards, Markus [1] https://sources.debian.net/src/maven2-core/2.2.1-26/maven-artifact/src/main/java/org/apache/maven/artifact/factory/
Attachment:
signature.asc
Description: OpenPGP digital signature
Reply to:
- References:
- re: Building maven packages
- From: Wookey <wookey@wookware.org>
- Re: Building maven packages
- From: Emmanuel Bourg <ebourg@apache.org>
- Re: Building maven packages
- From: Wookey <wookey@wookware.org>
- Re: Building maven packages
- From: Emmanuel Bourg <ebourg@apache.org>
- Re: Building maven packages
- From: Wookey <wookey@wookware.org>
- re: Building maven packages
- Prev by Date: Re: Building maven packages
- Previous by thread: Re: Building maven packages
- Next by thread: re: Building maven packages
- Index(es):