net.java.truelicense.maven.plugin.MainObfuscateMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truelicense-maven-plugin Show documentation
Show all versions of truelicense-maven-plugin Show documentation
Provides a Maven plugin with goals for the obfuscation of constant
string values in Java class and test-class files (byte code).
/*
* Copyright (C) 2005-2013 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.java.truelicense.maven.plugin;
import de.schlichtherle.truezip.file.TFile;
import java.io.*;
import javax.annotation.concurrent.NotThreadSafe;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
/**
* Obfuscates constant string values in the main byte code.
* Note that general Java byte code obfuscation is out of scope for this goal.
* So to achieve a reasonable level of security for your intellectual property
* you still need to apply a general byte code obfuscation tool to the
* transformed class files.
*
* @see net.java.truelicense.obfuscate.ObfuscatedString
* @author Christian Schlichtherle
*/
@NotThreadSafe
@Mojo(name = "obfuscate", defaultPhase = LifecyclePhase.PROCESS_CLASSES)
public final class MainObfuscateMojo extends ObfuscateMojo {
@Parameter(defaultValue = "${project.build.outputDirectory}", required = true, readonly = true)
private File outputDirectory;
@Override TFile outputDirectory() { return new TFile(outputDirectory); }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy