karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject karaf git commit: [KARAF-4006] karaf-maven-plugin does not seem to use the local repository
Date Tue, 29 Sep 2015 10:05:02 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 266e1da60 -> f2f355ff7


[KARAF-4006] karaf-maven-plugin does not seem to use the local repository

Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/f2f355ff
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/f2f355ff
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/f2f355ff

Branch: refs/heads/master
Commit: f2f355ff7120ad8441706a6847266d7381b0a060
Parents: 266e1da
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Tue Sep 29 12:04:53 2015 +0200
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Tue Sep 29 12:04:53 2015 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/karaf/profile/assembly/Builder.java   | 6 ++++++
 .../src/main/java/org/apache/karaf/tooling/AssemblyMojo.java   | 1 +
 .../src/main/java/org/apache/karaf/tooling/VerifyMojo.java     | 3 +++
 3 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/f2f355ff/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
index dd0e623..4a4def2 100644
--- a/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
+++ b/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java
@@ -147,6 +147,7 @@ public class Builder {
     int defaultStartLevel = 50;
     Path homeDirectory;
     boolean offline;
+    String localRepository;
 
     private ScheduledExecutorService executor;
     private DownloadManager manager;
@@ -306,6 +307,11 @@ public class Builder {
         return offline(true);
     }
 
+    public Builder localRepository(String localRepository) {
+        this.localRepository = localRepository;
+        return this;
+    }
+
     public Builder staticFramework() {
         // TODO: load this from resources
         return staticFramework("4.0.0-SNAPSHOT");

http://git-wip-us.apache.org/repos/asf/karaf/blob/f2f355ff/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java
index eb3381d..43ac257 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java
@@ -211,6 +211,7 @@ public class AssemblyMojo extends MojoSupport {
 
         Builder builder = Builder.newInstance();
         builder.offline(mavenSession.isOffline());
+        builder.localRepository(localRepo.getBasedir());
         builder.javase(javase);
 
         // Set up blacklisted items

http://git-wip-us.apache.org/repos/asf/karaf/blob/f2f355ff/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java
index db8a9c5..be61268 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java
@@ -82,10 +82,12 @@ import org.apache.karaf.util.config.PropertiesLoader;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.settings.Settings;
 import org.ops4j.pax.url.mvn.MavenResolver;
 import org.ops4j.pax.url.mvn.MavenResolvers;
 import org.osgi.framework.Bundle;
@@ -166,6 +168,7 @@ public class VerifyMojo extends MojoSupport {
         }
         getLog().info("Using repositories: " + remote.toString());
         config.put("maven.repositories", remote.toString());
+        config.put("maven.localRepository", localRepo.getBasedir());
         // TODO: add more configuration bits ?
         resolver = MavenResolvers.createMavenResolver(config, "maven");
         doExecute();


Mime
View raw message