From e9197ede6a2475ec49d5d6604f761653c110d3c7 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Fri, 10 Oct 2014 19:59:54 +0200 Subject: [PATCH] moved scm-plugin-archetype to its own repository at https://bitbucket.org/sdorra/scm-plugin-archetype --- scm-maven-plugins/pom.xml | 3 +- .../scm-plugin-archetype/pom.xml | 17 --- .../META-INF/maven/archetype-metadata.xml | 75 ------------- .../resources/META-INF/maven/archetype.xml | 57 ---------- .../resources/archetype-resources/pom.xml | 65 ----------- .../src/main/conf/logging.xml | 58 ---------- .../src/main/java/HelloResource.java | 103 ------------------ .../main/resources/META-INF/scm/plugin.xml | 57 ---------- .../src/main/resources/scm/sample.hello.js | 67 ------------ 9 files changed, 1 insertion(+), 501 deletions(-) delete mode 100644 scm-maven-plugins/scm-plugin-archetype/pom.xml delete mode 100644 scm-maven-plugins/scm-plugin-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml delete mode 100644 scm-maven-plugins/scm-plugin-archetype/src/main/resources/META-INF/maven/archetype.xml delete mode 100644 scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/pom.xml delete mode 100644 scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/conf/logging.xml delete mode 100644 scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/java/HelloResource.java delete mode 100644 scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/scm/plugin.xml delete mode 100644 scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/resources/scm/sample.hello.js diff --git a/scm-maven-plugins/pom.xml b/scm-maven-plugins/pom.xml index bdac48db28..9a6d4b4d19 100644 --- a/scm-maven-plugins/pom.xml +++ b/scm-maven-plugins/pom.xml @@ -16,8 +16,7 @@ scm-maven-plugins - scm-plugin-archetype scm-annotation-processor - \ No newline at end of file + diff --git a/scm-maven-plugins/scm-plugin-archetype/pom.xml b/scm-maven-plugins/scm-plugin-archetype/pom.xml deleted file mode 100644 index 55a2618ce5..0000000000 --- a/scm-maven-plugins/scm-plugin-archetype/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - 4.0.0 - - - scm-maven-plugins - sonia.scm.maven - 2.0.0-SNAPSHOT - - - sonia.scm.maven - scm-plugin-archetype - 2.0.0-SNAPSHOT - scm-plugin-archetype - - diff --git a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/scm-maven-plugins/scm-plugin-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml deleted file mode 100644 index 0c48b37583..0000000000 --- a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - src/main/java - - **/*.java - - - - - src/main/resources - - **/*.xml - - - - - src/main/conf - - **/*.xml - - - - - src/main/resources - - **/*.js - - - - - \ No newline at end of file diff --git a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/META-INF/maven/archetype.xml b/scm-maven-plugins/scm-plugin-archetype/src/main/resources/META-INF/maven/archetype.xml deleted file mode 100644 index 92efdea7a6..0000000000 --- a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/META-INF/maven/archetype.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - scm-plugin - - - src/main/java/HelloResource.java - - - - src/main/resources/META-INF/scm/plugin.xml - src/main/resources/scm/sample.hello.js - src/main/conf/logging.xml - - - \ No newline at end of file diff --git a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/pom.xml b/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 78d56d1dc1..0000000000 --- a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ -#set($dollar = '$') - - - - 4.0.0 - - - scm-plugins - sonia.scm.plugins - 2.0.0-SNAPSHOT - - - ${groupId} - ${artifactId} - smp - ${version} - ${dollar}{project.artifactId} - plugin description - - - - - javax.servlet - servlet-api - ${servlet.version} - provided - - - - - - sonia.scm - scm-test - ${dollar}{project.parent.version} - test - - - - - - - - - sonia.scm.maven - smp-maven-plugin - 1.0.0-SNAPSHOT - - src/main/conf/logging.xml - - - - - - - - - - maven.scm-manager.org - scm-manager release repository - http://maven.scm-manager.org/nexus/content/groups/public - - - - - \ No newline at end of file diff --git a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/conf/logging.xml b/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/conf/logging.xml deleted file mode 100644 index 1466604231..0000000000 --- a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/conf/logging.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n - - - - - - - - - - - - - - - - - - diff --git a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/java/HelloResource.java b/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/java/HelloResource.java deleted file mode 100644 index b25f2da94e..0000000000 --- a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/java/HelloResource.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright (c) 2010, Sebastian Sdorra - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of SCM-Manager; nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * http://bitbucket.org/sdorra/scm-manager - * - */ - -package ${package}; - -//~--- non-JDK imports -------------------------------------------------------- - -import com.google.inject.Inject; - -import org.apache.shiro.SecurityUtils; -import org.apache.shiro.subject.Subject; - -import sonia.scm.SCMContext; -import sonia.scm.SCMContextProvider; -import sonia.scm.security.Role; - -//~--- JDK imports ------------------------------------------------------------ - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - -/** - * Sample RESTful WebService endpoint. - * This sample resource is available at /api/rest/hello - */ -@Path("hello") -public class HelloResource -{ - - /** - * Constructs a new HelloResource and injects all required dependencies. - * - * - * @param securityContextProvider SCM-Manager context - */ - @Inject - public HelloResource(SCMContextProvider context) - { - this.context = context; - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Returns a hello message - * - * - * @return hello message - */ - @GET - @Produces(MediaType.TEXT_PLAIN) - public String getHelloMessage() - { - Subject subject = SecurityUtils.getSubject(); - String username; - - if (subject.hasRole(Role.USER)) - { - username = (String) subject.getPrincipal(); - } - else - { - username = SCMContext.USER_ANONYMOUS; - } - - return "Hello " + username + " from SCM-Manager " + context.getVersion(); - } - - //~--- fields --------------------------------------------------------------- - - /** SCM-Manager context */ - private SCMContextProvider context; -} diff --git a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/scm/plugin.xml b/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/scm/plugin.xml deleted file mode 100644 index 19e5931f3e..0000000000 --- a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/scm/plugin.xml +++ /dev/null @@ -1,57 +0,0 @@ -#set($dollar = '$') - - - - - 2 - - - - - - - ${dollar}{project.parent.version} - - - - ${package} - - - - - - - diff --git a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/resources/scm/sample.hello.js b/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/resources/scm/sample.hello.js deleted file mode 100644 index 37e00add98..0000000000 --- a/scm-maven-plugins/scm-plugin-archetype/src/main/resources/archetype-resources/src/main/resources/scm/sample.hello.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2010, Sebastian Sdorra - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of SCM-Manager; nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * http://bitbucket.org/sdorra/scm-manager - * - */ - -function sayHello(){ - Ext.Ajax.request({ - url: restUrl + 'hello', - method: 'GET', - disableCaching: true, - success: function(response){ - var msg = response.responseText; - Ext.MessageBox.show({ - title: 'Hello Message', - msg: msg, - buttons: Ext.MessageBox.OK, - icon: Ext.MessageBox.INFO - }); - }, - failure: function(){ - Ext.MessageBox.show({ - title: 'Error', - msg: 'Could not display the hello message', - buttons: Ext.MessageBox.OK, - icon: Ext.MessageBox.ERROR - }); - } - }); -} - -loginCallbacks.push(function(){ - var navPanel = Ext.getCmp('navigationPanel'); - var count = navPanel.count() - 1; - navPanel.insertSection(count, { - title: 'Hello World', - items: [{ - label: 'Say Hello', - fn: sayHello - }] - }); -}); \ No newline at end of file