You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "WolfgangHG (via GitHub)" <gi...@apache.org> on 2025/10/13 19:07:19 UTC
Re: [I] [ARCHETYPE-649] "[WARNING] CP Don't override file" when generating archetype with 3.2.1 [maven-archetype]
WolfgangHG commented on issue #897:
URL: https://github.com/apache/maven-archetype/issues/897#issuecomment-3398722794
I think I found a workaround to avoid the warnings:
In "archetype-metadata.xml" I had defined fileSets for e.g. "src/test/java" or "src/main/webapp", and those directories also contained java files files or deployment descriptors:
```xml
<module id="web" dir="web" name="web">
<fileSets>
...
<fileSet encoding="UTF-8" packaged="true" filtered="true">
<directory>src/test/java</directory>
</fileSet>
<fileSet encoding="UTF-8">
<directory>src/main/webapp</directory>
</fileSet>
...
</fileSets>
</module>
```
This caused the warnings.
My workaround: I added a "includes" filter for all those directories:
```xml
<module id="web" dir="web" name="web">
<fileSets>
..
<fileSet encoding="UTF-8" packaged="true" filtered="true">
<directory>src/test/java</directory>
<includes>
<include>**/*.java</include>
</includes>
</fileSet>
<fileSet encoding="UTF-8">
<directory>src/main/webapp</directory>
<includes>
<include>**/*.xml</include>
</includes>
</fileSet>
...
</fileSets>
</module>
```
Now the warning is gone.
Hope that my workaround is reasonable ;-)
I would like to keep this issue open though my problem seems to be resolved, because I still think there is some validation bug in the archetype plugin.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org