You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Leangen <ma...@leangen.net> on 2006/05/29 08:33:07 UTC
Including resources from java folder in M2
Hello!
I'm new to M2, but I'm familiar with this type of build system.
I have some xml config files that normally should be distributed side by
side with a class file. So, the files are located in the java folder:
src
main
com/mystuff
SomeClass.java
SomeClass.xconfig
However, it seems that only the *.java files are copied over to the
classes directory.
How can I include other types files that are in the java directory,
since I do not want to have to recreate the build path in the resources
directory?
Thank you!
David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Including resources from java folder in M2
Posted by David Leangen <ma...@leangen.net>.
Great!
Thank you very much.
On Mon, 2006-05-29 at 15:15 +0800, Willie Vu wrote:
> If you so desire, you can just specify ${basedir}/src/main/java in the
> resources/resource/directory tag.
>
> On 5/29/06, David Leangen <ma...@leangen.net> wrote:
> >
> > Thank you!
> >
> > So, are you saying that I have no choice but to put non-java files
> > in /src/main/resources?
> >
> > I understand that this is the standard layout, but in my case, this will
> > cause a lot of headaches when refactoring, which is why I was hoping to
> > be able to include them in the java dir...
> >
> >
> > Thank you!
> > David
> >
> >
> >
> >
> > On Mon, 2006-05-29 at 14:42 +0800, Willie Vu wrote:
> > > David,
> > >
> > > According to the standard directory layout, resources should be put
> > > under <basedir>/src/main/resources.
> > >
> > > Anyway, what you need to do is to add resources/resource into pom.xml. e.g.
> > >
> > > <resources>
> > > <resource>
> > > <directory>${basedir}/src/main/resources</directory>
> > > <includes>
> > > <include>**/*.xconfig</include>
> > > </includes>
> > > <resource>
> > > </resources>
> > >
> > > Regards,
> > >
> > > Willie
> > >
> > > On 5/29/06, David Leangen <ma...@leangen.net> wrote:
> > > >
> > > > Hello!
> > > >
> > > > I'm new to M2, but I'm familiar with this type of build system.
> > > >
> > > > I have some xml config files that normally should be distributed side by
> > > > side with a class file. So, the files are located in the java folder:
> > > >
> > > > src
> > > > main
> > > > com/mystuff
> > > > SomeClass.java
> > > > SomeClass.xconfig
> > > >
> > > >
> > > > However, it seems that only the *.java files are copied over to the
> > > > classes directory.
> > > >
> > > > How can I include other types files that are in the java directory,
> > > > since I do not want to have to recreate the build path in the resources
> > > > directory?
> > > >
> > > >
> > > > Thank you!
> > > > David
> > > >
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Including resources from java folder in M2
Posted by Willie Vu <wi...@dev.java.net>.
If you so desire, you can just specify ${basedir}/src/main/java in the
resources/resource/directory tag.
On 5/29/06, David Leangen <ma...@leangen.net> wrote:
>
> Thank you!
>
> So, are you saying that I have no choice but to put non-java files
> in /src/main/resources?
>
> I understand that this is the standard layout, but in my case, this will
> cause a lot of headaches when refactoring, which is why I was hoping to
> be able to include them in the java dir...
>
>
> Thank you!
> David
>
>
>
>
> On Mon, 2006-05-29 at 14:42 +0800, Willie Vu wrote:
> > David,
> >
> > According to the standard directory layout, resources should be put
> > under <basedir>/src/main/resources.
> >
> > Anyway, what you need to do is to add resources/resource into pom.xml. e.g.
> >
> > <resources>
> > <resource>
> > <directory>${basedir}/src/main/resources</directory>
> > <includes>
> > <include>**/*.xconfig</include>
> > </includes>
> > <resource>
> > </resources>
> >
> > Regards,
> >
> > Willie
> >
> > On 5/29/06, David Leangen <ma...@leangen.net> wrote:
> > >
> > > Hello!
> > >
> > > I'm new to M2, but I'm familiar with this type of build system.
> > >
> > > I have some xml config files that normally should be distributed side by
> > > side with a class file. So, the files are located in the java folder:
> > >
> > > src
> > > main
> > > com/mystuff
> > > SomeClass.java
> > > SomeClass.xconfig
> > >
> > >
> > > However, it seems that only the *.java files are copied over to the
> > > classes directory.
> > >
> > > How can I include other types files that are in the java directory,
> > > since I do not want to have to recreate the build path in the resources
> > > directory?
> > >
> > >
> > > Thank you!
> > > David
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Including resources from java folder in M2
Posted by David Leangen <ma...@leangen.net>.
Thank you!
So, are you saying that I have no choice but to put non-java files
in /src/main/resources?
I understand that this is the standard layout, but in my case, this will
cause a lot of headaches when refactoring, which is why I was hoping to
be able to include them in the java dir...
Thank you!
David
On Mon, 2006-05-29 at 14:42 +0800, Willie Vu wrote:
> David,
>
> According to the standard directory layout, resources should be put
> under <basedir>/src/main/resources.
>
> Anyway, what you need to do is to add resources/resource into pom.xml. e.g.
>
> <resources>
> <resource>
> <directory>${basedir}/src/main/resources</directory>
> <includes>
> <include>**/*.xconfig</include>
> </includes>
> <resource>
> </resources>
>
> Regards,
>
> Willie
>
> On 5/29/06, David Leangen <ma...@leangen.net> wrote:
> >
> > Hello!
> >
> > I'm new to M2, but I'm familiar with this type of build system.
> >
> > I have some xml config files that normally should be distributed side by
> > side with a class file. So, the files are located in the java folder:
> >
> > src
> > main
> > com/mystuff
> > SomeClass.java
> > SomeClass.xconfig
> >
> >
> > However, it seems that only the *.java files are copied over to the
> > classes directory.
> >
> > How can I include other types files that are in the java directory,
> > since I do not want to have to recreate the build path in the resources
> > directory?
> >
> >
> > Thank you!
> > David
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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: Including resources from java folder in M2
Posted by Willie Vu <wi...@dev.java.net>.
David,
According to the standard directory layout, resources should be put
under <basedir>/src/main/resources.
Anyway, what you need to do is to add resources/resource into pom.xml. e.g.
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/*.xconfig</include>
</includes>
<resource>
</resources>
Regards,
Willie
On 5/29/06, David Leangen <ma...@leangen.net> wrote:
>
> Hello!
>
> I'm new to M2, but I'm familiar with this type of build system.
>
> I have some xml config files that normally should be distributed side by
> side with a class file. So, the files are located in the java folder:
>
> src
> main
> com/mystuff
> SomeClass.java
> SomeClass.xconfig
>
>
> However, it seems that only the *.java files are copied over to the
> classes directory.
>
> How can I include other types files that are in the java directory,
> since I do not want to have to recreate the build path in the resources
> directory?
>
>
> Thank you!
> David
>
>
>
>
> ---------------------------------------------------------------------
> 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