Re: Migration from ant to maven
Hi Markus,
thank you very much for the answer. As I said, maven is very new to me,
and I still did not really get into its concepts.
Markus Koschany <apo@debian.org> writes:
> Am 25.09.19 um 17:47 schrieb Ole Streicher:
> Perhaps we can use this conversation to improve the Wiki article about
> Maven packaging?
Sure. I will try to point out where I have difficulties (sometimes it is
just misreading, see below :-) )
>> * how do I start?
>
> Take a look at your pom.xml file and find out what build-dependencies
> are required to build jsamp. The are listed between the <dependencies>
> paragraphs. Most of them should have been packaged already, then you
> could run mh_make inside of jsamp's root directory.
Ahh, this is an enlightenment ;-) I didn't realize that I should run
mh_make myself; I thought it is something started by dh. When I re-read
the "mh_make" section now: this is written there. Maybe make it a bit
more explicite that this should be done manually?
So, I looked into the dependencies and (as the article suggests)
installed them:
* ant, ant-contrib
* xmlrpc dep is in libxmlrpc3-client-java
(which has /usr/share/maven-repo/org/apache/xmlrpc/xmlrpc-client/…)
* junit
When I then run mh_maven, it first stumbles upon the dependency
xmlrpc:xmlrpc:jar:1.2-b1, searches /usr/share/maven-repo/… and
/usr/share/java/xmlrpc.jar for it (all failing) and asks me:
| try to enter a substitution rule of the form s/groupId/newGroupId/
| s/artifactId/newArtifactId/ jar s/version/newVersion/ here:
where I get lost. What is groupId, artifactId, version?
The dependency in pom.xml has groupId=artefactId="xmlrpc",
version="1.2-b1", but what shall I put there now?
Next one (after ignoring this for a moment) is the
"org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:null"
dependency. This is already found then with apt-file:
| Found /usr/share/maven-repo/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom in libmaven-antrun-plugin-java
| Found /usr/share/maven-repo/org/apache/maven/plugins/maven-antrun-plugin/1.8/maven-antrun-plugin-1.8.pom in libmaven-antrun-plugin-java
However it again complains then:
| [error] Cannot resolve Maven dependency org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:null. If you know a package that contains a compatible dependency,
| try to enter a substitution rule of the form s/groupId/newGroupId/ s/artifactId/newArtifactId/ jar s/version/newVersion/ here:
The same repeats with
"org.apache.maven.plugins:maven-javadoc-plugin:maven-plugin:2.9.1"
which is also found with apt-file, but then fails. It looks that one
needs to install the packages for the antrun and javadoc plugins first;
this is however not good documented (and took me a while to find out).
So, now the only error I couldn't resolve is the xmlrpc
dependency. Could you help me there?
Best regards
Ole
Reply to: