You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by dddzzz <dz...@gmail.com> on 2008/01/14 22:24:00 UTC

Resources from classpath in JAR

How can I make maven2 to include files (like .xml and .property) in JAR
without adding resource include in POM.
-- 
View this message in context: http://www.nabble.com/Resources-from-classpath-in-JAR-tp14814993s177p14814993.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Resources from classpath in JAR

Posted by Heinrich Nirschl <he...@gmail.com>.
On Jan 15, 2008 7:31 PM, dddzzz <dz...@gmail.com> wrote:
>
>
>
> Heinrich Nirschl wrote:
> >
> >
> > Put them into src/main/resources.
> >
> >
>
> I want them to be in same folder that classes are.

Which folder do you mean, the one with the .class files or with the
.java files? The final jar will have the .class files and the
resources side by side.

Maven uses certain conventions about structuring the source of a
project. If you follow them, there is little to configure. If you
decide not to follow the conventions, more configuration in the POM is
necessary.
It is usually a good idea to use the conventions because it is much
easier for the developers to join a new project.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Resources from classpath in JAR

Posted by dddzzz <dz...@gmail.com>.


Heinrich Nirschl wrote:
> 
> 
> Put them into src/main/resources.
> 
> 

I want them to be in same folder that classes are.
-- 
View this message in context: http://www.nabble.com/Resources-from-classpath-in-JAR-tp14814993s177p14844214.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Resources from classpath in JAR

Posted by Heinrich Nirschl <he...@gmail.com>.
On Jan 14, 2008 10:24 PM, dddzzz <dz...@gmail.com> wrote:
>
> How can I make maven2 to include files (like .xml and .property) in JAR
> without adding resource include in POM.

Put them into src/main/resources.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org