proguard-maven-plugin | ProGuard Maven plugin that supports modularised ProGuard | Plugin library
kandi X-RAY | proguard-maven-plugin Summary
kandi X-RAY | proguard-maven-plugin Summary
Run ProGuard as part of your Maven build. For usage, please read the generated Documentation. Development happens at Github. This plugin is in a mature state, so major development changes are not expected. Pull requests are welcome. This is the successor of the ProGuard Maven Plugin by pyx4me.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates the output jar
- Get the list of proguard jar files
- Get the classpath element
- Main entry point for the program
- Prints the example
- Gets a method name
proguard-maven-plugin Key Features
proguard-maven-plugin Examples and Code Snippets
Community Discussions
Trending Discussions on proguard-maven-plugin
QUESTION
I have a multi module maven project runs with Spring Boot and Webflux under Netty. Si I was using proguard maven plugin to generate obfuscated jar file. My problem is everything looks fine when I look at the logs but when I send a request to it I get 404 error.
The build section at pom.xml looks like:
...ANSWER
Answered 2022-Jan-10 at 07:36It turns out, Proguard moves all the obfuscated files under BOOT-INF.
Spring boot scans the main package but it can not find your obfuscated files, because they are not in the main package. So you need to give a proper package name to Proguard to move them somewhere under the main package.
All you need to do is give a new package name like:
QUESTION
I am trying to obfuscate a jar-with-dependencies (although the same problem affects if I set as inFile the regular single jar).
I am using Java 8, but I have to use newer versions of Proguard and Proguard Maven Plugin, due to coverage of some jar dependencies that are from a higher version (otherwise I get an "Unsupported major-minor version" problem).
When executing "mvn clean install" the step is executed but I get a "proguard jar not found in pluginArtifacts error". See log below.
I have seen in Proguard Maven Plugin code that now you need (from 7.0.0) both proguard-base and proguard-core from com.guardsquare instead of the outdated previous version in net.sf.proguard - this one is not prepared for later jars.
Apparently the proguard jar is not found where I am specifying it - how should I include this dependency?
I am using this in my pom:
...ANSWER
Answered 2021-Aug-19 at 14:33I was actually using proguard.Proguard instead of proguard.ProGuard. Typo took a day out of me.
However, there is some extra trickyness associated, in case it helps anyone: proguard-maven-plugin
would not let me define newer versions of proguard dependencies except for the default one. E.g. 2.4.0
would only allow me to use 7.1.0-beta3
which is the default. It didn't recognize the libraries I would set in the dependencies
section inside the plugin (for example, for 7.1.1
).
QUESTION
I want to use proguard with a javafx application with some custom controls.
I have a custom control that contains a poperty
...
ANSWER
Answered 2021-Nov-17 at 20:11I found out that my wild cards were not correct. Should have been, in a generic way:
QUESTION
I am using the Maven Assembly Plugin to extract my project into a jar file. And as a result, the extracted jar file is getting "jar-with-dependencies" appended to its name.
However, this should not be a problem for the proguard plugin since I can specify the name of the jar in its injar element like this: ${project.build.finalName}-jar-with-dependencies.jar
But for some reason, as it can be seen on the error message, it is never able to locate the jar because it is looking for its original name, not the one with "-jar-with-dependencies" when I compile it with this command: mvn clean compile assembly:single proguard:proguard
Error Message
...ANSWER
Answered 2021-Sep-01 at 11:46It turns out that the execution element should be closed before the configuration element
QUESTION
I'm extracting JPA entities into a separate Fat/Uber jar for external system to use. ProGuard is used through com.github.wvengen:proguard-maven-plugin to shrink all other unused code. I want to keep all methods in JPA entities except ones annotated by @javax.persistence.Transient annotation. I've found "!transient" for field modifiers in ProGuard rules, but seems that !@javax.persistence.Transient for methods does not work :( Can I reach the same effect somehow for methods by other way ?
...ANSWER
Answered 2021-Apr-05 at 13:02Unfortunately I've not got an answer on this question and was not be able to solve this by ProGuard+MavenPlugin directly, but I've resolved this problem with one additional step before run a ProGuard. I've just used ByteBuddy + Maven plugin on Maven phase before you run ProGuard Maven plugin and it will then optimize/remove the rest unused stuff, see details about byte-buddy instrumentation step here: byte-buddy remove/strip methods
QUESTION
I am building a desktop application. I am using ProGuard with the following config:
...ANSWER
Answered 2020-Aug-13 at 16:35You have the line ${java.home}/lib/rt.jar
in your configuration for proguard. This is no longer valid in JDK11 as it was removed in that version of Java.
QUESTION
I wrote the required maven dependencies in maven's pom.xml, and now I add proguard-maven-plugin to obfuscate the code, and hope not to obfuscate the dependencies written in pom.xml
The project depends on a lot of maven jars. Is there a configuration method to directly filter all maven jars?
How do I modify pom.xml or proguard.cfg?
A part of my pom.xml
dependencies:
...ANSWER
Answered 2020-Mar-30 at 01:21I finally added the following parameters to the configuration file to solve the problem
QUESTION
I am using proguard-maven-plugin in my multi-module maven project with spring boot. By no means, I am not an expert and still learning how to make use of all features provided with ProGuard, so bear with me. ProGuard dependency:
...ANSWER
Answered 2020-Feb-11 at 15:50So, after a bit of struggle, I found a solution to my issue. Firstly, I added a of "provided" (link to docs) to the dependencies I wanted out of the
lib
folder :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install proguard-maven-plugin
You can use proguard-maven-plugin like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the proguard-maven-plugin component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page