karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie G." <jamie.goody...@gmail.com>
Subject Re: svn commit: r1305766 - /karaf/branches/karaf-2.2.x/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java
Date Tue, 27 Mar 2012 10:08:36 GMT
It appears adding the " featuresService.removeRepository(uri);" has
broken several KarArtifactInstallerTest test cases' mocking.

Should be a minor tweak to get them working again.

Cheers,
Jamie

On Tue, Mar 27, 2012 at 5:29 AM,  <jbonofre@apache.org> wrote:
> Author: jbonofre
> Date: Tue Mar 27 07:59:27 2012
> New Revision: 1305766
>
> URL: http://svn.apache.org/viewvc?rev=1305766&view=rev
> Log:
> [KARAF-1139] Refresh the feature repository URI in the kar deployer
>
> Modified:
>    karaf/branches/karaf-2.2.x/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java
>
> Modified: karaf/branches/karaf-2.2.x/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java
> URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.2.x/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java?rev=1305766&r1=1305765&r2=1305766&view=diff
> ==============================================================================
> --- karaf/branches/karaf-2.2.x/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java
(original)
> +++ karaf/branches/karaf-2.2.x/deployer/kar/src/main/java/org/apache/karaf/deployer/kar/KarArtifactInstaller.java
Tue Mar 27 07:59:27 2012
> @@ -18,7 +18,19 @@
>  */
>  package org.apache.karaf.deployer.kar;
>
> -import java.io.BufferedOutputStream;
> +import org.apache.felix.fileinstall.ArtifactInstaller;
> +import org.apache.karaf.features.Feature;
> +import org.apache.karaf.features.FeaturesService;
> +import org.apache.karaf.features.Repository;
> +import org.slf4j.Logger;
> +import org.slf4j.LoggerFactory;
> +import org.w3c.dom.Document;
> +import org.xml.sax.ErrorHandler;
> +import org.xml.sax.SAXException;
> +import org.xml.sax.SAXParseException;
> +
> +import javax.xml.parsers.DocumentBuilder;
> +import javax.xml.parsers.DocumentBuilderFactory;
>  import java.io.File;
>  import java.io.FileOutputStream;
>  import java.io.IOException;
> @@ -31,20 +43,6 @@ import java.util.List;
>  import java.util.zip.ZipEntry;
>  import java.util.zip.ZipFile;
>
> -import javax.xml.parsers.DocumentBuilder;
> -import javax.xml.parsers.DocumentBuilderFactory;
> -
> -import org.apache.felix.fileinstall.ArtifactInstaller;
> -import org.apache.karaf.features.Feature;
> -import org.apache.karaf.features.FeaturesService;
> -import org.apache.karaf.features.Repository;
> -import org.slf4j.Logger;
> -import org.slf4j.LoggerFactory;
> -import org.w3c.dom.Document;
> -import org.xml.sax.ErrorHandler;
> -import org.xml.sax.SAXException;
> -import org.xml.sax.SAXParseException;
> -
>  public class KarArtifactInstaller implements ArtifactInstaller {
>
>     public static final String FEATURES_CLASSIFIER = "features";
> @@ -262,6 +260,7 @@ public class KarArtifactInstaller implem
>        private void addToFeaturesRepositories(URI uri)  {
>         // URI mvnUri = pathToMvnUri(path);
>                try {
> +            featuresService.removeRepository(uri);
>                        featuresService.addRepository(uri);
>             logger.info("Added feature repository '{}'.", uri);
>                } catch (Exception e) {
>
>

Mime
View raw message