You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2007/09/03 23:07:36 UTC
svn commit: r572422 - in /geronimo/sandbox/gshell/trunk: ./ gshell-layout/
gshell-layout/src/main/mdo/
gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/
gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/
gshell-layout/src...
Author: jdillon
Date: Mon Sep 3 14:07:35 2007
New Revision: 572422
URL: http://svn.apache.org/viewvc?rev=572422&view=rev
Log:
Starting to add command layout support using modello to handle the xml bits, whipped up first draft of the layout.xml syntax, will probs change ;-)
Added:
geronimo/sandbox/gshell/trunk/gshell-layout/src/main/mdo/
geronimo/sandbox/gshell/trunk/gshell-layout/src/main/mdo/layout.mdo
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/BasicModelValidationTest.java (with props)
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/model/
geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/model/layout1.xml (with props)
Modified:
geronimo/sandbox/gshell/trunk/gshell-layout/pom.xml
geronimo/sandbox/gshell/trunk/pom.xml
Modified: geronimo/sandbox/gshell/trunk/gshell-layout/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-layout/pom.xml?rev=572422&r1=572421&r2=572422&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-layout/pom.xml (original)
+++ geronimo/sandbox/gshell/trunk/gshell-layout/pom.xml Mon Sep 3 14:07:35 2007
@@ -21,28 +21,72 @@
<!-- $Rev$ $Date$ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
+
<modelVersion>4.0.0</modelVersion>
-
+
<parent>
<groupId>org.apache.geronimo.gshell</groupId>
<artifactId>gshell</artifactId>
<version>1.0-alpha-1-SNAPSHOT</version>
</parent>
-
+
<artifactId>gshell-layout</artifactId>
<name>GShell Layout</name>
-
+
<description>
- Provides the GShell layout abstraction muck.
+ Provides the GShell comamnd filesystem-like layout.
</description>
-
+
<dependencies>
<dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <configuration>
+ <version>1.0.0</version>
+ <packageWithVersion>false</packageWithVersion>
+ </configuration>
+ <executions>
+ <execution>
+ <id>layout</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>xpp3-reader</goal>
+ <goal>xpp3-writer</goal>
+ <goal>java</goal>
+ <goal>xsd</goal>
+ </goals>
+ <configuration>
+ <model>src/main/mdo/layout.mdo</model>
+ </configuration>
+ </execution>
+ <execution>
+ <id>layout-site</id>
+ <phase>pre-site</phase>
+ <goals>
+ <goal>xdoc</goal>
+ <goal>xsd</goal>
+ </goals>
+ <configuration>
+ <model>src/main/mdo/layout.mdo</model>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: geronimo/sandbox/gshell/trunk/gshell-layout/src/main/mdo/layout.mdo
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-layout/src/main/mdo/layout.mdo?rev=572422&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-layout/src/main/mdo/layout.mdo (added)
+++ geronimo/sandbox/gshell/trunk/gshell-layout/src/main/mdo/layout.mdo Mon Sep 3 14:07:35 2007
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<!-- $Rev: 571641 $ $Date: 2007-08-31 16:02:14 -0700 (Fri, 31 Aug 2007) $ -->
+
+<model>
+ <id>layout</id>
+ <name>Layout</name>
+ <description>
+ Contains the definition of a command/filesystem-like layout.
+ </description>
+
+ <defaults>
+ <default>
+ <key>package</key>
+ <value>org.apache.geronimo.gshell.layout.model</value>
+ </default>
+ </defaults>
+
+ <classes>
+ <!--
+ FIXME: This should be abstract, but Modello generates things like "new Node();" in teh xpp3 stuff :-(
+
+ <class java.abstract="true">
+ -->
+ <class>
+ <name>Node</name>
+ <version>1.0.0+</version>
+ <description>
+ Support for layout nodes
+ </description>
+ <fields>
+ <field>
+ <name>groups</name>
+ <version>1.0.0+</version>
+ <description>
+ </description>
+ <association>
+ <type>Group</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+
+ <field>
+ <name>commands</name>
+ <version>1.0.0+</version>
+ <description>
+ </description>
+ <association>
+ <type>Command</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+
+ <field>
+ <name>aliases</name>
+ <version>1.0.0+</version>
+ <description>
+ </description>
+ <association>
+ <type>Alias</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class rootElement="true" xml.tagName="layout">
+ <name>Layout</name>
+ <superClass>Node</superClass>
+ <version>1.0.0+</version>
+ <description>
+ The root node of the layout.
+ </description>
+ </class>
+
+ <class>
+ <name>Group</name>
+ <superClass>Node</superClass>
+ <version>1.0.0+</version>
+ <description>
+ Provides a grouping mechanism for layout nodes.
+ </description>
+ </class>
+
+ <class>
+ <name>Command</name>
+ <version>1.0.0+</version>
+ <description>
+ Defines a command node (kinda like a file).
+ </description>
+ <fields>
+ <field>
+ <name>name</name>
+ <version>1.0.0+</version>
+ <description>
+ </description>
+ <type>String</type>
+ </field>
+
+ <field>
+ <name>implementation</name>
+ <version>1.0.0+</version>
+ <description>
+ </description>
+ <type>String</type>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>Alias</name>
+ <version>1.0.0+</version>
+ <description>
+ Define a command alias node (kinda like a symlink).
+ </description>
+ <fields>
+ <field>
+ <name>name</name>
+ <version>1.0.0+</version>
+ <description>
+ </description>
+ <type>String</type>
+ </field>
+
+ <field>
+ <name>command</name>
+ <version>1.0.0+</version>
+ <description>
+ </description>
+ <type>String</type>
+ </field>
+ </fields>
+ </class>
+ </classes>
+</model>
+
Added: geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/BasicModelValidationTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/BasicModelValidationTest.java?rev=572422&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/BasicModelValidationTest.java (added)
+++ geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/BasicModelValidationTest.java Mon Sep 3 14:07:35 2007
@@ -0,0 +1,43 @@
+/*
+ * 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.geronimo.gshell.layout.model;
+
+import junit.framework.TestCase;
+import org.apache.geronimo.gshell.layout.model.io.xpp3.LayoutXpp3Reader;
+
+/**
+ * Basic validation of the layout model muck.
+ *
+ * @version $Rev$ $Date$
+ */
+public class BasicModelValidationTest
+ extends TestCase
+{
+ LayoutXpp3Reader reader;
+
+ protected void setUp() throws Exception {
+ reader = new LayoutXpp3Reader();
+ }
+
+ public void testReadLayout1() throws Exception {
+ Layout layout = reader.read(getClass().getResourceAsStream("layout1.xml"), true);
+ assertNotNull(layout);
+ }
+}
Propchange: geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/BasicModelValidationTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/BasicModelValidationTest.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/sandbox/gshell/trunk/gshell-layout/src/test/java/org/apache/geronimo/gshell/layout/model/BasicModelValidationTest.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/model/layout1.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/model/layout1.xml?rev=572422&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/model/layout1.xml (added)
+++ geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/model/layout1.xml Mon Sep 3 14:07:35 2007
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<layout>
+
+</layout>
\ No newline at end of file
Propchange: geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/model/layout1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/model/layout1.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/sandbox/gshell/trunk/gshell-layout/src/test/resources/org/apache/geronimo/gshell/layout/model/layout1.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: geronimo/sandbox/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/pom.xml?rev=572422&r1=572421&r2=572422&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/pom.xml (original)
+++ geronimo/sandbox/gshell/trunk/pom.xml Mon Sep 3 14:07:35 2007
@@ -224,6 +224,12 @@
</plugin>
<plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <version>1.0-alpha-17</version>
+ </plugin>
+
+ <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.0</version>