First steps with maven and Java packaging
Dear all Debian Javaers
First of all let me state my SKILLS: - Java: MEDIUM - Maven: NEWBIE, although I have gone through several tutorials and docs [1]. - Ant (if applicable): NONE - Debian Packaging: MEDIUM-HIGH. Lots of experience backporting, still not much creating new packages. What I want to do ----------------- Package, in Debian Squeeze the esper library of CodeHaus http://esper.codehaus.org/ in particular the 4.0.0 version available through SVN. http://svn.codehaus.org/esper/esper/tags/release_4.0.0 and more specifically the main esper subdirectory. http://svn.codehaus.org/esper/esper/tags/release_4.0.0/esper Where I am now -------------- On upstream: * Using upstream sources and invoking "mvn jar:jar", I get the .jar file without problems. * If I do a "mvn package" o "mvn install" the tests get execute which require a working mysql setting which I don't have (and would not like to set it up right now). On Debian package: * I created a control file, a changelog and a basic rules file taken from http://wiki.debian.org/Java/MavenBuilder THE PROBLEMS ------------ When I issue "debuild" I get TWO MISSING DEPENDENCIES: Junit and MySQL Missing: ---------- 1) junit:junit:jar:debian Path to dependency: 1) com.espertech:esper:jar:4.0.0 2) junit:junit:jar:debian 2) mysql:mysql-connector-java:jar:debian Path to dependency: 1) com.espertech:esper:jar:4.0.0 2) mysql:mysql-connector-java:jar:debian About Junit: I don't understand why Junit can be missing since I have both junit and junit4 installed. ii junit 3.8.2-4 Automated testing framework for Java un junit-doc <ninguna> junit4 4.8.2-2 JUnit regression test framework for Java both show up at /usr/share/maven/repo About mysql-java: It is true the libmysql-java does not provide any POM content. But on the other side it is not needed for building. WHAT I WOULD LIKE TO ASK YOU (finally) -------------------------------------- * Is there a way to disable any test phase in the package? I would like to set the property maven.test.skip = true but I don't know where, in the debian/ directory place this command. * Is there an easy way to generate a POM for libmysql-java?. Should I file a bug on this package?. But I guess it will not be the only one not providing POM content. * Why do I have dependency problems with Junit?. This seems to be a very common package that should work well with Maven. * I am still using maven-debian-helper 1.1 from squeeze. Should I backport the 1.4 version in Sid and Wheezy? Thanks for your time, Miguel [1] http://en.wikipedia.org/wiki/Apache_Maven http://maven.apache.org/guides/getting-started/index.html http://docs.codehaus.org/display/MAVENUSER/The+Project+Object+Model+%28POM%29 http://docs.codehaus.org/display/MAVENUSER/The+Project+Object+Model+%28POM%29 http://wiki.debian.org/Java/MavenBuilder http://wiki.debian.org/Java/MavenRepoSpec http://wiki.debian.org/Java/MavenRepoHelper http://wiki.debian.org/Java/MavenDebianHelper -- (O-O) ---oOO-(_)-OOo----------------------------------------------------- Miguel TELLERIA DE ESTEBAN http://www.mtelleria.com Email: miguel at mtelleria.com Tel GSM: +34 650 801098 Tel Fix: +34 942 280174 Miembro de http://www.linuca.org Membre du http://www.bxlug.be ¿Usuario captivo o libre? http://www.obtengalinux.org/windows/ Free or captive user? http://www.getgnulinux.org/windows/ ------------------------------------------------------------------- |
First steps with maven and Java packaging
Hi Miguel
On Wed, 2011-05-18 at 11:39 +0200, Miguel Telleria de Esteban wrote: > > * Is there a way to disable any test phase in the package? I would > like to set the property > > maven.test.skip = true > > but I don't know where, in the debian/ directory place this > command. Set this in debian/maven.properties - it should get picked up automatically then. > > * Is there an easy way to generate a POM for libmysql-java?. Should > I > file a bug on this package?. But I guess it will not be the only > one not providing POM content. Definitely raise a bug; a patch would be great as well - see http://wiki.debian.org/Java/MavenRepoHelper on how to install the jar and POM in the right locations by using maven-repo-helper. > > * Why do I have dependency problems with Junit?. This seems to be a > very common package that should work well with Maven. The junit packages install into the maven repo under version numbers 3.x or 4.x so you will need to add the following rule to debian/maven.rules to make your package pickup the right version: junit junit jar s/4..*/4.x/ * * > > * I am still using maven-debian-helper 1.1 from squeeze. Should I > backport the 1.4 version in Sid and Wheezy? 1.4 certainly does alot more that 1.1 - especially when generating the initial package (see mh_make) - in fact it can even pull directly from a svn repository. Cheers James -- James Page Software Engineer, Ubuntu Server Team |
First steps with maven and Java packaging
Hello again,
First of all thanks James for your answer, I have not had time until now to work on the issue but now I can comment some progress that I have made. On Wed, 18 May 2011 14:45:04 +0100 James Page wrote: > Hi Miguel > > On Wed, 2011-05-18 at 11:39 +0200, Miguel Telleria de Esteban wrote: > > > > * Is there a way to disable any test phase in the package? I would > > like to set the property > > > > maven.test.skip = true > > > > but I don't know where, in the debian/ directory place this > > command. > > Set this in debian/maven.properties - it should get picked up > automatically then. I have done so but the tests are still activated. Could it be because I am still using maven-debian-helper 1.1?... I guess not, I will investigate further. Anyway having the tests activated allow me to check the other two issues. > > > > > * Is there an easy way to generate a POM for libmysql-java?. > > Should I > > file a bug on this package?. But I guess it will not be the only > > one not providing POM content. > > Definitely raise a bug; a patch would be great as well - see > http://wiki.debian.org/Java/MavenRepoHelper on how to install the jar > and POM in the right locations by using maven-repo-helper. Done, and it was not that hard to fix the package. Bug report with patch is available. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627746 Once I installed the patched package maven does not complain more about missing mysql-connector. On another hand, this package dates from 2009. Is it still maintained? upstream version is much higher. But this is a different issue for now. > > > > > * Why do I have dependency problems with Junit?. This seems to be > > a very common package that should work well with Maven. > > The junit packages install into the maven repo under version numbers > 3.x or 4.x so you will need to add the following rule to > debian/maven.rules to make your package pickup the right version: > > junit junit jar s/4..*/4.x/ * * Done and it works. > > > > > * I am still using maven-debian-helper 1.1 from squeeze. Should I > > backport the 1.4 version in Sid and Wheezy? > > 1.4 certainly does alot more that 1.1 - especially when generating the > initial package (see mh_make) - in fact it can even pull directly > from a svn repository. I am considering backporting. Cheers, Miguel -- (O-O) ---oOO-(_)-OOo----------------------------------------------------- Miguel TELLERIA DE ESTEBAN http://www.mtelleria.com Email: miguel at mtelleria.com Tel GSM: +34 650 801098 Tel Fix: +34 942 280174 Miembro de http://www.linuca.org Membre du http://www.bxlug.be ¿Usuario captivo o libre? http://www.obtengalinux.org/windows/ Free or captive user? http://www.getgnulinux.org/windows/ ------------------------------------------------------------------- |
| All times are GMT. The time now is 10:05 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.