Package org.apache.netbeans.nbm.utils
Class ExamineManifest
- java.lang.Object
-
- org.apache.netbeans.nbm.utils.ExamineManifest
-
public class ExamineManifest extends java.lang.ObjectTag examines the manifest of a jar file and retrieves NetBeans specific information.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanbundleAutoloadprivate java.lang.Stringclasspathprivate java.util.List<java.lang.String>dependencyTokensprivate booleanfriendPackagesprivate java.util.List<java.lang.String>friendsprivate java.lang.StringimplVersionprivate java.io.FilejarFileprivate booleanlocalizedprivate java.lang.StringlocBundleprivate org.apache.maven.plugin.logging.Logloggerprivate java.io.FilemanifestFileprivate java.lang.Stringmoduleprivate booleannetBeansModuleprivate booleanosgiBundleprivate java.util.Set<java.lang.String>osgiExportsprivate java.util.Set<java.lang.String>osgiImportsprivate java.util.List<java.lang.String>packagesprivate booleanpopulateDependenciesprivate java.util.List<java.lang.String>providesprivate booleanpublicPackagesprivate java.util.List<java.lang.String>requiresprivate java.lang.StringspecVersion
-
Constructor Summary
Constructors Constructor Description ExamineManifest(org.apache.maven.plugin.logging.Log logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckFile()java.lang.StringgetClasspath()java.util.List<java.lang.String>getDependencyTokens()java.util.List<java.lang.String>getFriends()java.lang.StringgetImplVersion()java.lang.StringgetModule()Code name base of the module only.java.lang.StringgetModuleWithRelease()Full name of module: code name base, then optionally slash and major release version.java.util.List<java.lang.String>getNetBeansProvidesTokens()java.util.List<java.lang.String>getNetBeansRequiresTokens()java.util.Set<java.lang.String>getOsgiExports()java.util.Set<java.lang.String>getOsgiImports()java.util.List<java.lang.String>getPackages()list of package statements from OpenIDE-Module-Public-Packages.java.lang.StringgetSpecVersion()booleanhasFriendPackages()returns true if both public packages and friend list are declared.booleanhasPublicPackages()returns true if there are defined public packages and there is no friend declaration.booleanisBundleAutoload()booleanisLocalized()booleanisNetBeansModule()booleanisOsgiBundle()private voidprocessManifest(java.util.jar.Manifest mf)private voidresetExamination()voidsetArtifactFile(java.io.File artifactFileLoc)Either callsetJarFile(java.io.File)orsetManifestFile(java.io.File)as appropriate.voidsetJarFile(java.io.File jarFileLoc)The jar file to examine.voidsetManifestFile(java.io.File manifestFileLoc)Manifest file to be examined.voidsetNetBeansModule(boolean netBeansModule)voidsetPopulateDependencies(boolean populateDependencies)
-
-
-
Field Detail
-
logger
private final org.apache.maven.plugin.logging.Log logger
-
jarFile
private java.io.File jarFile
-
manifestFile
private java.io.File manifestFile
-
netBeansModule
private boolean netBeansModule
-
osgiBundle
private boolean osgiBundle
-
localized
private boolean localized
-
specVersion
private java.lang.String specVersion
-
implVersion
private java.lang.String implVersion
-
module
private java.lang.String module
-
locBundle
private java.lang.String locBundle
-
classpath
private java.lang.String classpath
-
publicPackages
private boolean publicPackages
-
populateDependencies
private boolean populateDependencies
-
dependencyTokens
private java.util.List<java.lang.String> dependencyTokens
-
osgiImports
private java.util.Set<java.lang.String> osgiImports
-
osgiExports
private java.util.Set<java.lang.String> osgiExports
-
friendPackages
private boolean friendPackages
-
friends
private java.util.List<java.lang.String> friends
-
packages
private java.util.List<java.lang.String> packages
-
requires
private java.util.List<java.lang.String> requires
-
provides
private java.util.List<java.lang.String> provides
-
bundleAutoload
private boolean bundleAutoload
-
-
Method Detail
-
checkFile
public void checkFile() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
resetExamination
private void resetExamination()
-
processManifest
private void processManifest(java.util.jar.Manifest mf)
-
setJarFile
public void setJarFile(java.io.File jarFileLoc)
The jar file to examine. It is exclusive with manifestFile.- Parameters:
jarFileLoc- jar file
-
setManifestFile
public void setManifestFile(java.io.File manifestFileLoc)
Manifest file to be examined. It is exclusive with jarFile.- Parameters:
manifestFileLoc- manifedt file
-
setArtifactFile
public void setArtifactFile(java.io.File artifactFileLoc)
Either callsetJarFile(java.io.File)orsetManifestFile(java.io.File)as appropriate.- Parameters:
artifactFileLoc- a JAR or folder
-
getClasspath
public java.lang.String getClasspath()
-
isNetBeansModule
public boolean isNetBeansModule()
-
setNetBeansModule
public void setNetBeansModule(boolean netBeansModule)
-
isLocalized
public boolean isLocalized()
-
getSpecVersion
public java.lang.String getSpecVersion()
-
getImplVersion
public java.lang.String getImplVersion()
-
getModule
public java.lang.String getModule()
Code name base of the module only. Does not include any release version.- Returns:
- module code name base
-
getModuleWithRelease
public java.lang.String getModuleWithRelease()
Full name of module: code name base, then optionally slash and major release version.- Returns:
- module full name
-
hasPublicPackages
public boolean hasPublicPackages()
returns true if there are defined public packages and there is no friend declaration.- Returns:
- true if has public package
-
setPopulateDependencies
public void setPopulateDependencies(boolean populateDependencies)
-
getDependencyTokens
public java.util.List<java.lang.String> getDependencyTokens()
-
hasFriendPackages
public boolean hasFriendPackages()
returns true if both public packages and friend list are declared.- Returns:
- true if has friend package
-
getFriends
public java.util.List<java.lang.String> getFriends()
-
getPackages
public java.util.List<java.lang.String> getPackages()
list of package statements from OpenIDE-Module-Public-Packages. All items end with .*- Returns:
- list of package
-
isOsgiBundle
public boolean isOsgiBundle()
-
getOsgiImports
public java.util.Set<java.lang.String> getOsgiImports()
-
getOsgiExports
public java.util.Set<java.lang.String> getOsgiExports()
-
getNetBeansRequiresTokens
public java.util.List<java.lang.String> getNetBeansRequiresTokens()
-
getNetBeansProvidesTokens
public java.util.List<java.lang.String> getNetBeansProvidesTokens()
-
isBundleAutoload
public boolean isBundleAutoload()
-
-