You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Carsten Ziegeler <cz...@apache.org> on 2005/08/20 19:22:55 UTC
[M2] How to include resources in a jar?
How can I include resources in the resulting jar file?
I defined a resource section for the resources and they are copied into
the target/classes directory. But they are missing in the resulting jar.
(I also tried latest m2 from svn).
Thanks
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] How to include resources in a jar?
Posted by Carsten Ziegeler <cz...@apache.org>.
Brett Porter wrote:
> I tested this out and it works fine with the latest code from SVN.
> Maybe a bug in 2.0-alpha-3 - haven't tried to reproduce it there.
>
I just retested with the latest from SVN and you're right now it works,
so it must be a bug in alpha-3 which has been fixed recently - I tried
SVN from last week and that didn't work as well. Anyways, what counts is
that it works now.
Great and thanks!
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] How to include resources in a jar?
Posted by Brett Porter <br...@gmail.com>.
I tested this out and it works fine with the latest code from SVN.
Maybe a bug in 2.0-alpha-3 - haven't tried to reproduce it there.
- Brett
On 8/22/05, Brett Porter <br...@gmail.com> wrote:
> Ok, that's something I can test out tomorrow.
>
> I'm not sure you need to create a subdirectory for this - the pom.xml
> will happily sit alongside your other build files.
>
> Cheers,
> Brett
>
> On 8/21/05, Carsten Ziegeler <cz...@apache.org> wrote:
> > Brett Porter schrieb:
> > > That's odd. We use this all the time, so they should be included.
> > >
> > > What are their paths? Maybe they are in the default excludes? (Though
> > > I would think this would exclude them from the classes directory and
> > > the jar)
> > >
> > This is the pom - actually it's the pom for Cocoon where we try out m2,
> > so this is the reason for the unconventional "../src/java" path as we
> > want to keep the old build system working until the m2 builds run
> > without problems.
> >
> > <build>
> > <sourceDirectory>../src/java</sourceDirectory>
> > <testSourceDirectory>../src/test</testSourceDirectory>
> > <resources>
> > <resource>
> > <directory>../src/java</directory>
> > <includes>
> > <include>**/*.roles</include>
> > <include>**/*.properties</include>
> > <include>**/*.xml</include>
> > </includes>
> > </resource>
> > </resources>
> >
> > Now, I thought that the jar plugin just archives the target/classes
> > directory.
> >
> > Carsten
> > --
> > Carsten Ziegeler - Open Source Group, S&N AG
> > http://www.s-und-n.de
> > http://www.osoco.org/weblogs/rael/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] How to include resources in a jar?
Posted by Brett Porter <br...@gmail.com>.
Ok, that's something I can test out tomorrow.
I'm not sure you need to create a subdirectory for this - the pom.xml
will happily sit alongside your other build files.
Cheers,
Brett
On 8/21/05, Carsten Ziegeler <cz...@apache.org> wrote:
> Brett Porter schrieb:
> > That's odd. We use this all the time, so they should be included.
> >
> > What are their paths? Maybe they are in the default excludes? (Though
> > I would think this would exclude them from the classes directory and
> > the jar)
> >
> This is the pom - actually it's the pom for Cocoon where we try out m2,
> so this is the reason for the unconventional "../src/java" path as we
> want to keep the old build system working until the m2 builds run
> without problems.
>
> <build>
> <sourceDirectory>../src/java</sourceDirectory>
> <testSourceDirectory>../src/test</testSourceDirectory>
> <resources>
> <resource>
> <directory>../src/java</directory>
> <includes>
> <include>**/*.roles</include>
> <include>**/*.properties</include>
> <include>**/*.xml</include>
> </includes>
> </resource>
> </resources>
>
> Now, I thought that the jar plugin just archives the target/classes
> directory.
>
> Carsten
> --
> Carsten Ziegeler - Open Source Group, S&N AG
> http://www.s-und-n.de
> http://www.osoco.org/weblogs/rael/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] How to include resources in a jar?
Posted by Carsten Ziegeler <cz...@apache.org>.
Brett Porter schrieb:
> That's odd. We use this all the time, so they should be included.
>
> What are their paths? Maybe they are in the default excludes? (Though
> I would think this would exclude them from the classes directory and
> the jar)
>
This is the pom - actually it's the pom for Cocoon where we try out m2,
so this is the reason for the unconventional "../src/java" path as we
want to keep the old build system working until the m2 builds run
without problems.
<build>
<sourceDirectory>../src/java</sourceDirectory>
<testSourceDirectory>../src/test</testSourceDirectory>
<resources>
<resource>
<directory>../src/java</directory>
<includes>
<include>**/*.roles</include>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
Now, I thought that the jar plugin just archives the target/classes
directory.
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [M2] How to include resources in a jar?
Posted by Brett Porter <br...@gmail.com>.
That's odd. We use this all the time, so they should be included.
What are their paths? Maybe they are in the default excludes? (Though
I would think this would exclude them from the classes directory and
the jar)
- Brett
On 8/21/05, Carsten Ziegeler <cz...@apache.org> wrote:
> How can I include resources in the resulting jar file?
> I defined a resource section for the resources and they are copied into
> the target/classes directory. But they are missing in the resulting jar.
> (I also tried latest m2 from svn).
>
> Thanks
> Carsten
> --
> Carsten Ziegeler - Open Source Group, S&N AG
> http://www.s-und-n.de
> http://www.osoco.org/weblogs/rael/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org