You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2011/08/25 17:04:30 UTC
svn commit: r1161595 [2/2] - in /karaf/sandbox/jbonofre/cave/trunk: ./
manual/ manual/src/ manual/src/main/ manual/src/main/webapp/
manual/src/main/webapp/WEB-INF/ manual/src/main/webapp/WEB-INF/scalate/
manual/src/main/webapp/WEB-INF/scalate/layouts/ ...
Modified: karaf/sandbox/jbonofre/cave/trunk/pom.xml
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/pom.xml?rev=1161595&r1=1161594&r2=1161595&view=diff
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/pom.xml (original)
+++ karaf/sandbox/jbonofre/cave/trunk/pom.xml Thu Aug 25 15:04:29 2011
@@ -118,6 +118,8 @@
</dependencies>
<build>
+ <defaultGoal>install</defaultGoal>
+
<pluginManagement>
<plugins>
<plugin>
@@ -126,6 +128,11 @@
<version>2.3.5</version>
<extensions>true</extensions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
@@ -138,7 +145,190 @@
<target>1.6</target>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-maven</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>[2.2.1,4)</version>
+ </requireMavenVersion>
+ <requireJavaVersion>
+ <version>[1.5,1.7]</version>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <resourceBundles>
+ <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
+ </resourceBundles>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>copy-notice</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <tasks>
+ <copy file="NOTICE" todir="target/maven-shared-archive-resources/META-INF" failonerror="false" overwrite="true"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>manual</id>
+ <modules>
+ <module>manual</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>release</id>
+ <modules>
+ <module>manual</module>
+ </modules>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-versions</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>[3,4)</version>
+ </requireMavenVersion>
+ <requireJavaVersion>
+ <version>1.6</version>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- We want to deploy the artifact to a staging location for perusal -->
+ <plugin>
+ <inherited>true</inherited>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
+ <updateReleaseInfo>true</updateReleaseInfo>
+ </configuration>
+ </plugin>
+ <!-- We want to sign the artifact, the POM, and all attached artifacts -->
+ <plugin>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-assemblies</id>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>deploy</id>
+ <properties>
+ <createSourcesJar>true</createSourcesJar>
+ </properties>
+ <build>
+ <defaultGoal>deploy</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.1.1</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <source>1.5</source>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
\ No newline at end of file
Modified: karaf/sandbox/jbonofre/cave/trunk/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepositoryService.java
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepositoryService.java?rev=1161595&r1=1161594&r2=1161595&view=diff
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepositoryService.java (original)
+++ karaf/sandbox/jbonofre/cave/trunk/server/api/src/main/java/org/apache/karaf/cave/server/api/CaveRepositoryService.java Thu Aug 25 15:04:29 2011
@@ -53,6 +53,7 @@ public interface CaveRepositoryService {
/**
* Destroy an existing Karaf Cave repository.
+ * Warning: destroy also remove the Karaf Cave repository storage.
*
* @param name the name of Karaf Cave repository to destroy.
* @throws Exception in case of destroy failure.
@@ -62,6 +63,15 @@ public interface CaveRepositoryService {
void destroy(String name) throws Exception;
/**
+ * Remove an existing Karaf Cave repository from the registry.
+ * NB: the Karaf Cave repository storage is not removed.
+ *
+ * @param name the name of Karaf Cave repository to remove.
+ * @throws Exception in case of remove failure.
+ */
+ void remove(String name) throws Exception;
+
+ /**
* Register a Karaf Cave repository into the OBR.
*
* @param name the name of the Karaf Cave repository.
Added: karaf/sandbox/jbonofre/cave/trunk/server/command/src/main/java/org/apache/karaf/cave/server/command/RemoveRepositoryCommand.java
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/server/command/src/main/java/org/apache/karaf/cave/server/command/RemoveRepositoryCommand.java?rev=1161595&view=auto
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/server/command/src/main/java/org/apache/karaf/cave/server/command/RemoveRepositoryCommand.java (added)
+++ karaf/sandbox/jbonofre/cave/trunk/server/command/src/main/java/org/apache/karaf/cave/server/command/RemoveRepositoryCommand.java Thu Aug 25 15:04:29 2011
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.karaf.cave.server.command;
+
+import org.apache.felix.gogo.commands.Argument;
+
+/**
+ * Remove a Karaf Cave repository from the repositories registry.
+ */
+public class RemoveRepositoryCommand extends CaveRepositoryCommandSupport {
+
+ @Argument(index = 0, name = "name", description = "The Karaf Cave repository name", required = true, multiValued = false)
+ String name = null;
+
+ protected Object doExecute() throws Exception {
+ getCaveRepositoryService().destroy(name);
+ return null;
+ }
+
+}
Modified: karaf/sandbox/jbonofre/cave/trunk/server/command/src/main/resources/OSGI-INF/blueprint/cave-server-commands.xml
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/server/command/src/main/resources/OSGI-INF/blueprint/cave-server-commands.xml?rev=1161595&r1=1161594&r2=1161595&view=diff
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/server/command/src/main/resources/OSGI-INF/blueprint/cave-server-commands.xml (original)
+++ karaf/sandbox/jbonofre/cave/trunk/server/command/src/main/resources/OSGI-INF/blueprint/cave-server-commands.xml Thu Aug 25 15:04:29 2011
@@ -32,6 +32,15 @@
<property name="caveRepositoryService" ref="caveRepositoryService"/>
</action>
</command>
+ <command name="cave/remove-repository">
+ <action class="org.apache.karaf.cave.server.command.RemoveRepositoryCommand">
+ <property name="caveRepositoryService" ref="caveRepositoryService"/>
+ </action>
+ <completers>
+ <ref component-id="repositoryCompleter"/>
+ <null/>
+ </completers>
+ </command>
<command name="cave/destroy-repository">
<action class="org.apache.karaf.cave.server.command.DestroyRepositoryCommand">
<property name="caveRepositoryService" ref="caveRepositoryService"/>
Modified: karaf/sandbox/jbonofre/cave/trunk/server/storage/src/main/java/org/apache/karaf/cave/server/storage/CaveRepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/karaf/sandbox/jbonofre/cave/trunk/server/storage/src/main/java/org/apache/karaf/cave/server/storage/CaveRepositoryServiceImpl.java?rev=1161595&r1=1161594&r2=1161595&view=diff
==============================================================================
--- karaf/sandbox/jbonofre/cave/trunk/server/storage/src/main/java/org/apache/karaf/cave/server/storage/CaveRepositoryServiceImpl.java (original)
+++ karaf/sandbox/jbonofre/cave/trunk/server/storage/src/main/java/org/apache/karaf/cave/server/storage/CaveRepositoryServiceImpl.java Thu Aug 25 15:04:29 2011
@@ -82,6 +82,19 @@ public class CaveRepositoryServiceImpl i
}
/**
+ * Remove a Karaf Cave repository from the repositories registry.
+ *
+ * @param name the name of Karaf Cave repository to remove.
+ * @throws Exception in case of remove failure.
+ */
+ public synchronized void remove(String name) throws Exception {
+ CaveRepository repository = this.getRepository(name);
+ if (repository != null) {
+ repositories.remove(name);
+ }
+ }
+
+ /**
* Destroy a Karaf Cave repository.
*
* @param name the name of Karaf Cave repository to destroy.