You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Alex Blewitt <Al...@ioshq.com> on 2003/08/16 11:34:02 UTC

[Build] Where to put resources?

I've got a build issue to solve; there is a properties file in the 
JavaMail implementation in 
specs/javamail/src/java/META-INF/javamail.default.providers

I was expecting to see this file in 
target/classes/META-INF/javamail.default.providers, but it's not there. 
I thought that the compile process copied all non-Java files from the 
src/java/ directory into the classes directory?

If I've misunderstood the build process, then how can these be put in 
there?

They are also missing from the built JAR file as well.

And yes, it must be in META-INF. No, it's not a user-configurable 
configuration file; it's something the developer provides as a 
read-only fallback for when the user doesn't provide anything.

(See http://java.sun.com/j2ee/1.4/docs/api/javax/mail/Session.html if 
you want the ins and outs)

Alex.


Re: [Build] Where to put resources?

Posted by Jason Dillon <ja...@coredevelopers.net>.
> I'd prefer it if there were a 'resources' instead, to explicitly make 
> clear that they are resources, not configuration files.

Fine, I just meant to keep java & other fluff seperated.

--jason


Re: [Build] Where to put resources?

Posted by Alex Blewitt <Al...@ioshq.com>.
On Saturday, Aug 16, 2003, at 10:52 Europe/London, Jason Dillon wrote:

> Agreed, in general try to keep these guys separated.

I'm assuming that you mean 'conf' versus 'java' files.

I'm a bit reluctant to do this, because it isn't a configuration file. 
It's a defaults file for the JavaMail implementation. It's not supposed 
to be user editable.

It basically has the same features as the i18n resources do for Java 
classes -- it's used by the class, but not something that's supposed to 
be user editable. Would you put the i18n classes in a 'conf' directory? 
Not really.

I'd prefer it if there were a 'resources' instead, to explicitly make 
clear that they are resources, not configuration files.

Alex.

>
> On Saturday, August 16, 2003, at 04:37  PM, James Strachan wrote:
>
>> How about putting them in src/conf/META-INF and adding the right 
>> thing to the project.xml


Re: [Build] Where to put resources?

Posted by Jason Dillon <ja...@coredevelopers.net>.
Agreed, in general try to keep these guys separated.

--jason


On Saturday, August 16, 2003, at 04:37  PM, James Strachan wrote:

> How about putting them in src/conf/META-INF and adding the right thing 
> to the project.xml
>
>   <build>
>     <resources>
>       <resource>
>         <directory>${basedir}/src/conf</directory>
>         <includes>
>           <include>*.properties,*.providers</include>
>         </includes>
>       </resource>
>     </resources>
>   </build>
>
>
> On Saturday, August 16, 2003, at 10:34  am, Alex Blewitt wrote:
>
>> I've got a build issue to solve; there is a properties file in the 
>> JavaMail implementation in 
>> specs/javamail/src/java/META-INF/javamail.default.providers
>>
>> I was expecting to see this file in 
>> target/classes/META-INF/javamail.default.providers, but it's not 
>> there. I thought that the compile process copied all non-Java files 
>> from the src/java/ directory into the classes directory?
>>
>> If I've misunderstood the build process, then how can these be put in 
>> there?
>>
>> They are also missing from the built JAR file as well.
>>
>> And yes, it must be in META-INF. No, it's not a user-configurable 
>> configuration file; it's something the developer provides as a 
>> read-only fallback for when the user doesn't provide anything.
>>
>> (See http://java.sun.com/j2ee/1.4/docs/api/javax/mail/Session.html if 
>> you want the ins and outs)
>>
>> Alex.
>>
>>
>
> James
> -------
> http://radio.weblogs.com/0112098/
>


Re: [Build] Where to put resources?

Posted by James Strachan <ja...@yahoo.co.uk>.
How about putting them in src/conf/META-INF and adding the right thing 
to the project.xml

   <build>
     <resources>
       <resource>
         <directory>${basedir}/src/conf</directory>
         <includes>
           <include>*.properties,*.providers</include>
         </includes>
       </resource>
     </resources>
   </build>


On Saturday, August 16, 2003, at 10:34  am, Alex Blewitt wrote:

> I've got a build issue to solve; there is a properties file in the 
> JavaMail implementation in 
> specs/javamail/src/java/META-INF/javamail.default.providers
>
> I was expecting to see this file in 
> target/classes/META-INF/javamail.default.providers, but it's not 
> there. I thought that the compile process copied all non-Java files 
> from the src/java/ directory into the classes directory?
>
> If I've misunderstood the build process, then how can these be put in 
> there?
>
> They are also missing from the built JAR file as well.
>
> And yes, it must be in META-INF. No, it's not a user-configurable 
> configuration file; it's something the developer provides as a 
> read-only fallback for when the user doesn't provide anything.
>
> (See http://java.sun.com/j2ee/1.4/docs/api/javax/mail/Session.html if 
> you want the ins and outs)
>
> Alex.
>
>

James
-------
http://radio.weblogs.com/0112098/