Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Java (http://www.linux-archive.org/debian-java/)
-   -   News on the Maven front (http://www.linux-archive.org/debian-java/389623-news-maven-front.html)

Ludovic Claude 06-22-2010 10:04 PM

News on the Maven front
 
Hello,

Since Torsten has sponsored the new versions of maven-repo-helper (1.1)
and maven-debian-helper (1.0), I would like to show you how to package
software built with Maven in Debian.


It's actually quite easy, since Maven gives lots of information about a
project, in particular its list of dependencies. So if your project has
already all its dependencies packaged for Debian, and with the correct
Maven metadata, then it's a piece of cake!


So for example I want to package Jakarta Commons Exec. I search for the
SVN url pointing to the latest release of this library in the project
pages, find
http://svn.apache.org/repos/asf/commons/proper/exec/tags/EXEC_1_0_1/,
then I run:


> mh_make
--from-svn=http://svn.apache.org/repos/asf/commons/proper/exec/tags/EXEC_1_0_1/


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 exec

>
Enter the name of the binary package. If empty, it will defaults to
libexec-java

>
Enter y (yes) or n (no) to run tests while building the package.
Defaults to no

>y
Enter y (yes) or n (no) to generate the Javadoc while building the
package. Defaults to no

>y
A exec
A exec/NOTICE.txt
A exec/LICENSE.txt
A exec/doap_exec.rdf
[...]
Exporté à la révision 957046.
This plugin may be ignored in some cases. Ignore this plugin?
org.apache.maven.plugins:maven-assembly-plugin:maven-plugin:2.2-beta-4
[y]/n > y
This dependency cannot be found in the Debian Maven repository. Ignore
this dependency?

org.apache.maven.plugins:maven-changes-plugin:maven-plugin:2.0
[y]/n > y
This plugin may be ignored in some cases. Ignore this plugin?
org.codehaus.mojo:findbugs-maven-plugin:maven-plugin:1.2
[y]/n > y
This dependency cannot be found in the Debian Maven repository. Ignore
this dependency?

org.codehaus.mojo:cobertura-maven-plugin:maven-plugin:2.0
[y]/n > y
WARNING:
pom.xml: Dependency is not packaged in the Maven repository for Debian:
org.apache.maven.plugins:maven-changes-plugin:2.0
pom.xml: Dependency is not packaged in the Maven repository for Debian:
org.codehaus.mojo:cobertura-maven-plugin:2.0

--------
[INFO]
NOTE: Maven is executing in offline mode. Any artifacts not already in
your local

repository will be inaccessible.

[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------

[INFO] Building Commons Exec
[INFO] task-segment:
[org.debian.maven:maven-packager-utils:1.0:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------

[INFO] [packager-utils:generate {execution: default-cli}]
Cannot locate the version in the download url
(http://svn.apache.org/repos/asf/commons/proper/exec/tags/EXEC_1_0_1/).
Please run again and provide the download location with an explicit
version tag, e.g.

-DdownloadUrl=scm:svn:http://svn.codehaus.org/modello/tags/modello-1.0-alpha-21/
> chmod +x debian/rules
[INFO]
------------------------------------------------------------------------

[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------

[INFO] Total time: 7 seconds
[INFO] Finished at: Tue Jun 22 23:51:52 CEST 2010
[INFO] Final Memory: 10M/138M
[INFO]
------------------------------------------------------------------------

>

That's it. Now I have a debian folder, and it contains changelog,
control, rules, copyright and a few other files. My package is ready!
Ok, I need to file an ITP, fix the copyright, the watch file was not
generated because the download url does not contain an easily
recognizable version, but most of the job is done. The package can be
installed, there is even a documentation package, and all is in the
proper place.


mh_make should works on most upstream sources packaged with Maven 2, and
there is even this neat option, --from-svn, where it can download the
sources for you and build sometimes the watch file.


If you have issues with an upstream package or want improvements, don't
hesitate to file a bug report.


Cheers,
Ludovic




--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C213380.8030500@laposte.net">http://lists.debian.org/4C213380.8030500@laposte.net

"Manfred Moser" 06-22-2010 11:06 PM

News on the Maven front
 
This is great. One question I have is however what happens if a dependency
is not packaged in debian as the flow shows but is required at runtime.
Will it be included in the package or will it be ignored and therefore a
potentially non functioning package produced.

Another question... can we have this on a wiki somewhere? Would also be
good for the ubuntu and other crowds that use the debian tool chain.

manfred


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 3f8dfa4421ef0fc71be772f641ac8652.squirrel@www.mosa buam.com">http://lists.debian.org/3f8dfa4421ef0fc71be772f641ac8652.squirrel@www.mosa buam.com

Arnaud Vandyck 06-23-2010 12:02 PM

News on the Maven front
 
Le 23/06/10 00:04, Ludovic Claude a écrit :
>
> Hello,
>
> Since Torsten has sponsored the new versions of maven-repo-helper (1.1)
> and maven-debian-helper (1.0), I would like to show you how to package
> software built with Maven in Debian.

Excellent work!

--
Arnaud Vandyck
Proverbe Islandais: Ils volcans les avions?
Bah! Quand les nuages vont des cendres


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C21F7D7.6040508@gmail.com">http://lists.debian.org/4C21F7D7.6040508@gmail.com

Torsten Werner 06-23-2010 09:04 PM

News on the Maven front
 
Hi,

On Wed, Jun 23, 2010 at 7:06 AM, PICCA Frédéric-Emmanuel
<frederic-emmanuel.picca@synchrotron-soleil.fr> wrote:
> Juste a question: what about others scm:
>
> CVS, hg, git etc...

just send a patch. :-) Most upstream projects are using svn BTW.

Cheers,
Torsten


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTinACh_X4T0Pm3AOtJ_fjKT9hfHi-30U_rK73lwQ@mail.gmail.com">http://lists.debian.org/AANLkTinACh_X4T0Pm3AOtJ_fjKT9hfHi-30U_rK73lwQ@mail.gmail.com


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

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