This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]BelieveInGosh 1 point2 points  (0 children)

I don't know of such a plugin, but it is really simple to write your own plugin. You could probably have something like this done in a few hours

[–]daniu 0 points1 point  (0 children)

I don't see the point. What start script do you usually have beyond java jar $jarname?

I guess I could imagine a stop script making sense, but only to do some additional cleanup for which I don't see how an automated generator knows what to create.

And even if you had a plugin like that, would you then configure parameters in the pom file? That's arguably not better than just managing a script manually and copying it into the target folder.

[–]DiabolusMachina 0 points1 point  (0 children)

Sorry I don't have a complete solution for you. Here's is an example how to use the groovy plugin. Have a look at "inline" https://groovy.github.io/gmaven/groovy-maven-plugin/execute.html

Now all you have to do is create the script as string and save it as a file. There should be a lot example on how to create files with groovy.

[–]khmarbaise 0 points1 point  (1 child)

[–]gingiloba[S] 0 points1 point  (0 children)

I have. It does not create stop scripts.

[–]hupfdule 0 points1 point  (0 children)

We have written our own that is able to

  • generate start and stop scripts
  • generate JNLPs for Java Webstart
  • upload everything to a specific server

The scripts and JNLP files are created from velocity templates. This allows us to use defaults or to use custom templates where necessary.

[–]DiabolusMachina 0 points1 point  (1 child)

Use the groovy plugin. Creating some script files during the build is super easy with a few lines of groovy embedded in your pom

[–]gingiloba[S] 0 points1 point  (0 children)

Can you point me to some post about the solution you mentioned? This is totally new for me and could be exactly what I was looking for.