You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thorsten Heit <Th...@xtramind.com> on 2006/02/21 12:42:28 UTC

[m2] How to exclude resources from being copied?

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'd like to use the same directory for Java and resource files
(src/main/java) instead of the default directory layout that Maven
suggests. So far this works with a minor drawback:

When executing "mvn resources:resources", Maven also copies all Java
source files into the target directory. I'm using the following entry in
my POM:

<resources>
  <resource>
    <directory>src/main/java</directory>
    <filtering>false</filtering>
    <excludes>
      <exclude>*.java</exclude>
    </excludes>
  </resource>
</resources>


I already did a search on the list, but couldn't figure out how to tell
Maven to exclude the sources... Is this possible? If yes, can someone
please explain how to achieve this?


Regards

Thorsten Heit

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1

iQA/AwUBQ/r8pELzm5IAnA3tEQLSXQCfeR0M3HBa6yS8+u1Qr5/sauZDuY8AoKAw
inrZ02PjE5Psh3pFemQAzv1e
=lv5r
-----END PGP SIGNATURE-----

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


Re: [m2] How to exclude resources from being copied?

Posted by Wouter de Vaal <wo...@gmail.com>.
Have you tried

					<excludes>
						<exclude>**/*.java</exclude>
					</excludes>

so it will also check the subdirs.

Wouter

On 2/21/06, Thorsten Heit <Th...@xtramind.com> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I'd like to use the same directory for Java and resource files
> (src/main/java) instead of the default directory layout that Maven
> suggests. So far this works with a minor drawback:
>
> When executing "mvn resources:resources", Maven also copies all Java
> source files into the target directory. I'm using the following entry in
> my POM:
>
> <resources>
>   <resource>
>     <directory>src/main/java</directory>
>     <filtering>false</filtering>
>     <excludes>
>       <exclude>*.java</exclude>
>     </excludes>
>   </resource>
> </resources>
>
>
> I already did a search on the list, but couldn't figure out how to tell
> Maven to exclude the sources... Is this possible? If yes, can someone
> please explain how to achieve this?
>
>
> Regards
>
> Thorsten Heit
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 8.1
>
> iQA/AwUBQ/r8pELzm5IAnA3tEQLSXQCfeR0M3HBa6yS8+u1Qr5/sauZDuY8AoKAw
> inrZ02PjE5Psh3pFemQAzv1e
> =lv5r
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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