Hi,
I was struggling with the same problem just a few minutes ago, and seems
like there is a solution.

Instead of using the archetype.xml file to manage your resources, you
can create a file name "archetype-metadata.xml", where you have more
fine-graned managing of the archetype structure, for example, for your
problem :

<?xml version="1.0" encoding="UTF-8"?>
<*archetype*-descriptor name="basic">

  <fileSets>
    <fileSet filtered="true" *packaged*="true">
      <directory>src/main/java</directory>
      <includes>
        <include>**/*.java</include>
      </includes>
    </fileSet>
    <fileSet filtered="true" *packaged*="true">
      <directory>src/test/java</directory>
      <includes>
        <include>**/*.java</include>
      </includes>
    </fileSet>
    <fileSet filtered="true" *packaged*="true">
      <directory>src/main/*resources*</directory>
      <includes>
        <include>**/app-config.xml</include>
      </includes>
    </fileSet>
  </fileSets>
</*archetype*-descriptor>

As you can see, the packaged="true" attribute makes Maven put that files
inside the package. I'm trying to make it work right now, not yet
successfully :(. Anyway, it is documented here :
http://maven.apache.org/plugins/maven-archetype-plugin/specification/archetype-metadata.html


Simone

qrtt1 wrote:
> Hello, I create an archetype for my project.
> there are my archetype.xml
>
> <archetype>
>       <id>archetype</id>
>       <sources>
>               <source>src/main/java/DummyNode.java</source>
>       </sources>
>       <testSources>
>               <source>src/test/java/DummyNodeTest.java</source>
>       </testSources>
>       <resources>
>               <resource>src/main/resources/app-config.xml</resource>
>       </resources>
> </archetype>
>
> My *.java can move to package directory but app-config.xml doesn't
> How do I do can make it move to apporiate locations?
>
>   


-- 
Simone Gianni
http://www.simonegianni.it/
CEO Semeru s.r.l.
Apache Committer


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to