Hi All,
I have been sifting through documentation and hacking away for the better part
of today trying to get this to work and have had no joy. I need to have a
project generated that has the following structure:
|-- [artifactId] -- pom.xml -- README -- build.xml -- common-build.xml
-- conf/ -- [conf files] -- src/ -- main/ ... --
test/ ...
I have no problem generating the conf/ directory and files within, but I cannot
for the life of me get the README, build.xml and common-build.xml files to
deploy in the root directory. They are situated in the archetypes definition
directory structure as follows:
|-- [archetype-artifactId]/ -- src/ -- main/ -- resources/
-- archetype-resources/ -- README -- build.xml
-- common-build.xml -- pom.xml
In my archetype-metadata.xml file I am using the following fileSet definition
(NOTE: I have been through numerous variations of this in an attempt to get
maven to find these files, all to no avail):
<fileSet filtered="true"> <directory>.</directory>
<includes> <include>*build.xml</include>
<include>README</include> </includes> </fileSet>
I have tried defining the content of the <directory> tag to be: '.', '/',
'/archetype-resources/', none of which work. I even defined the content to be
'src' and then defined the include to be: ../*build.xml.
The README, common-build.xml and build.xml files all exist within the JAR
created by mvn install.
The pom.xml file is copied to the output with no problems. I see in the debug
output that the README, common-build.xml and build.xml files are found:
[DEBUG] - ignored resource META-INF/maven/archetype-metadata.xml[DEBUG] -
ignored resource META-INF/maven/archetype.xml[DEBUG] - found resource
(archetype-resources/)common-build.xml[DEBUG] - found resource
(archetype-resources/)conf/__artifactId__.xml[DEBUG] - found resource
(archetype-resources/)conf/service.xml[DEBUG] - found resource
(archetype-resources/)pom.xml[DEBUG] - found resource
(archetype-resources/)build.xml[DEBUG] - found resource
(archetype-resources/)README[DEBUG] Processing complete archetype fileset
But these files are not copied to the generated project structure.
I know I am missing something very basic, but what is it?
Thanks for any and all assistance you can offer!
r/Steve