Author: clement Date: Thu Apr 23 16:35:20 2009 New Revision: 767966 URL: http://svn.apache.org/viewvc?rev=767966&view=rev Log: Fix issue Felix-1054.
When deploying a bundle, the computed uri is printed on the console: [INFO] Computed bundle uri: http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.log/1.0.0/org.apache.felix.log-1.0.0.jar This allows the user to check if the URL prefix was used correctly. This is done for the deploy and deploy-file goal. Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java?rev=767966&r1=767965&r2=767966&view=diff ============================================================================== --- felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java (original) +++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java Thu Apr 23 16:35:20 2009 @@ -231,7 +231,9 @@ if ( bundleUrl != null ) { // public URL differs from the bundle file location - userConfig.setRemoteBundle( URI.create( bundleUrl ) ); + URI uri = URI.create( bundleUrl ); + log.info("Computed bundle uri: " + uri); + userConfig.setRemoteBundle( uri ); } else if ( prefixUrl != null ) { @@ -240,7 +242,9 @@ String relative = ObrUtils.getRelativeURI( ObrUtils.toFileURI( mavenRepository ), bundleJar ) .toASCIIString(); URL resourceURL = new URL( new URL( prefixUrl + '/' ), relative ); - userConfig.setRemoteBundle( URI.create( resourceURL.toString() ) ); + URI uri = URI.create( resourceURL.toString() ); + log.info("Computed bundle uri: " + uri); + userConfig.setRemoteBundle( uri ); } update = new ObrUpdate( repositoryXml, obrXmlFile, project, mavenRepository, userConfig, log ); Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java?rev=767966&r1=767965&r2=767966&view=diff ============================================================================== --- felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java (original) +++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java Thu Apr 23 16:35:20 2009 @@ -186,12 +186,16 @@ if ( null != bundleUrl ) { // public URL differs from the bundle file location - userConfig.setRemoteBundle( URI.create( bundleUrl ) ); + URI uri = URI.create( bundleUrl ); + log.info("Computed bundle uri: " + uri); + userConfig.setRemoteBundle( uri ); } else if ( null != file ) { // assume file will be deployed in remote repository, so find the remote relative location - userConfig.setRemoteBundle( URI.create( localRepository.pathOf( project.getArtifact() ) ) ); + URI uri = URI.create( localRepository.pathOf( project.getArtifact() ) ); + log.info("Computed bundle uri: " + uri); + userConfig.setRemoteBundle( uri ); } update = new ObrUpdate( repositoryXml, obrXmlFile, project, mavenRepository, userConfig, log );
