Hi Doug, Please raise a jira for the xNl instead of xMl.
One can configure the create-from-project mojo to have the file unfiltered by default using: -DarchetypeFilteredExtentions=unknownExtension which sets the file extension for files that will be filtered. by default there is java, js, xml and some more i don't remember. Hope this helps Raphaël 2009/5/11 Doug Hughes <d...@doughughes.net> > > Ok, I managed to get this to work (mostly). > > What I did initially that wasn't working was this: > > 1) I created a new maven project and set it up the way I wanted it to be. > 2) I then used archetype:create-from-project to create a new archetype. > 3) I went under /target/generated-sources/archetype in my project to see my > generated archetype. > 4) In that location I ran mvn install which built and installed the > archetype. > 5) I edited the archetype-metadata.xml to remove filtering on all files. > 6) I created a new project using archetype:create or archetype:generate > > As I stated in previous messages this resulting in the > archetype-metadata.xml file being ignored and all of my project's files > being filtered by velocity. > > After a lot of playing around, I noticed that there was a file that was > generated (and not a part of my previous project) underneath this folder: > /src/main/resources/archetype-resources/src/main/resources/META-INF/archetype.xnl. > Note that the extension is xnl (with an n), not xml. I changed this to have > the xml extension and it seems that caused my archetype-metadata file not to > be ingnored. I also have started using only archetype:generate. As of now > running archetype:generate doesn't fail, which is a good start. > > I do, however, still have another problem: Every single txt, xml, and java > file in my archetype is being prepended with this: > > #set( $symbol_pound = '#' ) > #set( $symbol_dollar = '$' ) > #set( $symbol_escape = '\' ) > > This is causing my new project created from the archetype to fail. > > This is happening when the archetype is being installed. I'm not sure when > or why, as my archetype-metadata.xml file is supposed to be causing all > files *not* to be filtered: > > <?xml version="1.0" encoding="UTF-8"?> > <archetype-descriptor name="ColdFusion9Beta"> > <fileSets> > <fileSet filtered="false" packaged="false"> > <directory>src/main/webapp</directory> > <includes> > <include>**/*.*</include> > </includes> > </fileSet> > </fileSets> > </archetype-descriptor> > > Thanks, > > Doug Hughes, President > Alagad Inc. > dhug...@alagad.com > 888 Alagad4 (x300) > Office: 919-550-0755 > Fax: 888-248-7836 > > > On Sun, May 10, 2009 at 5:57 PM, Doug Hughes <d...@doughughes.net> wrote: > > > Martin, > > > > Thanks for the suggestion.... the thing is, that's what this tread started > > about. I have an archetype-metadata.xml file and followed the documentation > > (not at the link you provided which, fyi, doesn't document the filtered or > > packaged attributes). > > > > Anyhow, it seems that the archetype-metadata.xml file is being ignored. No > > mater what I put in that file (including invalid xml), it makes no > > difference. It's like the file doesn't even exist. > > > > I'll send more information on the structure of the archetype project and my > > various files and the commands I'm running later. > > > > Thanks, > > > > Doug Hughes, President > > Alagad Inc. > > dhug...@alagad.com > > 888 Alagad4 (x300) > > Office: 919-550-0755 > > Fax: 888-248-7836 > > > > > > On Sun, May 10, 2009 at 4:26 PM, Martin Gainty <mgai...@hotmail.com>wrote: > > > >> > >> how about adding includes for wanted extensions and excludes for files to > >> be excluded > >> such as this FileSet declaration for archetype-metadata.xml file? > >> > >> <archetype-descriptor> > >> <!-- usual declaration statements --> > >> <fileSets> > >> <fileSet filtered="true" packaged="false"> > >> <directory>src/site</directory> > >> <includes> > >> <include>**/*.ftl</include> > >> </includes> > >> <excludes> > >> <exclude>**/*.vm</exclude> > >> </excludes? > >> </fileSet> > >> </fileSets> > >> </archetype-descriptor> > >> > >> http://ant.apache.org/manual/CoreTypes/fileset.html > >> ? > >> Martin Gainty > >> ______________________________________________ > >> Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note > >> de déni et de confidentialité > >> This message is confidential. If you should not be the intended receiver, > >> then we ask politely to report. Each unauthorized forwarding or > >> manufacturing of a copy is inadmissible. This message serves only for the > >> exchange of information and has no legal binding effect. Due to the easy > >> manipulation of emails we cannot take responsibility over the the contents. > >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte > >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht > >> dient lediglich dem Austausch von Informationen und entfaltet keine > >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > >> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le > >> destinataire prévu, nous te demandons avec bonté que pour satisfaire > >> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie > >> de ceci est interdite. Ce message sert à l'information seulement et n'aura > >> pas n'importe quel effet légalement obligatoire. Étant donné que les email > >> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter > >> aucune responsabilité pour le contenu fourni. > >> > >> > >> > >> > >> > Date: Sun, 10 May 2009 21:39:31 +0200 > >> > Subject: Re: Creating archetypes and disabling velocity > >> > From: heinrich.nirs...@gmail.com > >> > To: users@maven.apache.org > >> > > >> > On Sun, May 10, 2009 at 7:37 PM, Doug Hughes <dhug...@alagad.com> > >> wrote: > >> > > Rather than editing my source files, is there not a way to disable > >> velocity > >> > > for spcific files or folders? I ask because some of the problem files > >> in my > >> > > archetype are binary. I'm not too comfortable editing those by hand > >> as you > >> > > suggest. And I think they may be related to the problems I'm seeing. > >> > > >> > Did you try the filtered="false" attribute in the > >> > archetype-metadata.xml file when you used the archetype:generate goal? > >> > > >> > - Henry > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > >> > For additional commands, e-mail: users-h...@maven.apache.org > >> > > >> > >> _________________________________________________________________ > >> Hotmail® goes with you. > >> > >> http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009 > >> > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org