Author: mcculls
Date: Thu Sep 27 05:08:11 2007
New Revision: 579981
URL: http://svn.apache.org/viewvc?rev=579981&view=rev
Log:
Ensure any future OBR issues don't break the bundle life-cycle
Modified:
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/OBRInstall.java
Modified:
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/OBRInstall.java
URL:
http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/OBRInstall.java?rev=579981&r1=579980&r2=579981&view=diff
==============================================================================
---
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/OBRInstall.java
(original)
+++
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/OBRInstall.java
Thu Sep 27 05:08:11 2007
@@ -78,21 +78,29 @@
}
Log log = getLog();
+ ObrUpdate update;
- String localRepoPath = localRepository.getBasedir();
- String artifactPath = localRepository.pathOf( project.getArtifact() );
- String bundlePath = localRepoPath + File.separator + artifactPath;
- bundlePath = bundlePath.replace( '\\', '/' );
+ try
+ {
+ String localRepoPath = localRepository.getBasedir();
+ String artifactPath = localRepository.pathOf(
project.getArtifact() );
+ String bundlePath = localRepoPath + File.separator + artifactPath;
+ bundlePath = bundlePath.replace( '\\', '/' );
- PathFile repositoryXml = normalizeRepositoryPath( obrRepository,
localRepoPath );
- String extensionXml = findOBRExtensions( project.getResources() );
+ PathFile repositoryXml = normalizeRepositoryPath( obrRepository,
localRepoPath );
+ String extensionXml = findOBRExtensions( project.getResources() );
- Config user = new Config();
+ Config user = new Config();
- ObrUpdate update = new ObrUpdate( repositoryXml, extensionXml,
project, bundlePath, localRepoPath, user, log );
+ update = new ObrUpdate( repositoryXml, extensionXml, project,
bundlePath, localRepoPath, user, log );
- repositoryXml.createPath();
- update.updateRepository();
+ repositoryXml.createPath();
+ update.updateRepository();
+ }
+ catch( Exception e )
+ {
+ log.warn( "Exception while updating OBR: " +
e.getLocalizedMessage(), e );
+ }
}
private static PathFile normalizeRepositoryPath( String obrPath, String
mavenPath )