You are correct we aren't talking about the same thing.  I wasn't aware that
you have the resources in a package directory.  Sorry if I confused the
issue.  I thought it was more like the log4j.properties that needs to be in
the classpath.  I've never used the classpath for loading resources in this
fashion either.

=================================================================
Jeffrey D. Brekke                                   Quad/Graphics
[EMAIL PROTECTED]                              http://www.qg.com


> -----Original Message-----
> From: Vincent Massol [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 31, 2002 8:29 AM
> To: 'Turbine Maven Developers List'
> Subject: RE: [PROPOSAL] Including resources in compile paths (main jar
> and tests)
> 
> 
> Jeff,
> 
> We may not be talking about the same thing I think. I'm talking about
> resource files that go in the same directory tree as the 
> classes and are
> loaded using this.getClass().getResource("/org/apache/....myresource")
> 
> Why would I put these classes under a src/test/conf, which 
> means that :
> 
> 1/ I would to recreate a o/a/... structure un src/test/conf whereas it
> already exists under src/test
> 
> 2/ It is not balanced src/test would a root for java source files and
> conf is not a package name.
> 
> For the file you mention I usually put them under :
> 
> <project root>/conf/ (for production ones)
> <project root>/conf/test (for test ones)
> 
> The configuration files in the src tree are configuration files that
> cannot be modified by end users of the application/framework, whereas
> the one in conf/ need to be modified (possibly) by the end user.
> 
> -Vincent
> 
> > -----Original Message-----
> > From: Brekke, Jeff [mailto:[EMAIL PROTECTED]]
> > Sent: 31 May 2002 12:51
> > To: 'Turbine Maven Developers List'
> > Subject: RE: [PROPOSAL] Including resources in compile 
> paths (main jar
> and
> > tests)
> > 
> > I was thinking more of a directory under src/test, something like
> > src/test/conf.
> > If you copy config files for testing, where would you copy 
> them from?
> > I've always used two config files, one for production and the other
> for
> > testing.
> > 
> > =================================================================
> > Jeffrey D. Brekke                                   Quad/Graphics
> > [EMAIL PROTECTED]                              http://www.qg.com
> > 
> > 
> > > -----Original Message-----
> > > From: Vincent Massol [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, May 31, 2002 3:34 AM
> > > To: 'Turbine Maven Developers List'
> > > Subject: RE: [PROPOSAL] Including resources in compile paths (main
> jar
> > > and tests)
> > >
> > >
> > > Hi Jeff,
> > >
> > > > -----Original Message-----
> > > > From: Brekke, Jeff [mailto:[EMAIL PROTECTED]]
> > > > Sent: 31 May 2002 02:29
> > > > To: 'Turbine Maven Developers List'
> > > > Subject: RE: [PROPOSAL] Including resources in compile
> > > paths (main jar
> > > and
> > > > tests)
> > > >
> > > > For the unit tests I thought about just providing a
> > > directory that we
> > > > could include in the testing classpath.  Would this be
> > > enough?  If we
> > > have
> > > > a
> > > > different directory for the testing properties, would 
> we need the
> > > > <resourceTestPatters/> stuff?
> > > >
> > >
> > > That would do it but you would usually mean having your src/test
> > > directory in the classpath, which I don't think is a nice practice
> at
> > > all. I'd much much rather have a way to copy test resources
> > > to the test
> > > classes/ directory.
> > >
> > > -Vincent
> > >
> > > > http://www.mail-archive.com/turbine-maven-
> > > > [EMAIL PROTECTED]/msg00584.ht
> > > > ml
> > > >
> > > > 
> =================================================================
> > > > Jeffrey D. Brekke                                   
> Quad/Graphics
> > > > [EMAIL PROTECTED]                              
> http://www.qg.com
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Jason van Zyl [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Thursday, May 30, 2002 5:30 PM
> > > > > To: Turbine Maven Developers List
> > > > > Subject: Re: [PROPOSAL] Including resources in compile paths
> (main
> > > jar
> > > > > and tests)
> > > > >
> > > > >
> > > > > On Thu, 2002-05-30 at 17:06, Vincent Massol wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I have a problem with one problem I am mavenizing. It needs
> some
> > > > > > resources (properties and xml files) put in its generated
> > > > > jar. Also, the
> > > > > > junit test cases expect some resources files (xml,
> > > > > properties, etc) to
> > > > > > be in the test class directories.
> > > > > >
> > > > > > I have had a look at jarResources but it seems to be for a
> > > > > different use
> > > > > > (it simply copies resource file to the jar and not to the
> > > generated
> > > > > > class directory).
> > > > > >
> > > > > > I think this is a very common case ... Actually, so common,
> > > > > that I may
> > > > > > be missing something. Am I ?
> > > > > >
> > > > > > I would like to propose either :
> > > > > >
> > > > > > 1/ the addition to some (optional) elements in the 
> POM, as in
> :
> > > > > >
> > > > > >     <resourcePatterns>
> > > > > >       <resourcePattern>include =
> > > **/*.properties</resourcePattern>
> > > > > >
> > > > > >       <resourcePattern>include = **/*.xml</resourcePattern>
> > > > > >     </resourcePatterns>
> > > > > >
> > > > > >     <resourceTestPatterns>
> > > > > >       <resourceTestPattern>include =
> > > > > > **/*.properties</resourceTestPattern>
> > > > > >       <resourceTestPattern>include =
> > > **/*.xml</resourceTestPattern>
> > > > > >     </resourceTestPatterns>
> > > > > >
> > > > > > (in the same spirit as <unitTestPatterns>)
> > > > >
> > > > > +1
> > > > >
> > > > > The crappy jarResources handling is my bad. The 
> resources should
> > > have
> > > > > been copied into the classes/ directory, or at the 
> option should
> > > have
> > > > > been provided to if so desired. This will be nice.
> > > > >
> > > > > > or
> > > > > >
> > > > > > 2/ the addition of some Ant properties, as in :
> > > > > >
> > > > > > maven.compile.resourcePatterns = **/*.properties,**/*.xml
> > > > > > maven.compile.resourceTestPatterns = 
> **/*.properties,**/*.xml
> > > > > >
> > > > > > My preference goes to 1/. Please tell me what you prefer
> > > > > and I'll submit
> > > > > > a patch.
> > > > > >
> > > > > > Thanks
> > > > > > -Vincent
> > > > > >
> > > > > >
> > > > > > --
> > > > > > To unsubscribe, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > > For additional commands, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > --
> > > > > jvz.
> > > > >
> > > > > Jason van Zyl
> > > > > [EMAIL PROTECTED]
> > > > >
> > > > > http://tambora.zenplex.org
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > For additional commands, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:   <mailto:turbine-maven-dev-
> > > > [EMAIL PROTECTED]>
> > > > For additional commands, e-mail: <mailto:turbine-maven-dev-
> > > > [EMAIL PROTECTED]>
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:turbine-maven-dev-
> > [EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:turbine-maven-dev-
> > [EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to