Index: archetypes/command-archetype/src/test/resources/projects/basic/archetype.properties =================================================================== --- archetypes/command-archetype/src/test/resources/projects/basic/archetype.properties (revision 0) +++ archetypes/command-archetype/src/test/resources/projects/basic/archetype.properties (revision 0) @@ -0,0 +1,7 @@ +#Mon Jul 19 10:12:55 EEST 2010 +version=0.1-SNAPSHOT +groupId=archetype.it +artifactId=basic +scope=scp +command=cmd +description=Test Command Index: archetypes/command-archetype/src/test/resources/projects/basic/goal.txt =================================================================== Index: archetypes/command-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml =================================================================== --- archetypes/command-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml (revision 0) +++ archetypes/command-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml (revision 0) @@ -0,0 +1,43 @@ + + + + + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.xml + **/*.properties + + + + src/test/java + + **/*.java + + + + + + pom.xml + + + + + + NOTICE + + + + Index: archetypes/command-archetype/src/main/resources/archetype-resources/NOTICE =================================================================== --- archetypes/command-archetype/src/main/resources/archetype-resources/NOTICE (revision 0) +++ archetypes/command-archetype/src/main/resources/archetype-resources/NOTICE (revision 0) @@ -0,0 +1,21 @@ +Apache Felix Karaf +Copyright 2010 The Apache Software Foundation + + +I. Included Software + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). +Licensed under the Apache License 2.0. + + +II. Used Software + +This product uses software developed at +The OSGi Alliance (http://www.osgi.org/). +Copyright (c) OSGi Alliance (2000, 2010). +Licensed under the Apache License 2.0. + + +III. License Summary +- Apache License 2.0 Index: archetypes/command-archetype/src/main/resources/archetype-resources/src/test/java/__command__Test.java =================================================================== --- archetypes/command-archetype/src/main/resources/archetype-resources/src/test/java/__command__Test.java (revision 0) +++ archetypes/command-archetype/src/main/resources/archetype-resources/src/test/java/__command__Test.java (revision 0) @@ -0,0 +1,46 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}; + + +import junit.framework.TestCase; + +/** + * Test cases for {@link ${command}} + */ +@SuppressWarnings("unchecked") +public class ${command}Test extends TestCase { + + private ${command} command; + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + public void testCommand() { + + } +} Index: archetypes/command-archetype/src/main/resources/archetype-resources/src/main/java/__command__.java =================================================================== --- archetypes/command-archetype/src/main/resources/archetype-resources/src/main/java/__command__.java (revision 0) +++ archetypes/command-archetype/src/main/resources/archetype-resources/src/main/java/__command__.java (revision 0) @@ -0,0 +1,36 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +#set( $cmd = $command.toLowerCase()) +/* + * 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 ${package}; + +import org.apache.felix.gogo.commands.Command; +import org.apache.karaf.shell.console.OsgiCommandSupport; + + +/** + * Displays the last log entries + */ +@Command(scope = "${scope}", name = "${cmd}", description = "${description}") +public class ${command} extends OsgiCommandSupport { + + protected Object doExecute() throws Exception { + return null; + } +} Index: archetypes/command-archetype/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/shell-log.xml =================================================================== --- archetypes/command-archetype/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/shell-log.xml (revision 0) +++ archetypes/command-archetype/src/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/shell-log.xml (revision 0) @@ -0,0 +1,33 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +#set( $cmd = $command.toLowerCase()) + + + + + + + + + + + Index: archetypes/command-archetype/src/main/resources/archetype-resources/pom.xml =================================================================== --- archetypes/command-archetype/src/main/resources/archetype-resources/pom.xml (revision 0) +++ archetypes/command-archetype/src/main/resources/archetype-resources/pom.xml (revision 0) @@ -0,0 +1,82 @@ + + + + + + 4.0.0 + + + org.apache.karaf.shell + shell + 1.99.0-SNAPSHOT + + + ${groupId} + ${artifactId} + bundle + ${version} + Apache Karaf :: Shell ${scope} Commands + + Provides the OSGi ${scope} commands + + + ${basedir}/../../etc/appended-resources + + + + + org.apache.karaf.shell + org.apache.karaf.shell.console + + + + org.apache.felix + org.osgi.core + provided + + + + org.apache.felix + org.osgi.compendium + provided + + + + + + + org.apache.felix + maven-bundle-plugin + + + ${project.artifactId} + ${package}*;version=${project.version} + !${project.artifactId}*, + org.osgi.service.command, + org.apache.felix.gogo.commands, + org.apache.karaf.shell.console, + * + !* + <_versionpolicy>${bnd.version.policy} + + + + + + Index: archetypes/command-archetype/pom.xml =================================================================== --- archetypes/command-archetype/pom.xml (revision 0) +++ archetypes/command-archetype/pom.xml (revision 0) @@ -0,0 +1,43 @@ + + + 4.0.0 + + org.apache.karaf.shell + org.apache.karaf.shell.command.archetype + 1.99.0-SNAPSHOT + + Apache Karaf :: Command Archetype + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-5 + + + + + + + maven-archetype-plugin + 2.0-alpha-5 + true + + + + + + + + apache.releases.https + Apache Release Distribution Repository + https://repository.apache.org/service/local/staging/deploy/maven2 + + + apache.snapshots.https + Apache Development Snapshot Repository + https://repository.apache.org/content/repositories/snapshots + + +