How to create an applet project in maven? - maven-2

What is the best way how to create an applet project in maven?
Is there any archetype that I missed? Or I just need to create regular java project?

Just use a normal Java project. You may find the proguard-maven-plugin useful, in order to compress the applet .jar.

Related

How to use script to build IntelliJ Idea project to a jar

i have created an IntelliJ Idea (Community Edition) java project. the project is quite simple. it only contains a main() method, but uses another 2 jars as dependencies. I also created an artifact to the project to build it to a jar.
My question is there any way to build the jar using script? because I want to add the build process to an existing build script.
thanks
IDEA doesn't do anything with the code on its own, it just counts on the default tools provided by SDK. In short, you will need javac and jar for packaging.

Is it possible to use an eclipse plugin project as jar library in a regular java project?

I have an eclipse plugin that I would like to access some classes in a regular Java Project. I was wondering if it is possible to generate a jar file from the plugin and then use that jar file in the Java Project. So in summary:
Is it possible to use an eclipse plugin project as jar library in a regular java project?
Thanks,
-- Tiago
Most of the time,an Eclipse plugin is exactly a jar file/few jar files,and on some other conditions it contains a features folder and other type files.For a single jar which is added dependency to this project,any public/static members can be accessible.
So just add it to the project's build path and you can access them.

How to create OSGI project in IntelliJ Idea?

I am trying to create an OSGI project on IntelliJ Idea but so far couldn't make it. I can change the facet after creating a Java project but it isn't the one I want.
In eclipse, while I am creating the project ( Plugin Project ) I can select it to be an OSGI project thus IDE helps me to create required project structure.
But in IntelliJ Idea it is not - at least I couldn't find it -
Have a look to Osmorc. Its for OSGi development in Intellij. If you are familiar with Maven you can use a combination of Bnd Framework and maven-bundle-plugin. With the last one you are independend of the IDE you are using

Using third-party jar files for execution in my maven plugin

I am developing a maven plugin, which uses a third party jar file , in the sense that it execs this jar.
So what all this plugin does it , uses this specific third part jar, executes using some parameters , and thats the end of it.
I know there is a java exec plugin for maven, but for reasons of my own , I do not want to use that and rather go for this approach.
The issue is, I am not able to embed the jar file , unless it exists in the same directory as the pom.xml , for the project I would be using this plugin for.
Can someone suggest a robust and elegant way to do this?
Thanks
Neeraj
Make this JAR a dependency for the plugin you are developing.

How make Eclipse instrument classes at build time?

Sometimes I have to perform some custom bytecode transformation.
I have used mainly asm and javaassit.
Inside eclipse usually I run my code with the -javaagent jvm parameter. Outside eclipse I use maven, ant, or the command prompt to invoke the weavers before running the application code.
But the point is that: I would like to perform instrumentation at build time inside eclipse.
What is the best way to do it?
Is there an already made plugin that I can connect to by implementing some api?
May I script this with eclipse monkey?
May I use an ant builder and invoke my weaver with it?
Should I look at the AspectJ plugin (must be huge) and try to figure out how to make my own plugin?
Should I look at the some other plugin to get inspiration?
Thanks.
You can create an annotation processor. This way you will be able to use it with ant, maven and any IDE (not only Eclipse).
Here is an example:
http://java.dzone.com/news/using-java-6-processors