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

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



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: