Class EclipseJarSignerFilter
- java.lang.Object
-
- org.eclipse.cbi.maven.plugins.jarsigner.EclipseJarSignerFilter
-
- All Implemented Interfaces:
FilteredJarSigner.Filter
public class EclipseJarSignerFilter extends java.lang.Object implements FilteredJarSigner.Filter
Checks and returns whether the given file should be signed. The condition are:- the file is a readable file with the
.jar
file extension. - the file Jar does not have a entry "META-INF/eclipse.inf" with the either the properties "jarprocessor.exclude.sign" or "jarprocessor.exclude"
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
DOT_JAR_GLOB_PATTERN
Jar file extension.private static java.lang.String
JARPROCESSOR_EXCLUDE
eclispe.inf
property to exclude this Jar from processing (and thus signing).private static java.lang.String
JARPROCESSOR_EXCLUDE_SIGN
eclispe.inf
property to exclude this Jar from signing.private org.apache.maven.plugin.logging.Log
log
private static java.lang.String
META_INF_ECLIPSE_INF
Path of theeclispe.inf
entry in a Jar
-
Constructor Summary
Constructors Constructor Description EclipseJarSignerFilter(org.apache.maven.plugin.logging.Log log)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
isDisabledInEclipseInf(java.nio.file.Path file)
Checks and returns whether the given Jar file has signing disabled by an file "META-INF/eclipse.inf" with the either the properties "jarprocessor.exclude.sign" or "jarprocessor.exclude".boolean
shouldBeSigned(java.nio.file.Path file)
-
-
-
Field Detail
-
JARPROCESSOR_EXCLUDE_SIGN
private static final java.lang.String JARPROCESSOR_EXCLUDE_SIGN
eclispe.inf
property to exclude this Jar from signing.- See Also:
- Constant Field Values
-
JARPROCESSOR_EXCLUDE
private static final java.lang.String JARPROCESSOR_EXCLUDE
eclispe.inf
property to exclude this Jar from processing (and thus signing).- See Also:
- Constant Field Values
-
META_INF_ECLIPSE_INF
private static final java.lang.String META_INF_ECLIPSE_INF
Path of theeclispe.inf
entry in a Jar- See Also:
- Constant Field Values
-
DOT_JAR_GLOB_PATTERN
static final java.lang.String DOT_JAR_GLOB_PATTERN
Jar file extension.- See Also:
- Constant Field Values
-
log
private final org.apache.maven.plugin.logging.Log log
-
-
Method Detail
-
shouldBeSigned
public boolean shouldBeSigned(java.nio.file.Path file) throws java.io.IOException
- Specified by:
shouldBeSigned
in interfaceFilteredJarSigner.Filter
- Throws:
java.io.IOException
-
isDisabledInEclipseInf
private static boolean isDisabledInEclipseInf(java.nio.file.Path file) throws java.io.IOException
Checks and returns whether the given Jar file has signing disabled by an file "META-INF/eclipse.inf" with the either the properties "jarprocessor.exclude.sign" or "jarprocessor.exclude".- Parameters:
file
-- Returns:
- true if it finds a property that excludes this file for signing.
- Throws:
org.apache.maven.plugin.MojoExecutionException
java.io.IOException
-
-