Re: Is there a pom.xml parser packaged in Debian ?
Le Fri, Oct 07, 2011 at 11:51:27PM +0200, Ludovic Claude a écrit :
>
> What do you want to acheive here? If you want to package snappy-java,
> then install maven-debian-helper, and run the command mh_make on the
> upstream sources (you need to cd to the directory containing the file
> pom.xml). Then mh_make will ask lots of questions and do its best to
> generate the packaging for you.
Dear Ludovic,
thank you very much for your help.
I tried mh_make on snappy-java version 1.0.4.1, downloaded as a compressed
achive from Google Code. Using git-import-orig's filter capacities, I removed
the lib directory that contains a sourceless JAR for silk-weaver, which you
showed me how to replace with mh_clean.
I then ran mh_make, which looks incredibly useful, and ran into the following
error:
This dependency cannot be found in the Debian Maven repository. Ignore this dependency?
org.osgi:core:bundle:4.3.0
This java library is packaged with another layout in Debian, so I replaced
<artifactId>core</artifactId> by <artifactId>org.osgi.core</artifactId> in
pom.xml. Is there a cleaner way to do ?
I then ran in the following error where mh_make does not find
org.apache.felix:maven-bundle-plugin.
Environment variable DEBLICENSE not set, using GPL-3+ by default
Enter the name of the new Debian source package. If empty, it will defaults to snappy
>
Enter the name of the binary package. If empty, it will defaults to libsnappy-java
>
Run tests while building the package?
[y]/n >
Generate the Javadoc while building the package?
[y]/n >
Checking that apt-file is installed and has been configured...
[ok]
Checking that licensecheck is installed...
[ok]
Solving dependencies for package libsnappy-java (tests are included) (documentation is included)
Enter the upstream version for the package. If you press <Enter> it will default to 1.0.4.1
>
Version of org.xerial.snappy:snappy-java is 1.0.4.1
Choose how it will be transformed:
[1] - Replace all versions starting by 1. with 1.x
2 - Change the version to the symbolic 'debian' version
3 - Keep the version
4 - Custom rule
>
Resolving junit:junit:jar:4.8.2 of scope test...
[ok]
Resolving org.codehaus.plexus:plexus-classworlds:jar:2.4 of scope test...
[ok]
Resolving org.osgi:org.osgi.core:jar:4.3.0 of scope provided...
[ok]
Resolving org.xerial:xerial-core:jar:1.0.21 of scope test...
[check with bundle dependency type]
In pom.xml:
This dependency cannot be found in the Debian Maven repository. Ignore this dependency?
org.xerial:xerial-core:bundle:1.0.21
y/[n] > y
[ignored]
Resolving org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.3 of scope runtime...
[ok]
Resolving org.apache.maven.plugins:maven-compiler-plugin:maven-plugin:2.0.2 of scope runtime...
[ok]
Resolving org.apache.maven.plugins:maven-release-plugin:maven-plugin:2.1 of scope runtime...
In pom.xml:
This plugin is not useful for the build or its use is against Debian policies. Ignore this plugin?
org.apache.maven.plugins:maven-release-plugin:maven-plugin:2.1
[y]/n >
[ignored]
Resolving org.apache.maven.plugins:maven-javadoc-plugin:maven-plugin:2.6.1 of scope runtime...
[ok]
Resolving org.apache.maven.plugins:maven-source-plugin:maven-plugin:2.1.2 of scope runtime...
In pom.xml:
This plugin is not useful for the build or its use is against Debian policies. Ignore this plugin?
org.apache.maven.plugins:maven-source-plugin:maven-plugin:2.1.2
[y]/n >
[ignored]
-> Resolving org.apache.felix:maven-bundle-plugin:maven-plugin:2.3.5 of scope runtime...
-> [ok]
Resolving org.apache.maven.plugins:maven-assembly-plugin:maven-plugin:2.2-beta-5 of scope runtime...
In pom.xml:
This plugin may be ignored in some cases. Ignore this plugin?
org.apache.maven.plugins:maven-assembly-plugin:maven-plugin:2.2-beta-5
[y]/n >
[ignored]
Resolving org.apache.maven.wagon:wagon-ssh-external:jar:1.0-beta-7 of scope runtime...
In pom.xml:
This extension is not useful for the build or its use is against Debian policies. Ignore this extension?
org.apache.maven.wagon:wagon-ssh-external:jar:1.0-beta-7
[y]/n >
[ignored]
Checking dependencies for documentation packages...
> dpkg --search /usr/share/doc/libosgi-core-java/api/index.html
libosgi-core-java-doc: /usr/share/doc/libosgi-core-java/api/index.html
Found libosgi-core-java-doc
[INFO]
NOTE: Maven is executing in offline mode. Any artifacts not already in your local
repository will be inaccessible.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.felix:maven-bundle-plugin
-> Reason: POM 'org.apache.felix:maven-bundle-plugin' not found in repository: System is offline.
org.apache.felix:maven-bundle-plugin:pom:2.3.4
for project org.apache.felix:maven-bundle-plugin
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Oct 31 18:45:32 JST 2011
[INFO] Final Memory: 3M/180M
[INFO] ------------------------------------------------------------------------
Strangely, while mh_help outputs [ok] for maven-bundle-plugin, it is not found
in the end (see the arrows in the margin).
Have a nice day,
--
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan
Reply to: