[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packages required for trunk build of OpenMRS with MavenBuilder - next steps?



Hello Misha,

I have fixed this NullPointerException, plus another one (my earlier
fix, which I thought would apply to your issue).
Try again with the latest packages in my PPA.

> Some additional questions:
> i) I assume no one is packaging
> org.databene:databene-benerator:debian
> org.azeckoski:reflectutils:debian
> ?

Databene-benerator is a medium sized package, with quite a few
dependencies not yet packaged. As it's used for testing, maybe you can
skip this package and disable testing for your package.

Reflectutils is quite easy to package. Run this command and you get a
good packaging:
mh_make
--from-svn=http://reflectutils.googlecode.com/svn/tags/reflectutils-0.9.14/
Can you take care of this little package? I think it's good training!

I have not filed an ITP for the buildnumber Maven plugin, I'm always
behind when it comes to documenting my work...

> web/pom.xml: Dependency is not packaged in the Maven repository for
> Debian: org.openmrs.api:openmrs-api:debian
It looks like an old bug. Can you send me the full build log and the
commands you use, as well as your debian folder.

> I found the following is now added to debian/maven.cleanIgnoreRules
> org.openmrs.api openmrs-api s/1\\..*/1.x/ s/.*/debian/ * *
> is this indeed an indication that this dependency will be ignored?

No, this means that this dependency will be ignored during the clean
phase of the Maven build, which is what you want (you don't want mvn
clean to look for a dependency which Maven will build later.)

The maven-repo-helper and maven-debian-helper are still under heavy
development, in particular I will transition from using CDBS in the
rules file to using debhelper 7, but it's getting more usable now. I
hope that the new version will reach Debian unstable by the end of the
year.

Ludovic

On 11/17/2010 10:16 PM, Misha Koshelev wrote:
> Hi Ludovic,
> 
> On Wed, Nov 17, 2010 at 1:45 PM, Misha Koshelev <misha680@gmail.com> wrote:
>> Hello Misha,
>>
>> Thanks for the bug report, I have updated my packages and it should fix
>> this bug.
> Great news! Minor caveat :(
> 
> I uploaded to what I believe are the latest versions per:
> https://launchpad.net/~ludovicc/+archive/ppa/+packages?field.name_filter=&field.status_filter=published&field.series_filter=maverick
> 
> misha@debian:~/maven/trunk$ dpkg -l | grep maven- | grep helper
> ii  maven-debian-helper                  1.3.0ubuntu1~ppa5
>        Helper tools for building Debian packages with Maven
> ii  maven-repo-helper                    1.4ubuntu0~ppa7
>        Helper tools for including Maven metatada in Debian packages
> 
> but I seem to still be getting the bug :( Any ideas? (Please see
> output of dpkg-buildpackage command (attached, relevant blurb is here:
> ...
> The list of POM files is now in debian/openmrs.poms
> /usr/share/maven-debian-helper/copy-repo.sh /home/misha/maven/trunk/debian
> mh_patchpoms -popenmrs --debian-build --keep-pom-version
> --maven-repo=/home/misha/maven/trunk/debian/maven-repo
> --build-no-docs --ignore-rules=debian/maven.ignoreRules
> --clean-ignore-rules=debian/maven.cleanIgnoreRules
> Nov 17, 2010 2:34:27 PM org.debian.maven.repo.ListOfPOMs foreachPoms
> SEVERE: null
> java.lang.NullPointerException
>         at org.debian.maven.repo.ListOfPOMs.contains(ListOfPOMs.java:155)
>         at org.debian.maven.repo.POMTransformer.keepParentVersion(POMTransformer.java:220)
>         at org.debian.maven.repo.POMTransformer$3.handlePOM(POMTransformer.java:234)
>         at org.debian.maven.repo.ListOfPOMs.foreachPoms(ListOfPOMs.java:98)
>         at org.debian.maven.repo.POMTransformer.transformPoms(POMTransformer.java:230)
>         at org.debian.maven.repo.POMTransformer.main(POMTransformer.java:1073)
> touch debian/stamp-poms-patched
> cd . && /usr/lib/jvm/java-6-openjdk/bin/java -noverify -cp
> /usr/share/maven2/boot/classworlds.jar:/usr/lib/jvm/java-6-openjdk/lib/tools.jar
>  -Dclassworlds.conf=/etc/maven2/m2-debian.conf
> org.codehaus.classworlds.Launcher -s/etc/maven2/settings-debian.xml
> -Dmaven.repo.local=/home/misha/maven/trunk/debian/maven-repo  clean
> [INFO]
> NOTE: Maven is executing in offline mode. Any artifacts not already in
> your local
> repository will be inaccessible.
> ...
> ). It does seem to get farther now, so that is good, but the error is
> still there.
> 
> Just in case, before running this command, I deleted debian/*.poms and
> debian/maven.* files, in case there were any changes in these from the
> old to new version.
> 
> Some additional questions:
> i) I assume no one is packaging
> org.databene:databene-benerator:debian
> org.azeckoski:reflectutils:debian
> ?
> 
> I tried to search for ITP's using Google (it works for ITP openmrs),
> but was not even able to find ITP buildnumber which I know you are
> working on :(
> 
> Also, regarding
> 
> web/pom.xml: Dependency is not packaged in the Maven repository for
> Debian: org.openmrs.api:openmrs-api:debian
> 
> this dependency is provided by the api module of the project, which
> will be built before Web. Do I understand that build will proceed with
> this error, or do I need to explicitly tell maven buildnumber helper
> or maven repo helper to ignore it somehow?
> 
> I found the following is now added to debian/maven.cleanIgnoreRules
> org.openmrs.api openmrs-api s/1\\..*/1.x/ s/.*/debian/ * *
> is this indeed an indication that this dependency will be ignored?
> 
>>
>> About the following bug:
>> [INFO] Error building POM (may not be this project's POM).
>>
>> Project ID: org.openmrs.codehaus.mojo:buildnumber-maven-plugin
>>
>> Reason: POM 'org.openmrs.codehaus.mojo:buildnumber-maven-plugin' not
>> found in repository: System is offline.
>>
>> This bug simply means that you will need to package the
>> buildnumber-maven-plugin. I'm currently working on this particular
>> plugin, but using the Codehaus version. Is there any reason why OpenMRS
>> uses their version of the plugin?
> In order to release valid source tarballs, we would like our sources
> to compile without .svn folders.
> 
> This is also (to my understanding) an issue for debian packaging of
> OpenMRS or any other package.
> 
> The underlying bug is this
> http://jira.codehaus.org/browse/MOJO-1539
> and apparently is related to
> http://jira.codehaus.org/browse/MOJO-1524
> The relevant patch is, to my understanding
> http://jira.codehaus.org/secure/attachment/49652/getScmBranchPatch.txt
> 
> The OpenMRS bug report is
> http://tickets.openmrs.org/browse/TRUNK-1747
> specifically please see the first comment
> http://tickets.openmrs.org/browse/TRUNK-1747?focusedCommentId=162093&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_162093
> 
> I hope this clarifies the difference. Thus, I believe we would still
> need our version of the plug-in, _especially_ if we're using it to
> build a deb package.
> 
> I imagine others using this maven plugin might have similar
> requirements, since they are, by definition, going to be making a deb
> package.
> 
> However, if they are _not_ using the javasvn provider for some reason
> (which does not require native svn), they should be safe.
> 
> I suppose another fix for a deb would be to require subversion and
> have a package-specific patch that removes use of the javasvn
> provider. However, I would imagine other users might need this feature
> as well, and would _also_ require such a patch.
> 
> Is there any place I could get a binary version of your efforts?
> Obviously, this is not necessary until the other plug-ins are packaged
> (please see previous question), but I am just not clear on the exact
> status of your buildnumber package as I did not find any relevant ITP
> or additional info.
> 
>>
>> About Spring 3: this package is now in experimental, but once Squeeze is
>> released, it will move to Unstable then Testing.
> Great to hear! Thank you.
> 
> Please pardon my ignorance - I believe that Debian releases do not
> happen on a _schedule_ as Ubuntu releases do, but would you have any
> ballpark estimate of when this might happen (OpenMRS 1.8 will be
> released most likely by end of year, so that would be targeted date
> for trying to submit a new package to FTP Masters; thank you).
> 
>> This means that with
>> some luck it will be picked up automatically by the next Ubuntu,
>> otherwise it's always possible to file a sync request at Ubuntu and
>> manually include the latest package into the Universe repository of
>> Ubuntu. The same applies to my packages.
> Thank you.
> 
> Just to clarify, if I am making a package for _debian_, should I still
> use the package from the standard debian repository? I would imagine
> that this would be a requirement for submitting such a package to FTP
> Masters (OpenMRS trunk will be released probably by years' end, so we
> would, I imagine, have to use the version in debian itself at that
> time?)
> 
> Thank you so much for your help and feedback and I appreciate your comments.
> 
> Misha
> 
>>
>> On 11/16/2010 05:41 AM, Misha Koshelev wrote:
>>>
>>> Hi Ludovic:
>>>
>>> Thank you for your comments.
>>>
>>> I downloaded and installed the two packages from your PPA:
>>> rm -rf /tmp/test > /dev/null 2>&1
>>> mkdir /tmp/test
>>> cd /tmp/test
>>> wget -c https://launchpad.net/~ludovicc/+archive/ppa/+build/2046440/+files/maven-debian-helper_1.3.0ubuntu1~ppa4_all.deb
>>> wget -c https://launchpad.net/~ludovicc/+archive/ppa/+build/2046441/+files/maven-repo-helper_1.4ubuntu0~ppa6_all.deb
>>> sudo dpkg -i *.deb
>>>
>>> Then added the experimental repository to my /etc/apt/sources.list:
>>> deb http://ftp.debian.org/debian experimental main
>>>
>>> And finally made some changes to my debian folder which are saved here:
>>> rm -rf /tmp/test > /dev/null 2>&1
>>> cd /tmp/test
>>> wget https://bigfile.bcm.tmc.edu/outbound/mk144210/debian.tar.bz2
>>> svn checkout http://svn.openmrs.org/openmrs/trunk --quiet
>>> cd trunk
>>> tar xvjf ../debian.tar.bz2
>>>
>>> Finally ran:
>>> dpkg-buildpackage -rfakeroot -us -uc
>>>
>>> You were right in terms of dependencies. However, I thought you might
>>> be interested in the following NullPointerException:
>>> dpkg-buildpackage -rfakeroot -us -uc
>>> dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
>>> dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor):
>>> dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2
>>> dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
>>> dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor):
>>> dpkg-buildpackage: source package openmrs
>>> dpkg-buildpackage: source version 1.6.1-1
>>> dpkg-buildpackage: source changed by Misha Koshelev <misha680@gmail.com>
>>> dpkg-buildpackage: host architecture i386
>>>  dpkg-source --before-build trunk
>>>  fakeroot debian/rules clean
>>> test -x debian/rules
>>> dh_testroot
>>> mkdir -p "."
>>> /usr/share/maven-debian-helper/copy-repo.sh /home/misha/maven/trunk/debian
>>> mh_patchpoms -popenmrs --debian-build --keep-pom-version
>>> --maven-repo=/home/misha/maven/trunk/debian/maven-repo
>>> --build-no-docs --ignore-rules=debian/maven.ignoreRules
>>> --clean-ignore-rules=debian/maven.cleanIgnoreRules
>>> Nov 15, 2010 10:26:04 PM org.debian.maven.repo.ListOfPOMs foreachPoms
>>> SEVERE: null
>>> java.lang.NullPointerException
>>>       at org.debian.maven.repo.ListOfPOMs.contains(ListOfPOMs.java:139)
>>>       at org.debian.maven.repo.POMTransformer.keepParentVersion(POMTransformer.java:204)
>>>       at org.debian.maven.repo.POMTransformer$3.handlePOM(POMTransformer.java:218)
>>>       at org.debian.maven.repo.ListOfPOMs.foreachPoms(ListOfPOMs.java:82)
>>>       at org.debian.maven.repo.POMTransformer.transformPoms(POMTransformer.java:214)
>>>       at org.debian.maven.repo.POMTransformer.main(POMTransformer.java:1037)
>>> touch debian/stamp-poms-patched
>>> cd . && /usr/lib/jvm/java-6-openjdk/bin/java -noverify -cp
>>> /usr/share/maven2/boot/classworlds.jar:/usr/lib/jvm/java-6-openjdk/lib/tools.jar
>>>  -Dclassworlds.conf=/etc/maven2/m2-debian.conf
>>> org.codehaus.classworlds.Launcher -s/etc/maven2/settings-debian.xml
>>> -Dmaven.repo.local=/home/misha/maven/trunk/debian/maven-repo  clean
>>> [INFO]
>>> NOTE: Maven is executing in offline mode. Any artifacts not already in
>>> your local
>>> repository will be inaccessible.
>>>
>>> [INFO] Scanning for projects...
>>> [INFO] Reactor build order:
>>> [INFO]   OpenMRS
>>> [INFO]   openmrs-test
>>> [INFO]   openmrs-api
>>> [INFO]   openmrs-web
>>> [INFO]   openmrs-webapp
>>> [INFO] ------------------------------------------------------------------------
>>> [INFO] Building OpenMRS
>>> [INFO]    task-segment: [clean]
>>> [INFO] ------------------------------------------------------------------------
>>> [INFO] ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO] ------------------------------------------------------------------------
>>> [INFO] Error building POM (may not be this project's POM).
>>>
>>>
>>> Project ID: org.openmrs.codehaus.mojo:buildnumber-maven-plugin
>>>
>>> Reason: POM 'org.openmrs.codehaus.mojo:buildnumber-maven-plugin' not
>>> found in repository: System is offline.
>>>
>>>   org.openmrs.codehaus.mojo:buildnumber-maven-plugin:pom:1.0-beta-4-mod
>>>
>>>
>>>  for project org.openmrs.codehaus.mojo:buildnumber-maven-plugin
>>>
>>>
>>> [INFO] ------------------------------------------------------------------------
>>> [INFO] For more information, run Maven with the -e switch
>>> [INFO] ------------------------------------------------------------------------
>>> [INFO] Total time: < 1 second
>>> [INFO] Finished at: Mon Nov 15 22:26:04 CST 2010
>>> [INFO] Final Memory: 2M/7M
>>> [INFO] ------------------------------------------------------------------------
>>> make: [cleanbuilddir] Error 1 (ignored)
>>> rm -f -r /home/misha/maven/trunk/debian/maven-repo debian/stamp-maven-build
>>> /usr/bin/make -f debian/rules unpatch-poms
>>> make[1]: Entering directory `/home/misha/maven/trunk'
>>>
>>> Hope that is helpful and something that, if a problem, can be fixed.
>>>
>>> We are now looking at making the first official Debian version of
>>> OpenMRS the 1.8.0 version (to be released later this year), which is a
>>> Maven based build.
>>>
>>> Please let me know if you have any comments with regards to this
>>> (e.g., what does it mean that libspring-test-java is in experimental;
>>> would this mean our package would also need to be in experimental???
>>> My understanding is this would mean end users, even those of squeeze,
>>> _still_ would not then be able to do apt-get install openmrs, and,
>>> furthermore, I do not believe it would be merged into Ubuntu
>>> automatically ???)
>>>
>>> Thank you
>>> Yours
>>> Misha
>>> ---
>>>
>>> Hello Misha,
>>>
>>> I am the author of Maven builder, so I hope I can help here.
>>>
>>> First, the tools are still under development, they are usable for
>>> simple libraries and Maven plugins, but not quite yet for big
>>> projects.
>>>
>>> You will have more luck by taking the latest versions of
>>> maven-repo-helper and maven-debian-helper at my repository:
>>> https://launchpad.net/~ludovicc/+archive/ppa/
>>>
>>> To build OpenMRS for Debian, we will need to package all dependencies
>>> and plugins in Debian. Some are already there and an apt-get install
>>> away:
>>>
>>> libmaven-javadoc-plugin-java contains
>>> org.apache.maven.plugins:maven-javadoc-plugin:2.6.1,
>>> libantlr-maven-plugin-java contains org.codehaus.mojo:antlr-maven-plugin:2.1
>>> libmaven-antrun-plugin-java contains
>>> org.apache.maven.plugins:maven-antrun-plugin:1.4 libspring-java (in
>>> experimental) contains org.springframework:spring-test:3.0.2.RELEASE
>>>
>>> The other dependencies are not packaged in Debian (as far as I can
>>> tell), but it should be quite easy to do the packaging yourself using
>>> mh_make. You need to file an ITP (Intention to package) bug request
>>> following the guidelines at http://www.debian.org/devel/wnpp/. Or file
>>> a RFP (request for package) at the same place, hoping that somebody
>>> else will do the job (hint: some requests are more than 1000 days old)
>>> but I will try to help you of course. Consider also joining the
>>> pkg-java team, you don't need to be a Debian Developer to participate.
>>> http://pkg-java.alioth.debian.org/
>>>
>>> I will animate a little workshop on Maven & packaging at the Debian
>>> mini Debconf on Oct 30th, I'll try to publish some material after that
>>> and bring the wiki pages up to date.
>>>
>>> Ludovic
>>>
>>>
>>


Reply to: