The resources don't have to be next to the *source* files. But they MUST be next to the *class* files.
Sean
On Sep 10, 2012, at 10:47 AM, Richard O. Legendi wrote:
> There are also some workarounds though, if it is preferred to keep the resources next to source file (like adding resources in the source directory under <build>/<resources>, but excluding Java files for instance).
>
> Best regards,
> Richard
> --
> Richard O. Legendi
> Software developer
> Intelligent Applications and Web Services
> AITIA International, Inc.
>
> http://people.inf.elte.hu/legendi/
> On 2012.09.10. 16:12, Chris Hollander wrote:
>> Sean, I didn't have to modify any of the java code to get Maven to work. But I did put all the image and html files and everything else in to a /src/main/resources directory or something. (I don't have the code on hand and won't till next week). Strictly speaking, I probably didn't have to move all the images, but I didn't really look to see if I could keep them as is. I'm not a fan of mixing resource files with source files anyway.
>>
>>
>> On Monday, September 10, 2012, Sean Luke wrote:
>> On Sat, Sep 8, 2012 at 10:38 PM, John Nelson <[log in to unmask]> wrote:
>>
>> > As per the manual, I know "MASON does not use Ant: I’m an old Unix
>> > hacker."
>> > My guess is, the main reason is also related to priorities, given the
>> > response Sean gave me regarding git. I also noticed that someone once
>> > asked
>> > the same question without a reply and even ported and pushed MASON 14 to
>> > a
>> > maven repository.
>>
>> I sometimes reply privately. This was one such example.
>>
>> > If you are interested (mostly Sean), I took the liberty of sketching the
>> > port: https://s3.amazonaws.com/mason-tmp/MASONOnMaven.zip. You can play
>> > with
>> > it by downloading, unzipping, cding and running:
>>
>> I thought someone had already done this a while go, no? I forget.
>>
>> I'm totally cool with people making a Maven repository, or maintaining an Ant script: and in fact we can put some stuff out o the contrib directory of that would be useful. But I cannot maintain or build it myself -- just too much other stuff to do. Someone else has to maintain the Maven port.
>>
>> > Maven's resource inclusion convention differs from the one used by
>> > MASON, so
>> > I had to modify a lot of functions that called X.class.getResource().
>>
>> Whoa.
>>
>> Maven doesn't allow getResource? That's exceptionally bad style. getResource() is an important part of how MASON is able to be portable and serializable on remote machines, notably supercomputers etc. It is far preferred over other options (like files). Please tell me the Maven development team isn't that stupid.
>>
>> If you have to modify MASON's getResource calls to use Maven, that's a showstopper.
>>
>> Sean
>
|