user3252485
user3252485

Reputation: 85

Auto generate a Java Plug-In Project

I'm on a Enterprise Project that requres a lot of Java Plug-ins. Every plug-in has the same structure, that is something like

com.mysite.XXXX
  ---com.mysite.XXXX
  ------Activator.java
  ---com.mysite.XXXX.impl
  ------XXXXMyClass1.java
  ------ ..............
  ------XXXXMyClassN.java
  ---META-INF
  ------MANIFEST.MS
  ---XXXXFolder
   ------XXXX.xml

this structure is repeated for 4-5 times for each development, so I waiste a lot of time just for creating the project structure copy-pasting and renaming a blank template, and every member of my team has this problem.

I'd like to create a way to auto-generate the java projects and the relative structures. This pattern will remain the same for years. I'm not looking for the cleanest and finest solutions, something dirty but working would be ok :) .

Can you help me? What technologies can I use?

Upvotes: 2

Views: 44

Answers (3)

Richard
Richard

Reputation: 1130

As others have said, generate your bundles using Maven. You can use the maven-bundle-plugin to create your OSGi manifest rather than creating it manually. Once you have a working Maven build, as mentioned above, create an 'archetype' for that, and your other developers can use that to create the framework of a plugin application.

Upvotes: 0

Rüdiger Herrmann
Rüdiger Herrmann

Reputation: 20985

We use maven archetypes to create plug-in projects with associated test fragments. The approach is described here in more detail.

Upvotes: 0

Ascalonian
Ascalonian

Reputation: 15174

I would try creating a custom Maven archetype

Upvotes: 1

Related Questions