You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Qureshi,Shahzad [Ontario]" <Sh...@ec.gc.ca> on 2009/12/04 18:49:36 UTC

Warning while generating archetype

Hi all,

I used archetype:create-from-project goal to create an archetype from a project of mine, worked perfectly. 

Installed the archetype and used it to create a project, which all worked fine

However, I get following warnings when I create a project using the above mentioned archetype and I can't find any reference or meaning to these warnings

[WARNING] CP Don't override file C:\projects\test\my-test\src\main\resources\applicationContext.xml
[WARNING] CP Don't override file C:\projects\test\my-test\src\main\resources\assemblies\bin.xml
[WARNING] CP Don't override file C:\projects\test\my-test\src\main\resources\checkstyle.xml
[WARNING] CP Don't override file C:\projects\test\my-test\src\main\resources\conf\application.properties
[WARNING] CP Don't override file C:\projects\test\my-test\src\main\resources\conf\fileName.xml
[WARNING] CP Don't override file C:\projects\test\my-test\src\main\resources\conf\log4j.properties

These are the files that are part of my project and I get them copied to the folders mentioned above. I don't understand what the warning is about though and why is Maven warning me not to override these files?

Any insight will be greatly appreciated

thanks

--------------------------------------------
Shahzad Qureshi
Systems Analyst/Programmer
Applications Directorate | La direction générale des applications
Chief Information Officer Branch | Direction générale du dirigeant principal de l'information
Environment Canada | Environnement Canada
shahzad.qureshi@ec.gc.ca
Telephone | Téléphone 416-739-4702
Government of Canada | Gouvernement du Canada
Website | Site Web www.ec.gc.ca


RE: Warning while generating archetype

Posted by "Qureshi,Shahzad [Ontario]" <Sh...@ec.gc.ca>.
That was it, thank you

For anyone looking for the same issue

I had the following in my archetype-metadata.xml

<fileSet filtered="true" encoding="UTF-8">
   <directory>src/main/resources</directory>
   <includes>
     <include>**/*.xml</include>
     <include>**/*.properties</include>
   </includes>
</fileSet>
<fileSet encoding="UTF-8">
   <directory>src/main/resources</directory>
   <includes>
     <include>**/*</include>
   </includes>
</fileSet> 

So I was copying all the .xml and .properties files but then the next fileset was telling the archetype to copy all files and that's why the copy warning was being generated

So I removed the first fileset and am simply copy all files cause I've a few files in the resources folder that don't have extensions

Thanks again Stevo

--------------------------------------------
Shahzad Qureshi
Systems Analyst/Programmer
Applications Directorate | La direction générale des applications
Chief Information 
Environment Canada
416-739-4702
shahzad.qureshi@ec.gc.ca

-----Original Message-----
From: Stevo Slavić [mailto:sslavic@gmail.com] 
Sent: Friday, December 04, 2009 1:12 PM
To: Maven Users List
Subject: Re: Warning while generating archetype

Probably this<http://maven.apache.org/maven-archetype/archetype-common/xref/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.html>is
archetype plugin code which logs these warning. Check, your archetype's "archetype-metadata.xml" I suspect there is one or more overlapping filesets, configured to copy same files into same location, or maybe same resources/files are listed twice in archetype.xml file.

Regards,
Stevo.

On Fri, Dec 4, 2009 at 6:49 PM, Qureshi,Shahzad [Ontario] < Shahzad.Qureshi@ec.gc.ca> wrote:

> Hi all,
>
> I used archetype:create-from-project goal to create an archetype from 
> a project of mine, worked perfectly.
>
> Installed the archetype and used it to create a project, which all 
> worked fine
>
> However, I get following warnings when I create a project using the 
> above mentioned archetype and I can't find any reference or meaning to 
> these warnings
>
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\applicationContext.xml
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\assemblies\bin.xml
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\checkstyle.xml
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\conf\application.propertie
> s
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\conf\fileName.xml
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\conf\log4j.properties
>
> These are the files that are part of my project and I get them copied 
> to the folders mentioned above. I don't understand what the warning is 
> about though and why is Maven warning me not to override these files?
>
> Any insight will be greatly appreciated
>
> thanks
>
> --------------------------------------------
> Shahzad Qureshi
> Systems Analyst/Programmer
> Applications Directorate | La direction générale des applications 
> Chief Information Officer Branch | Direction générale du dirigeant 
> principal de l'information Environment Canada | Environnement Canada 
> shahzad.qureshi@ec.gc.ca Telephone | Téléphone 416-739-4702 Government 
> of Canada | Gouvernement du Canada Website | Site Web www.ec.gc.ca
>
>

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


Re: Warning while generating archetype

Posted by Stevo Slavić <ss...@gmail.com>.
Probably this<http://maven.apache.org/maven-archetype/archetype-common/xref/org/apache/maven/archetype/generator/DefaultFilesetArchetypeGenerator.html>is
archetype plugin code which logs these warning. Check, your
archetype's
"archetype-metadata.xml" I suspect there is one or more overlapping
filesets, configured to copy same files into same location, or maybe same
resources/files are listed twice in archetype.xml file.

Regards,
Stevo.

On Fri, Dec 4, 2009 at 6:49 PM, Qureshi,Shahzad [Ontario] <
Shahzad.Qureshi@ec.gc.ca> wrote:

> Hi all,
>
> I used archetype:create-from-project goal to create an archetype from a
> project of mine, worked perfectly.
>
> Installed the archetype and used it to create a project, which all worked
> fine
>
> However, I get following warnings when I create a project using the above
> mentioned archetype and I can't find any reference or meaning to these
> warnings
>
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\applicationContext.xml
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\assemblies\bin.xml
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\checkstyle.xml
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\conf\application.properties
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\conf\fileName.xml
> [WARNING] CP Don't override file
> C:\projects\test\my-test\src\main\resources\conf\log4j.properties
>
> These are the files that are part of my project and I get them copied to
> the folders mentioned above. I don't understand what the warning is about
> though and why is Maven warning me not to override these files?
>
> Any insight will be greatly appreciated
>
> thanks
>
> --------------------------------------------
> Shahzad Qureshi
> Systems Analyst/Programmer
> Applications Directorate | La direction générale des applications
> Chief Information Officer Branch | Direction générale du dirigeant
> principal de l'information
> Environment Canada | Environnement Canada
> shahzad.qureshi@ec.gc.ca
> Telephone | Téléphone 416-739-4702
> Government of Canada | Gouvernement du Canada
> Website | Site Web www.ec.gc.ca
>
>