Questions about POM <resources>

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions about POM <resources>

R. Diez
Hi all:

I am new to Maven, and I am reading now the documentation about resources:

https://maven.apache.org/pom.html#Resources

I have a few questions that are not covered there:

1) Do I need to specify <filtering> ? If not, what is its default value?

2) I just need to include a single resource file in the JAR. I guess I must nevertheless specify <directory>, <includes> and an <include> element for
that single file. Or is there a better way?

3) What happens if I do not specify <excludes>? Will all other files in that <directory> be included in the JAR too?

Thanks in advance,
   rdiez

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Questions about POM <resources>

fou Plante
I dont know

Le mer. 30 sept. 2020 1:57 a.m., R. Diez <[hidden email]>
a écrit :

> Hi all:
>
> I am new to Maven, and I am reading now the documentation about resources:
>
> https://maven.apache.org/pom.html#Resources
>
> I have a few questions that are not covered there:
>
> 1) Do I need to specify <filtering> ? If not, what is its default value?
>
> 2) I just need to include a single resource file in the JAR. I guess I
> must nevertheless specify <directory>, <includes> and an <include> element
> for
> that single file. Or is there a better way?
>
> 3) What happens if I do not specify <excludes>? Will all other files in
> that <directory> be included in the JAR too?
>
> Thanks in advance,
>    rdiez
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Questions about POM <resources>

Karl Heinz Marbaise-3
In reply to this post by R. Diez
Hi,

On 29.09.20 13:06, R. Diez wrote:
> Hi all:
>
> I am new to Maven, and I am reading now the documentation about resources:
>
> https://maven.apache.org/pom.html#Resources
>
> I have a few questions that are not covered there:
>
> 1) Do I need to specify <filtering> ? If not, what is its default value?

The default is simply to copy the files...

>
> 2) I just need to include a single resource file in the JAR. I guess I
> must nevertheless specify <directory>, <includes> and an <include>
> element for that single file. Or is there a better way?

No need to specify things like include/excludes etc. just put the file
into src/main/resources directory ... If the resource is only needed for
tests put it into src/test/resources...


>
> 3) What happens if I do not specify <excludes>? Will all other files in
> that <directory> be included in the JAR too?

Yes...

Kind regards
Karl Heinz Marbaise
>
> Thanks in advance,
>    rdiez
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]