Excerpts from Orion Poplawski's message of Thu May 12 16:08:26 +0200 2011:
On 05/12/2011 02:14 AM, Stanislav Ochotnicky wrote:
> Excerpts from Ankur Sinha's message of Thu May 12 07:10:50 +0200 2011:
>> On Wed, 2011-05-11 at 15:08 -0600, Orion Poplawski wrote:
>>> On 05/11/2011 01:59 PM, Ankur Sinha wrote:
>>>> Hi folks!
>>>>
>>>> I'm trying to build an RPM package for dcm4che2[1] for the
>>>> fedora-medical SIG[2]. I've downloaded the latest svn, and followed
>>> the
>>>> packaging spec from the Packaging:Java[3] page. I'm running into
>>> some
>>>> errors that I don't know how to get around. This is my first java
>>>> package. Could someone glance through this and put me on the right
>>> track
>>>> please? The spec[4] (bare minimum) and the build.log[5] are
>>> provided.
>>>> The srpm is here[6].
>>>
>>> Looks like you need the test images, from here perhaps:
>>>
>>>
http://www.dcm4che.org/maven2/org/dcm4che/test/dcm4che-test-image/2.6/
>>>
>>
>> Aha! But I can't use the jar straight away, can I? I need to package the
>> test-images up and then proceed with dcm4che2, right?
>
> Yes, that's normally the case. In the (perhaps likely?) scenario where
> sources for test-image are not that easy to find it's possible to
> -Dmaven.test.skip=true which will not run tests. You might want to
> first build whole package without tests and then work on making tests
> work.
dcm4che-test-image-2.6.jar just contains a bunch of test image data. I
see no reason that it couldn't be included as part of the dcm4che2
package. I don't know how to point maven to it tough.
org/dcm4chee/imagetest directory contains 2 Java class files. It's
hard to tell it they are actually being run, but I guess they are. One
way to fix all of this (and probably best in long term) is to ask
upstream to do a source release of test data/package.
As for pointing maven to arbitrary directory..not easy. Only way to do
it with our maven right now is to create proper directory structure within
.m2/ directory. That is:
.m2/groupid1/groupid2/../artifactid/artifactid-version.{pom,jar}
--
Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Software Engineer - Base Operating Systems Brno
PGP: 7B087241
Red Hat Inc.
http://cz.redhat.com