|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.AbstractMojo org.apache.sling.maven.bundlesupport.BundleDeployFileMojo
public class BundleDeployFileMojo
Deploy a JAR representing an OSGi Bundle. This method posts the bundle built
by maven to an OSGi Bundle Repository accepting the bundle. The plugin uses
a multipart/format-data POST request to just post the file to
the URL configured in the obr
property.
Field Summary |
---|
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
BundleDeployFileMojo()
|
Method Summary | |
---|---|
protected java.io.File |
changeVersion(java.io.File file,
java.lang.String oldVersion,
java.lang.String newVersion)
Change the version in jar |
void |
execute()
Execute this Mojo |
protected java.io.File |
fixBundleVersion(java.io.File jarFile)
Optionally fixes up the version of the bundle given in the jar File. |
protected java.lang.String |
getBundleSymbolicName(java.io.File jarFile)
Returns the symbolic name of the given bundle. |
protected java.lang.String |
getJarFileName()
Returns the path and name of the jar file containing the bundle to be uploaded. |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
---|
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BundleDeployFileMojo()
Method Detail |
---|
protected java.lang.String getJarFileName() throws org.apache.maven.plugin.MojoExecutionException
null
name but
throws a MojoExecutionException
if the name is not known.
null
.
org.apache.maven.plugin.MojoExecutionException
- If the name of the file is not known
because it might not have been configured.protected java.io.File fixBundleVersion(java.io.File jarFile)
jarFile
may just be
returned.
jarFile
- The file whose bundle version should be fixed
jarFile
if the version was not fixed.public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected java.io.File changeVersion(java.io.File file, java.lang.String oldVersion, java.lang.String newVersion) throws org.apache.maven.plugin.MojoExecutionException
newVersion
- file
-
org.apache.maven.plugin.MojoExecutionException
protected java.lang.String getBundleSymbolicName(java.io.File jarFile)
jarFile
does not contain a manifest with a
Bundle-SymbolicName
header null
is
returned. Otherwise the value of the Bundle-SymbolicName
header is returned.
This method may also be used to check whether the file is a bundle at all
as it is assumed, that only if the file contains an OSGi bundle will the
Bundle-SymbolicName
manifest header be set.
jarFile
- The file providing the bundle whose symbolic name is
requested.
Bundle-SymbolicName
manifest header or
null
if no manifest exists in the file or the
header is not contained in the manifest. However, if
null
is returned, the file may be assumed to not
contain an OSGi bundle.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |