If I understood this correctly, you are trying to add a ".xyz" file in your archetype. If that is correct, yes, you can add these files also in the archetype. Just add them to the "archetype-resources" directory the same way you add the other source or template files and update your META-INF/maven/archetype.xml to include them in the resources. For example, see the attached .project and .class file that I used for my archetype that creates a maven project which also can be opened as a pure eclipse project. I have used the "artifactId" variable in the .project to specify the eclipse project display name.

META-INF/maven/archetype.xml

<archetype>
...
<resources>
<!-- eclipse project files -->
<resource filtered="true">.project</resource>
<resource filtered="false">.classpath</resource>
</resources>
....
</archetype>

regards,

Srinivasan Chikkala
Open ESB Community (http://open-esb.org)



Mick Knutson wrote:
I want to know if it is possible to have and configure .project and
.classpath files for eclipse in my archetype?

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>JBI Binding Component[${artifactId}]</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
	</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="output" path="build"/>
</classpath>

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

Reply via email to