Package org.apache.felix.obrplugin
Class ObrUpdate
- java.lang.Object
-
- org.apache.felix.obrplugin.ObrUpdate
-
public class ObrUpdate extends java.lang.Object
this class parse the old repository.xml file build the bundle resource description and update the repository.
-
-
Field Summary
Fields Modifier and Type Field Description private java.net.URI
m_baseURI
base URI used to relativize bundle URIs.private org.apache.maven.plugin.logging.Log
m_logger
logger for this plugin.private java.net.URI
m_obrXml
name and path to the obr.xml file.private org.apache.maven.project.MavenProject
m_project
maven project description.private org.apache.felix.bundlerepository.impl.RepositoryImpl
m_repository
root on parent document.private java.net.URI
m_repositoryXml
name and path to the repository descriptor file.private org.apache.felix.bundlerepository.impl.ResourceImpl
m_resourceBundle
used to store bundle information.private Config
m_userConfig
user configuration information.private static java.lang.reflect.Method
setURI
private static java.util.regex.Pattern
TIMESTAMP
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
parseObrXml()
put the information from obr.xml into ressourceBundle object.private void
parseObrXml(org.kxml2.io.KXmlParser kxp)
void
parseRepositoryXml()
Parse the repository descriptor file.private java.lang.String
relativisePath(java.net.URI uri)
void
updateRepository(java.net.URI bundleJar, java.net.URI sourceJar, java.net.URI docJar)
update the repository descriptor file.void
writeRepositoryXml()
-
-
-
Field Detail
-
TIMESTAMP
private static java.util.regex.Pattern TIMESTAMP
-
setURI
private static java.lang.reflect.Method setURI
-
m_logger
private org.apache.maven.plugin.logging.Log m_logger
logger for this plugin.
-
m_repositoryXml
private java.net.URI m_repositoryXml
name and path to the repository descriptor file.
-
m_obrXml
private java.net.URI m_obrXml
name and path to the obr.xml file.
-
m_project
private org.apache.maven.project.MavenProject m_project
maven project description.
-
m_userConfig
private Config m_userConfig
user configuration information.
-
m_repository
private org.apache.felix.bundlerepository.impl.RepositoryImpl m_repository
root on parent document.
-
m_resourceBundle
private org.apache.felix.bundlerepository.impl.ResourceImpl m_resourceBundle
used to store bundle information.
-
m_baseURI
private java.net.URI m_baseURI
base URI used to relativize bundle URIs.
-
-
Constructor Detail
-
ObrUpdate
public ObrUpdate(java.net.URI repositoryXml, java.net.URI obrXml, org.apache.maven.project.MavenProject project, java.lang.String mavenRepositoryPath, Config userConfig, org.apache.maven.plugin.logging.Log logger)
initialize information.- Parameters:
repositoryXml
- path to the repository descriptor fileobrXml
- path and filename to the obr.xml fileproject
- maven project descriptionmavenRepositoryPath
- path to the local maven repositoryuserConfig
- user informationlogger
- plugin logger
-
-
Method Detail
-
updateRepository
public void updateRepository(java.net.URI bundleJar, java.net.URI sourceJar, java.net.URI docJar) throws org.apache.maven.plugin.MojoExecutionException
update the repository descriptor file. parse the old repository descriptor file, get the old reference of the bundle or determine the id for a new bundle, extract information from bindex set the new information in descriptor file and save it.- Parameters:
bundleJar
- path to the bundle jar filesourceJar
- path to the source jar filedocJar
- path to the docs jar file- Throws:
org.apache.maven.plugin.MojoExecutionException
- if the plugin failed
-
relativisePath
private java.lang.String relativisePath(java.net.URI uri)
-
writeRepositoryXml
public void writeRepositoryXml() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
parseRepositoryXml
public void parseRepositoryXml() throws org.apache.maven.plugin.MojoExecutionException
Parse the repository descriptor file.- Throws:
org.apache.maven.plugin.MojoExecutionException
- if the plugin failed
-
parseObrXml
private void parseObrXml() throws org.apache.maven.plugin.MojoExecutionException
put the information from obr.xml into ressourceBundle object.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
parseObrXml
private void parseObrXml(org.kxml2.io.KXmlParser kxp) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-