How to create executable obfuscated jar for a JavaFX application? - maven

I need to create an executable jar of my JavaFX application. I have done that using ANT. I also need to obfuscate this jar. When I obfuscate using proguard, it is no more executable. Please provide inputs if anyone has worked on it. TIA.

I'm the maintainer of the javafx-maven-plugin.
I've uploaded a working project for using proguard when using maven with javafx-maven-plugin, the kudos goes to Maxim Dobryakov.

Related

Generating an uber/fat/shade sources-jar (and javadoc-jar) using Gradle

Does anyone know how to make a uber/fat/shade sources-jar (and javadoc-jar) using Gradle?
The generated Jar should not only contain the sources of the current project but also the sources of it's dependencies. I have been looking at, among others, a vanilla way and a way using the Shadow Plugin. Both work great at creating a normal uber/fat/shade jar, but none of them seems to support a way to create a sources-jar.
Use Shadow Plugin. In Maven it is called shade plugin. Does same thing. It produces an executable uber jar!

Eclipse Juno m2ecliipse : directory structure explanation

I'm working under Eclipse Juno on a maven-archetype-webapp project done with m2eclipse.
I don't understand directory structure. Anyone could explain how it's working?
Thanks
What i src/main/ressources for ? When you create package, it's not showed as package but only directory.
I create a /src/main/java package and it's where i put my classes. The package structure hierarchy is ok.
What is librairies ressources? Is it where you put javascript jquery? but when i put jquery plugin it does a lot of effor in the project manager. And i want my javascript under /webapp/javascript... What is ECMAScript Library ? What to do with that, what is for?
Same question about Deployed Ressources and target and Jax-WS Web Services ?
Ok target must be the directory when you build the project maven, but i can't see the war file. When you run build how to configure it in eclipse to generate the build? What is the command ?
Thanks , i know it's a lot of questions but i'm beginner !
Have a great day :)
I just add the example when you put jquery in webapp
All of this is explained here.
src/main/java This is where your source code goes
src/main/resources This is where you put your resources like your xml files. Things that aren't java classes but need to be in your classpath. If you put them under /java, they won't be copied into your classpath so you have to put them here.
src/main/webapp This is for webapps. Everything you put in here will be copied over to your war file, directly.

What is the best way to embed jetty in a war file?

I'm trying to embed jetty in a war file so I can launch it frcom the command line, but I'm struggling. I'm using maven, has anyone done this before?
Thanks! Steph
I don't know if you already did this, but as far as I remember, you need to copy all dependencies that are provided in your war file as direct dependencies of the jetty plugin.
Providing more details about your current architecture and issues may help...

IntelliJ GDSL provided with an jar

I have an library, published as a jar, at Maven repo, and this lib provides some Groovy DSL for user objects. Is it possible to provide IntelliJ GDSL with this lib?
I mean, put it somewhere at META-INF inside a jar, or at Maven's pom.xml, and it will be automatically processed and used by IntelliJ IDEA?
Is there any way to make similar thing for Eclipse too?
Yes, just add your jar with *.gdsl file to your library classes and the GDSL script will be executed in the user project automatically.

Add source files to my jar using Maven

I wanted to know the right way I should act.
I have a project which I have compiled into a jar file using maven plugins.
Now, I need to add javadoc , source code , of my project and my tests.
How should I do it?
Basically maven have plugin to deal with such cases.
If I use those plugins I end up with :
project.jar
project-sources.jar
project-javadoc.jar
project-tests.jar
Is this the right way?
Thanks!
Yes, what you're describing is generally considered the correct way to build javadoc, source, and test jars with maven.
The Maven cookbook describes how to attach source and javadoc arifects

Resources