You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Erik Husby <mh...@genome.wi.mit.edu> on 2003/07/16 15:20:18 UTC
Resources not going into proper directory in jar file.
I am a new user of Maven and most likely are simply missing something.
I have this existing project structure
src/package/images/group1/*.gif
src/package/images/group2/*.gif
src/package/*.java
I want the contents of src/package/images to end up in the jar file
under "package/images/group1" and "package/images/group2"
I have the resource defined as
<resource>
<directory>src/package/images</directory>
<includes>
<include>**/*.gif</include>
</includes>
<targetpath>package/images</targetpath>
</resource>
But all the images end up in the jar file at the root directory level.
No "package/images/group1" or "package/images/group2" gets created.
What is the proper way to get the gif files into the proper directories?
Thanks in advance.
--
Erik Husby
Team Lead for Software Quality Automation
Whitehead Institute/MIT Center for Genome Research
Rm. 2192
320 Charles St
Cambridge, MA 02141-2023
mobile: 781.354.6669
office: 617.258.9227
mhusby@genome.wi.mit.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Resources not going into proper directory in jar file.
Posted by Jason van Zyl <ja...@zenplex.com>.
On Wed, 2003-07-16 at 09:31, Ben Walding wrote:
> You want:
>
> <resource>
> <directory>src</directory>
> <includes>
> <include>package/images/**/*.gif</include>
> </includes>
> </resource>
>
>
> No idea of whether that target path thing works or not, but it isn't
> required.
target path works as it's used by Maven itself to package up the
localized mesages.
> Erik Husby wrote:
>
> > I am a new user of Maven and most likely are simply missing something.
> >
> > I have this existing project structure
> > src/package/images/group1/*.gif
> > src/package/images/group2/*.gif
> > src/package/*.java
> >
> > I want the contents of src/package/images to end up in the jar file
> > under "package/images/group1" and "package/images/group2"
> >
> > I have the resource defined as
> > <resource>
> > <directory>src/package/images</directory>
> > <includes>
> > <include>**/*.gif</include>
> > </includes>
> > <targetpath>package/images</targetpath>
> > </resource>
> >
> > But all the images end up in the jar file at the root directory level.
> > No "package/images/group1" or "package/images/group2" gets created.
> >
> > What is the proper way to get the gif files into the proper directories?
> >
> > Thanks in advance.
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
--
jvz.
Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Resources not going into proper directory in jar file.
Posted by Ben Walding <be...@walding.com>.
You want:
<resource>
<directory>src</directory>
<includes>
<include>package/images/**/*.gif</include>
</includes>
</resource>
No idea of whether that target path thing works or not, but it isn't
required.
Erik Husby wrote:
> I am a new user of Maven and most likely are simply missing something.
>
> I have this existing project structure
> src/package/images/group1/*.gif
> src/package/images/group2/*.gif
> src/package/*.java
>
> I want the contents of src/package/images to end up in the jar file
> under "package/images/group1" and "package/images/group2"
>
> I have the resource defined as
> <resource>
> <directory>src/package/images</directory>
> <includes>
> <include>**/*.gif</include>
> </includes>
> <targetpath>package/images</targetpath>
> </resource>
>
> But all the images end up in the jar file at the root directory level.
> No "package/images/group1" or "package/images/group2" gets created.
>
> What is the proper way to get the gif files into the proper directories?
>
> Thanks in advance.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org