I want to place a README.md
(and maybe some other files) next to the pom.xml
of the project that is created by the Maven Archetype plugin.
It seems that it is only allowed to place files
<sources> = src/main/java
<resources> = src/main/resources
<testSources> = src/test/java
<testResources> = src/test/resources
<siteResources> = src/site
whereas I want to place files in .
. How can I do this?
To clarify what user1811587 is saying, if you are using an archetype-metadata.xml file, like the one created when generating an archetype through mvn archetype:create-from-project, the format would be:
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="viewport-bootstrap"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fileSets>
<fileSet filtered="true" packaged="false" encoding="UTF-8">
<directory/>
<includes>
<include>README.txt</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
The above XML will place the README.txt along side the pom.xml.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With