Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven template plugin?

Tags:

java

maven

I've looked and I can't seem to find a standalone maven plugin that one could use to generate files with Maven.

I've seen a couple of projects that look like they might be going to do something like this, and I know the web start plugin uses velocity templates to generate the jnlp file. But I have not found anything that does this.

In case you're wondering why one would want this - I'd like to be able to generate Eclipse plugin.xml files as part of a PDE build.

Does anyone know of a Maven template plugin or how to generate Eclipse plugin.xml files from Maven?

like image 398
javamonkey79 Avatar asked Dec 30 '10 22:12

javamonkey79


People also ask

What is Maven template?

The templating maven plugin handles copying files from a source to a given output directory, while filtering them. This plugin is useful to filter Java Source Code if you need for example to have things in that code replaced with some properties values.

Is archetype a plugin?

The Archetype Plugin allows the user to create a Maven project from an existing template called an archetype. It also allows the user to create an archetype from an existing project. This plugin requires Java 7.

How do I download Maven archetype plugin?

Download Maven Archetype 3.2.Use a source archive if you intend to build Maven Archetype yourself. Otherwise, simply use the ready-made binary artifacts from central repository. You will be prompted for a mirror - if the file is not found on yours, please be patient, as it may take 24 hours to reach all mirrors.

What Maven construct is used to build a template?

Archetype is a Maven plugin whose task is to create a project structure as per its template. We are going to use quickstart archetype plugin to create a simple java application here.


2 Answers

I was going to create this, but someone else beat me to it but: the maven velocity plugin can generate files based on templates (using velocity of course).

like image 73
javamonkey79 Avatar answered Nov 04 '22 09:11

javamonkey79


Sounds like you are looking for the Maven Eclipse plugin or the Archetype plugin.

Update:

Sorry didn't pay attention to the "PDE" ... perhaps this codehaus pde-maven-plugin plugin does what you need?

like image 23
Pat Avatar answered Nov 04 '22 10:11

Pat