Re: maven packaging
sorry for so many questions, but I've found everything I need: DEB_MAVEN_ARGS and maven.properties. Thanks. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. ribal...@gmail.com ribal...@gmail.com wrote: Thank you, my bad. One more question: What is the right way of adding jar to maven repo for existing ant based package? -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Ludovic Claude ludovic.cla...@laposte.net wrote: Hello Boris, You should not try to package only a module of this project (google-http-client) but the whole project, then select which modules you want to include and maybe split the final binaries into several packages. So in short do the following: hg clone https://code.google.com/p/google-http-java-client/ cd google-http-java-client hg update 1.6 mh_make [...] This project contains modules. Include all modules? [y]/n n Analysing google-http-client/pom.xml... Include the module google-http-client/pom.xml ? [y]/n y This is required because the parent POM located at the root of the project contains important information such as the versions for the dependencies. This quite usual in Maven projects and considered best practice. Ludovic On 21/01/2012 04:05, Boris Ribalkin wrote: Hi, One more question on mh_make. I am trying to package google-http-client (https://google-http-java-client.googlecode.com/hg/google-http-client/pom.xml) which depends on com.google.code.gson (http://google-gson.googlecode.com/svn/tags/gson-2.1/). So I packaged gson first and it was fine, but when I run mh_make on google-http-client it says the following: This dependency cannot be found in the Debian Maven repository. Ignore this dependency? com.google.code.gson:gson:jar:null y/[n] dpkg --search /usr/share/maven-repo/com/google/code/gson/gson *Found libgson-java* dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:*null* in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Rescanning /usr/share/maven-repo... Resolving com.google.code.gson:gson:jar:null of scope runtime... In pom.xml, cannot find the version for dependency com.google.code.gson:gson:jar:null from this POM or its parent POMs [warning] Option --no-parent has been set for POM file pom.xml, maybe it was not a good idea and you should first package the parent POM __super__:__pom__:pom:null [check dependency with bundle type] dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:null in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Is this because dependency has no version, but how then junit dependency is found if it has no version as well? What is the proper way of fixing this? Thanks. On Thu, Dec 8, 2011 at 9:17 PM, Boris Ribalkin ribal...@gmail.com mailto:ribal...@gmail.com wrote: Hi Ludovic, Actually I am the owner of the ucloud project on github :) so I can make any changes you suggested. Wil let you know if it will work. Thanks! On Dec 8, 2011 4:58 PM, Ludovic Claude ludovic.cla...@laposte.net mailto:ludovic.cla...@laposte.net wrote: Hello Boris, It looks like you are almost there. Your project is hosted on Github, but I don't support yet Git, so the debian/watch used to find the latest version and get the upstream code is not generated by mh_make. However there are lots of other packages which get their sources from Github (basex, plexus-cipher, junit4, libjdom1-java), so you can study their packaging using apt-get source package. This watch file should in theory get the latest release of uCloud, expect that it does not... cat EOF debian/watch version=3 http://githubredir.debian.net/github/cyberb/uCloud/ (.*).tar.gz EOF You should ask the project owner to tag in Git the latest release, otherwise it's not possible to know what to download. Or better, he should use maven-release-plugin to create a release of the project. After you get this detail sorted, then you should add those lines to debian/rules: get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename Finally, if you work on Ubuntu and use Launchpad, then you should store your packaging in bzr: sudo apt-get install bzr-builddeb bzr init mkdir .bzr-builddeb/ echo -e '[BUILDDEB]\nmerge = True' .bzr-builddeb/default.conf bzr add . and you can build your package with bzr bd Well that's the usual procedure. In your case, since it's difficult to get the upstream sources, you need to
Re: maven packaging
Thanks, that helped. Still have more questions :) Is it possible to override default behavior and run maven with specific profile like mvn -P profile ? On Sun, Jan 29, 2012 at 9:06 AM, Ludovic Claude ludovic.cla...@laposte.netwrote: To add jars to maven repo when the build system is not Maven, use the tools provided by maven-repo-helper. There is a tutorial here: file:///usr/share/doc/maven-repo-helper/tutorial.html Ludovic On 28/01/2012 01:20, ribal...@gmail.com wrote: Thank you, my bad. One more question: What is the right way of adding jar to maven repo for existing ant based package? -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Ludovic Claude ludovic.cla...@laposte.net wrote: Hello Boris, You should not try to package only a module of this project (google-http-client) but the whole project, then select which modules you want to include and maybe split the final binaries into several packages. So in short do the following: hg clone https://code.google.com/p/google-http-java-client/ cd google-http-java-client hg update 1.6 mh_make [...] This project contains modules. Include all modules? [y]/n n Analysing google-http-client/pom.xml... Include the module google-http-client/pom.xml ? [y]/n y This is required because the parent POM located at the root of the project contains important information such as the versions for the dependencies. This quite usual in Maven projects and considered best practice. Ludovic On 21/01/2012 04:05, Boris Ribalkin wrote: Hi, One more question on mh_make. I am trying to package google-http-client ( https://google-http-java-client.googlecode.com/hg/google-http-client/pom.xml ) which depends on com.google.code.gson (http://google-gson.googlecode.com/svn/tags/gson-2.1/). So I packaged gson first and it was fine, but when I run mh_make on google-http-client it says the following: This dependency cannot be found in the Debian Maven repository. Ignore this dependency? com.google.code.gson:gson:jar:null y/[n] dpkg --search /usr/share/maven-repo/com/google/code/gson/gson gt; *Found libgson-java* dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:*null* in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Rescanning /usr/share/maven-repo... Resolving com.google.code.gson:gson:jar:null of scope runtime... In pom.xml, cannot find the version for dependency com.google.code.gson:gson:jar:null from this POM or its parent POMs [warning] Option --no-parent has been set for POM file pom.xml, maybe it was not a good idea and you should first package the parent POM __super__:__pom__:pom:null gt; [check dependency with bundle type] dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:null in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Is this because dependency has no version, but how then junit dependency is found if it has no version as well? What is the proper way of fixing this? Thanks. On Thu, Dec 8, 2011 at 9:17 PM, Boris Ribalkin ribal...@gmail.com mailto:ribal...@gmail.com wrote: Hi Ludovic, Actually I am the owner of the uclo ud project on github :) so I can make any changes you suggested. Wil let you know if it will work. Thanks! On Dec 8, 2011 4:58 PM, Ludovic Claude ludovic.cla...@laposte.net mailto:ludovic.cla...@laposte.net wrote: Hello Boris, It looks like you are almost there. Your project is hosted on Github, but I don't support yet Git, so the debian/watch used to find the latest version and get the upstream code is not generated by mh_make. However there are lots of other packages which get their sources from Github
Re: maven packaging
To add jars to maven repo when the build system is not Maven, use the tools provided by maven-repo-helper. There is a tutorial here: file:///usr/share/doc/maven-repo-helper/tutorial.html Ludovic On 28/01/2012 01:20, ribal...@gmail.com wrote: Thank you, my bad. One more question: What is the right way of adding jar to maven repo for existing ant based package? -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Ludovic Claude ludovic.cla...@laposte.net wrote: Hello Boris, You should not try to package only a module of this project (google-http-client) but the whole project, then select which modules you want to include and maybe split the final binaries into several packages. So in short do the following: hg clone https://code.google.com/p/google-http-java-client/ cd google-http-java-client hg update 1.6 mh_make [...] This project contains modules. Include all modules? [y]/n n Analysing google-http-client/pom.xml... Include the module google-http-client/pom.xml ? [y]/n y This is required because the parent POM located at the root of the project contains important information such as the versions for the dependencies. This quite usual in Maven projects and considered best practice. Ludovic On 21/01/2012 04:05, Boris Ribalkin wrote: Hi, One more question on mh_make. I am trying to package google-http-client (https://google-http-java-client.googlecode.com/hg/google-http-client/pom.xml) which depends on com.google.code.gson (http://google-gson.googlecode.com/svn/tags/gson-2.1/). So I packaged gson first and it was fine, but when I run mh_make on google-http-client it says the following: This dependency cannot be found in the Debian Maven repository. Ignore this dependency? com.google.code.gson:gson:jar:null y/[n] dpkg --search /usr/share/maven-repo/com/google/code/gson/gson gt; *Found libgson-java* dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:*null* in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Rescanning /usr/share/maven-repo... Resolving com.google.code.gson:gson:jar:null of scope runtime... In pom.xml, cannot find the version for dependency com.google.code.gson:gson:jar:null from this POM or its parent POMs [warning] Option --no-parent has been set for POM file pom.xml, maybe it was not a good idea and you should first package the parent POM __super__:__pom__:pom:null gt; [check dependency with bundle type] dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:null in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Is this because dependency has no version, but how then junit dependency is found if it has no version as well? What is the proper way of fixing this? Thanks. On Thu, Dec 8, 2011 at 9:17 PM, Boris Ribalkin ribal...@gmail.com mailto:ribal...@gmail.com wrote: Hi Ludovic, Actually I am the owner of the uclo ud project on github :) so I can make any changes you suggested. Wil let you know if it will work. Thanks! On Dec 8, 2011 4:58 PM, Ludovic Claude ludovic.cla...@laposte.net mailto:ludovic.cla...@laposte.net wrote: Hello Boris, It looks like you are almost there. Your project is hosted on Github, but I don't support yet Git, so the debian/watch used to find the latest version and get the upstream code is not generated by mh_make. However there are lots of other packages which get their sources from Github (basex, plexus-cipher, junit4, libjdom1-java), so you can study their packaging using apt-get source package. This watc h file should in theory get the latest release of uCloud, expect that it does not... cat EOF debian/watch
Re: maven packaging
Thank you, my bad. One more question: What is the right way of adding jar to maven repo for existing ant based package? -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Ludovic Claude ludovic.cla...@laposte.net wrote: Hello Boris, You should not try to package only a module of this project (google-http-client) but the whole project, then select which modules you want to include and maybe split the final binaries into several packages. So in short do the following: hg clone https://code.google.com/p/google-http-java-client/ cd google-http-java-client hg update 1.6 mh_make [...] This project contains modules. Include all modules? [y]/n n Analysing google-http-client/pom.xml... Include the module google-http-client/pom.xml ? [y]/n y This is required because the parent POM located at the root of the project contains important information such as the versions for the dependencies. This quite usual in Maven projects and considered best practice. Ludovic On 21/01/2012 04:05, Boris Ribalkin wrote: Hi, One more question on mh_make. I am trying to package google-http-client (https://google-http-java-client.googlecode.com/hg/google-http-client/pom.xml) which depends on com.google.code.gson (http://google-gson.googlecode.com/svn/tags/gson-2.1/). So I packaged gson first and it was fine, but when I run mh_make on google-http-client it says the following: This dependency cannot be found in the Debian Maven repository. Ignore this dependency? com.google.code.gson:gson:jar:null y/[n] dpkg --search /usr/share/maven-repo/com/google/code/gson/gson *Found libgson-java* dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:*null* in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Rescanning /usr/share/maven-repo... Resolving com.google.code.gson:gson:jar:null of scope runtime... In pom.xml, cannot find the version for dependency com.google.code.gson:gson:jar:null from this POM or its parent POMs [warning] Option --no-parent has been set for POM file pom.xml, maybe it was not a good idea and you should first package the parent POM __super__:__pom__:pom:null [check dependency with bundle type] dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:null in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Is this because dependency has no version, but how then junit dependency is found if it has no version as well? What is the proper way of fixing this? Thanks. On Thu, Dec 8, 2011 at 9:17 PM, Boris Ribalkin ribal...@gmail.com mailto:ribal...@gmail.com wrote: Hi Ludovic, Actually I am the owner of the ucloud project on github :) so I can make any changes you suggested. Wil let you know if it will work. Thanks! On Dec 8, 2011 4:58 PM, Ludovic Claude ludovic.cla...@laposte.net mailto:ludovic.cla...@laposte.net wrote: Hello Boris, It looks like you are almost there. Your project is hosted on Github, but I don't support yet Git, so the debian/watch used to find the latest version and get the upstream code is not generated by mh_make. However there are lots of other packages which get their sources from Github (basex, plexus-cipher, junit4, libjdom1-java), so you can study their packaging using apt-get source package. This watch file should in theory get the latest release of uCloud, expect that it does not... cat EOF debian/watch version=3 http://githubredir.debian.net/github/cyberb/uCloud/ (.*).tar.gz EOF You should ask the project owner to tag in Git the latest release, otherwise it's not possible to know what to download. Or better, he should use maven-release-plugin to create a release of the project. After you get this detail sorted, then you should add those lines to debian/rules: get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename Finally, if you work on Ubuntu and use Launchpad, then you should store your packaging in bzr: sudo apt-get install bzr-builddeb bzr init mkdir .bzr-builddeb/ echo -e '[BUILDDEB]\nmerge = True' .bzr-builddeb/default.conf bzr add . and you can build your package with bzr bd Well that's the usual procedure. In your case, since it's difficult to get the upstream sources, you need to download them yourself and put them in a tar.gz file which you should call ucloud_1.0.0.orig.tar.gz and copy it in the parent directory. Doing so will make bzr bd / debuild happy since they don't have to download the
Re: maven packaging
Hello Boris, You should not try to package only a module of this project (google-http-client) but the whole project, then select which modules you want to include and maybe split the final binaries into several packages. So in short do the following: hg clone https://code.google.com/p/google-http-java-client/ cd google-http-java-client hg update 1.6 mh_make [...] This project contains modules. Include all modules? [y]/n n Analysing google-http-client/pom.xml... Include the module google-http-client/pom.xml ? [y]/n y This is required because the parent POM located at the root of the project contains important information such as the versions for the dependencies. This quite usual in Maven projects and considered best practice. Ludovic On 21/01/2012 04:05, Boris Ribalkin wrote: Hi, One more question on mh_make. I am trying to package google-http-client (https://google-http-java-client.googlecode.com/hg/google-http-client/pom.xml) which depends on com.google.code.gson (http://google-gson.googlecode.com/svn/tags/gson-2.1/). So I packaged gson first and it was fine, but when I run mh_make on google-http-client it says the following: This dependency cannot be found in the Debian Maven repository. Ignore this dependency? com.google.code.gson:gson:jar:null y/[n] dpkg --search /usr/share/maven-repo/com/google/code/gson/gson *Found libgson-java* dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:*null* in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Rescanning /usr/share/maven-repo... Resolving com.google.code.gson:gson:jar:null of scope runtime... In pom.xml, cannot find the version for dependency com.google.code.gson:gson:jar:null from this POM or its parent POMs [warning] Option --no-parent has been set for POM file pom.xml, maybe it was not a good idea and you should first package the parent POM __super__:__pom__:pom:null [check dependency with bundle type] dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:null in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Is this because dependency has no version, but how then junit dependency is found if it has no version as well? What is the proper way of fixing this? Thanks. On Thu, Dec 8, 2011 at 9:17 PM, Boris Ribalkin ribal...@gmail.com mailto:ribal...@gmail.com wrote: Hi Ludovic, Actually I am the owner of the ucloud project on github :) so I can make any changes you suggested. Wil let you know if it will work. Thanks! On Dec 8, 2011 4:58 PM, Ludovic Claude ludovic.cla...@laposte.net mailto:ludovic.cla...@laposte.net wrote: Hello Boris, It looks like you are almost there. Your project is hosted on Github, but I don't support yet Git, so the debian/watch used to find the latest version and get the upstream code is not generated by mh_make. However there are lots of other packages which get their sources from Github (basex, plexus-cipher, junit4, libjdom1-java), so you can study their packaging using apt-get source package. This watch file should in theory get the latest release of uCloud, expect that it does not... cat EOF debian/watch version=3 http://githubredir.debian.net/github/cyberb/uCloud/ (.*).tar.gz EOF You should ask the project owner to tag in Git the latest release, otherwise it's not possible to know what to download. Or better, he should use maven-release-plugin to create a release of the project. After you get this detail sorted, then you should add those lines to debian/rules: get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename Finally, if you work on Ubuntu and use Launchpad, then you should store your packaging in bzr: sudo apt-get install bzr-builddeb bzr init mkdir .bzr-builddeb/ echo -e '[BUILDDEB]\nmerge = True' .bzr-builddeb/default.conf bzr add . and you can build your package with bzr bd Well that's the usual procedure. In your case, since it's difficult to get the upstream sources, you need to download them
Re: maven packaging
Hi, One more question on mh_make. I am trying to package google-http-client ( https://google-http-java-client.googlecode.com/hg/google-http-client/pom.xml) which depends on com.google.code.gson ( http://google-gson.googlecode.com/svn/tags/gson-2.1/). So I packaged gson first and it was fine, but when I run mh_make on google-http-client it says the following: This dependency cannot be found in the Debian Maven repository. Ignore this dependency? com.google.code.gson:gson:jar:null y/[n] dpkg --search /usr/share/maven-repo/com/google/code/gson/gson *Found libgson-java* dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:*null* in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Rescanning /usr/share/maven-repo... Resolving com.google.code.gson:gson:jar:null of scope runtime... In pom.xml, cannot find the version for dependency com.google.code.gson:gson:jar:null from this POM or its parent POMs [warning] Option --no-parent has been set for POM file pom.xml, maybe it was not a good idea and you should first package the parent POM __super__:__pom__:pom:null [check dependency with bundle type] dpkg --status libgson-java [error] Package libgson-java (2.1-1) is already installed and contains a possible match, but I cannot resolve library com.google.code.gson:gson:jar:null in it. [error] Please check manually that the library is up to date, otherwise it may be necessary to package version null in Debian. Try again to resolve the dependency? [y]/n Is this because dependency has no version, but how then junit dependency is found if it has no version as well? What is the proper way of fixing this? Thanks. On Thu, Dec 8, 2011 at 9:17 PM, Boris Ribalkin ribal...@gmail.com wrote: Hi Ludovic, Actually I am the owner of the ucloud project on github :) so I can make any changes you suggested. Wil let you know if it will work. Thanks! On Dec 8, 2011 4:58 PM, Ludovic Claude ludovic.cla...@laposte.net wrote: Hello Boris, It looks like you are almost there. Your project is hosted on Github, but I don't support yet Git, so the debian/watch used to find the latest version and get the upstream code is not generated by mh_make. However there are lots of other packages which get their sources from Github (basex, plexus-cipher, junit4, libjdom1-java), so you can study their packaging using apt-get source package. This watch file should in theory get the latest release of uCloud, expect that it does not... cat EOF debian/watch version=3 http://githubredir.debian.net/github/cyberb/uCloud/ (.*).tar.gz EOF You should ask the project owner to tag in Git the latest release, otherwise it's not possible to know what to download. Or better, he should use maven-release-plugin to create a release of the project. After you get this detail sorted, then you should add those lines to debian/rules: get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename Finally, if you work on Ubuntu and use Launchpad, then you should store your packaging in bzr: sudo apt-get install bzr-builddeb bzr init mkdir .bzr-builddeb/ echo -e '[BUILDDEB]\nmerge = True' .bzr-builddeb/default.conf bzr add . and you can build your package with bzr bd Well that's the usual procedure. In your case, since it's difficult to get the upstream sources, you need to download them yourself and put them in a tar.gz file which you should call ucloud_1.0.0.orig.tar.gz and copy it in the parent directory. Doing so will make bzr bd / debuild happy since they don't have to download the sources. Consider also joining the Debian Java team, as it's full of active and knowledgable developers (http://wiki.debian.org/Teams/JavaPackaging). Once your package is ready, you can ask to include it in Debian and it will land some time later into Ubuntu. Cheers, Ludovic On 08/12/2011 07:31, Boris Ribalkin wrote: Hi, Thanks for the info, your new package is much better. After running mh_make in the root of my project, looks like everything went fine, just one exception at the end: Cannot recognize the download url (scm:git:https://github.com/cyberb/uCloud.git). I've tried different scm urls, but it is always the same, is it OK? than I ran debuild and got the following error: This package has a Debian revision number but there does not seem to be an appropriate original tar file or .orig directory in the parent directory; (expected one of ucloud_1.0.0.orig.tar.gz, ucloud_1.0.0.orig.tar.bz2, ucloud_1.0.0.orig.tar.lzma, ucloud_1.0.0.orig.tar.xz or ucloud.orig) continue anyway? (y/n) y and then dpkg-source: error: can't build with source format '3.0 (quilt)': no orig.tar