shale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvanma...@apache.org
Subject svn commit: r472721 - in /shale: framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/utils/ framework/trunk/shale-clay/src/main/resources/org/apache/shale/clay/ framework/trunk/shale-clay/src/test/java/org/apache/shale/clay/utils/ maven/trun...
Date Thu, 09 Nov 2006 00:45:26 GMT
Author: gvanmatre
Date: Wed Nov  8 16:45:25 2006
New Revision: 472721

URL: http://svn.apache.org/viewvc?view=rev&rev=472721
Log:
Introducing a new Clay utility that will convert a JSF TLD into a corresponding Clay configuration file.  It is donated by Hermod Opstvedt (SHALE-324).  The tool jar project will be located in a top-level tools folder.  The maven plugin and testbed projects located under the existing maven folder.  This tools supersedes commit   (http://svn.apache.org/viewvc?view=rev&revision=468624).

Added:
    shale/maven/trunk/tld2claycfg/
    shale/maven/trunk/tld2claycfg/mojo/
    shale/maven/trunk/tld2claycfg/mojo/pom.xml   (with props)
    shale/maven/trunk/tld2claycfg/mojo/src/
    shale/maven/trunk/tld2claycfg/mojo/src/main/
    shale/maven/trunk/tld2claycfg/mojo/src/main/java/
    shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/
    shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/
    shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/
    shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld.java   (with props)
    shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld2ClayCfgMojo.java   (with props)
    shale/maven/trunk/tld2claycfg/test/
    shale/maven/trunk/tld2claycfg/test/pom.xml   (with props)
    shale/maven/trunk/tld2claycfg/test/src/
    shale/maven/trunk/tld2claycfg/test/src/main/
    shale/maven/trunk/tld2claycfg/test/src/main/java/
    shale/maven/trunk/tld2claycfg/test/src/main/java/org/
    shale/maven/trunk/tld2claycfg/test/src/main/java/org/apache/
    shale/maven/trunk/tld2claycfg/test/src/main/java/org/apache/shale/
    shale/maven/trunk/tld2claycfg/test/src/main/java/org/apache/shale/Something.java   (with props)
    shale/tools/
    shale/tools/trunk/
    shale/tools/trunk/tld2claycfg/
    shale/tools/trunk/tld2claycfg/pom.xml   (with props)
    shale/tools/trunk/tld2claycfg/src/
    shale/tools/trunk/tld2claycfg/src/main/
    shale/tools/trunk/tld2claycfg/src/main/java/
    shale/tools/trunk/tld2claycfg/src/main/java/org/
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/Messages.java   (with props)
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/TldToClayconfig.java   (with props)
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Attribute.java   (with props)
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Listener.java   (with props)
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Tag.java   (with props)
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Taglib.java   (with props)
    shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Variable.java   (with props)
    shale/tools/trunk/tld2claycfg/src/main/resources/
    shale/tools/trunk/tld2claycfg/src/main/resources/messages.properties   (with props)
Removed:
    shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/utils/TldDigester.java
    shale/framework/trunk/shale-clay/src/test/java/org/apache/shale/clay/utils/TldDigesterTestCase.java
Modified:
    shale/framework/trunk/shale-clay/src/main/resources/org/apache/shale/clay/Bundle.properties

Modified: shale/framework/trunk/shale-clay/src/main/resources/org/apache/shale/clay/Bundle.properties
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-clay/src/main/resources/org/apache/shale/clay/Bundle.properties?view=diff&rev=472721&r1=472720&r2=472721
==============================================================================
--- shale/framework/trunk/shale-clay/src/main/resources/org/apache/shale/clay/Bundle.properties (original)
+++ shale/framework/trunk/shale-clay/src/main/resources/org/apache/shale/clay/Bundle.properties Wed Nov  8 16:45:25 2006
@@ -158,8 +158,5 @@
 #org.apache.shale.clay.taglib.SymbolTag
 clayparent.notfound=The symbol tag must be nested under a clay tag.
 
-#org.apache.shale.clay.utils.TldParserUtil
-tag.load.error=Unable to load tag handler "{0}" with the class name of "{1}".
-
 #org.apache.shale.clay.convert.StringArrayConverter
-string.array.converter.invalid.type=Value is not a String[]
\ No newline at end of file
+string.array.converter.invalid.type=Value is not a String[]

Added: shale/maven/trunk/tld2claycfg/mojo/pom.xml
URL: http://svn.apache.org/viewvc/shale/maven/trunk/tld2claycfg/mojo/pom.xml?view=auto&rev=472721
==============================================================================
--- shale/maven/trunk/tld2claycfg/mojo/pom.xml (added)
+++ shale/maven/trunk/tld2claycfg/mojo/pom.xml Wed Nov  8 16:45:25 2006
@@ -0,0 +1,54 @@
+<?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.
+ *
+ * $Id$
+ */
+-->
+<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>
+	<groupId>org.apache.shale</groupId>
+	<artifactId>Tld2ClayCfgMojo</artifactId>
+	<packaging>maven-plugin</packaging>
+	<version>1.0-SNAPSHOT</version>
+	<name>Tld to Clay config converter</name>
+	<description>
+		A plugin that generates Clay config files from .tld files
+	</description>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-project</artifactId>
+			<version>2.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-plugin-api</artifactId>
+			<version>2.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.shale</groupId>
+			<artifactId>Tld2ClayCfg</artifactId>
+			<version>1.0-SNAPSHOT</version>
+		</dependency>
+	</dependencies>
+
+</project>
\ No newline at end of file

Propchange: shale/maven/trunk/tld2claycfg/mojo/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/maven/trunk/tld2claycfg/mojo/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld.java
URL: http://svn.apache.org/viewvc/shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld.java?view=auto&rev=472721
==============================================================================
--- shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld.java (added)
+++ shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,55 @@
+package org.apache.shale;
+
+/*
+ * 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.
+ */
+
+public class Tld {
+
+    private String name;
+
+    private String version;
+
+    private String mbFilter;
+
+    public String getMbFilter() {
+        return mbFilter;
+    }
+
+    public void setMbFilter(String mbFilter) {
+        this.mbFilter = mbFilter;
+    }
+
+    public Tld() {
+
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+}

Propchange: shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld2ClayCfgMojo.java
URL: http://svn.apache.org/viewvc/shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld2ClayCfgMojo.java?view=auto&rev=472721
==============================================================================
--- shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld2ClayCfgMojo.java (added)
+++ shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld2ClayCfgMojo.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,139 @@
+package org.apache.shale;
+
+/*
+ * 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.
+ */
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.List;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.shale.clay.util.TldToClayconfig;
+
+/**
+ * @requiresDependencyResolution runtime
+ * @phase generate-resources
+ * @goal convert
+ * @Description JSF Tld to Clay config converter.
+ */
+public class Tld2ClayCfgMojo extends AbstractMojo {
+
+    /**
+     * @parameter property="tlds"
+     * @required
+     * @description The typelibaries that shoul be converted
+     */
+    private List tlds;
+
+    /**
+     * @parameter default-value="${project.build.directory}"
+     * @description Where to place the generated Clay config files
+     */
+    private String buildDirectory;
+
+    /**
+     * @parameter expression="${project}"
+     * @description The Maven POM
+     */
+    private MavenProject project;
+
+    public void execute() throws MojoExecutionException, MojoFailureException {
+
+        ClassLoader classloader = null;
+        try {
+            classloader = initClassLoader();
+        } catch (Exception e) {
+            throw new MojoFailureException(e.getMessage());
+        }
+
+        getLog().info("Generate resources in " + buildDirectory);
+        getLog().info("Got: " + tlds.size() + " tlds");
+        TldToClayconfig converter = new TldToClayconfig();
+        TldToClayconfig.setLOGGER(getLog());
+        for (int i = 0; i < tlds.size(); i++) {
+            getLog().info("Converting: " + ((Tld) tlds.get(i)).getName());
+            converter.setFilename(((Tld) tlds.get(i)).getName());
+            converter.setVersion(((Tld) tlds.get(i)).getVersion());
+            converter.setMbFilter(((Tld) tlds.get(i)).getMbFilter());
+            converter.setDestPath(buildDirectory
+                    + System.getProperty("file.separator") + "classes"
+                    + System.getProperty("file.separator") + "META-INF");
+            converter.setClassloader(classloader);
+            try {
+                converter.convert();
+            } catch (Exception e) {
+                throw new MojoFailureException(e.getMessage());
+            }
+        }
+
+    }
+
+    public List getTlds() {
+        return tlds;
+    }
+
+    public void setTlds(List tlds) {
+        this.tlds = tlds;
+    }
+
+    public String getBuildDirectory() {
+        return buildDirectory;
+    }
+
+    public void setBuildDirectory(String buildDirectory) {
+        this.buildDirectory = buildDirectory;
+    }
+
+    public MavenProject getProject() {
+        return project;
+    }
+
+    public void setProject(MavenProject project) {
+        this.project = project;
+    }
+
+    // Private methods
+    private ClassLoader initClassLoader() throws Exception {
+        List classpathFiles = project.getCompileClasspathElements();
+
+        URL[] urls = new URL[classpathFiles.size() + 1];
+
+        if (getLog().isDebugEnabled()) {
+            getLog().debug(
+                    "Number of files in classpath: " + classpathFiles.size());
+        }
+
+        for (int i = 0; i < classpathFiles.size(); ++i) {
+            if (getLog().isDebugEnabled()) {
+                getLog().debug((String) classpathFiles.get(i));
+            }
+            urls[i] = new File((String) classpathFiles.get(i)).toURL();
+        }
+
+        urls[classpathFiles.size()] = new File(buildDirectory + "/classes")
+                .toURL();
+
+        URLClassLoader ucl = new URLClassLoader(urls, Thread.currentThread()
+                .getContextClassLoader());
+
+        return (ClassLoader) ucl;
+
+    }
+}

Propchange: shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld2ClayCfgMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/maven/trunk/tld2claycfg/mojo/src/main/java/org/apache/shale/Tld2ClayCfgMojo.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/maven/trunk/tld2claycfg/test/pom.xml
URL: http://svn.apache.org/viewvc/shale/maven/trunk/tld2claycfg/test/pom.xml?view=auto&rev=472721
==============================================================================
--- shale/maven/trunk/tld2claycfg/test/pom.xml (added)
+++ shale/maven/trunk/tld2claycfg/test/pom.xml Wed Nov  8 16:45:25 2006
@@ -0,0 +1,106 @@
+<?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.
+ *
+ * $Id$
+ */
+-->
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.shale</groupId>
+  <artifactId>TestMojo</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <description></description>
+  <build>
+    <resources>
+      <resource>
+        <targetPath>${project.build.outputDirectory}/META-INF</targetPath>
+        <directory>${project.build.outputDirectory}/src/main/resources/META-INF</directory>
+        <includes>
+          <include>**/*.xml</include>
+        </includes>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.shale</groupId>
+        <artifactId>Tld2ClayCfgMojo</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>convert tld</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>convert</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <tlds>
+            <tld implementation="org.apache.shale.Tld">
+              <name>META-INF/tomahawk.tld</name>
+              <version>1.1.3-SNAPSHOT</version>
+              <mbFilter>(?i).*Listener*,(?i).*validator*,(?i).*converter*,(?i).*action*</mbFilter>
+            </tld>
+            <tld implementation="org.apache.shale.Tld">
+              <name>META-INF/myfaces_sandbox.tld</name>
+              <version>1.1.4-SNAPSHOT</version>
+              <mbFilter>(?i).*Listener*,(?i).*validator*,(?i).*converter*,(?i).*action*</mbFilter>
+            </tld>
+            <tld implementation="org.apache.shale.Tld">
+              <name>META-INF/org/apache/myfaces/tobago/taglib/component/tobago.tld</name>
+              <version>1.1.9-SNAPSHOT</version>
+              <mbFilter>(?i).*Listener*,(?i).*validator*,(?i).*converter*,(?i).*action*</mbFilter>
+            </tld>
+            <tld implementation="org.apache.shale.Tld">
+              <name>META-INF/tr.tld</name>
+              <version>incubator-m1-SNAPSHOT</version>
+              <mbFilter>(?i).*Listener*,(?i).*validator*,(?i).*converter*,(?i).*action*</mbFilter>
+            </tld>
+            <tld implementation="org.apache.shale.Tld">
+              <name>META-INF/trh.tld</name>
+              <version>incubator-m1-SNAPSHOT</version>
+              <mbFilter>(?i).*Listener*,(?i).*validator*,(?i).*converter*,(?i).*action*</mbFilter>
+            </tld>
+          </tlds>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.myfaces.trinidad</groupId>
+      <artifactId>trinidad-impl</artifactId>
+      <version>incubator-m1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.myfaces.tomahawk</groupId>
+      <artifactId>tomahawk</artifactId>
+      <version>1.1.3-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.myfaces.tomahawk</groupId>
+      <artifactId>tomahawk-sandbox</artifactId>
+      <version>1.1.4-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.myfaces.tobago</groupId>
+      <artifactId>tobago-core</artifactId>
+      <version>1.0.8</version>
+    </dependency>
+  </dependencies>
+</project>

Propchange: shale/maven/trunk/tld2claycfg/test/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/maven/trunk/tld2claycfg/test/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/maven/trunk/tld2claycfg/test/src/main/java/org/apache/shale/Something.java
URL: http://svn.apache.org/viewvc/shale/maven/trunk/tld2claycfg/test/src/main/java/org/apache/shale/Something.java?view=auto&rev=472721
==============================================================================
--- shale/maven/trunk/tld2claycfg/test/src/main/java/org/apache/shale/Something.java (added)
+++ shale/maven/trunk/tld2claycfg/test/src/main/java/org/apache/shale/Something.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,9 @@
+package org.apache.shale;
+
+public class Something {
+
+    public Something() {
+
+    }
+
+}

Propchange: shale/maven/trunk/tld2claycfg/test/src/main/java/org/apache/shale/Something.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/maven/trunk/tld2claycfg/test/src/main/java/org/apache/shale/Something.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/tools/trunk/tld2claycfg/pom.xml
URL: http://svn.apache.org/viewvc/shale/tools/trunk/tld2claycfg/pom.xml?view=auto&rev=472721
==============================================================================
--- shale/tools/trunk/tld2claycfg/pom.xml (added)
+++ shale/tools/trunk/tld2claycfg/pom.xml Wed Nov  8 16:45:25 2006
@@ -0,0 +1,78 @@
+<?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.
+ *
+ * $Id:$
+ */
+-->
+<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>
+	<groupId>org.apache.shale</groupId>
+	<artifactId>Tld2ClayCfg</artifactId>
+	<version>1.0-SNAPSHOT</version>
+	<name>Tld to Clay config converter</name>
+	<description>Converts JSF tld's to Clay config files</description>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.maven</groupId>
+			<artifactId>maven-plugin-api</artifactId>
+			<version>2.0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>stax</groupId>
+			<artifactId>stax</artifactId>
+			<version>1.2.0</version>
+		</dependency>
+		<dependency>
+			<groupId>stax</groupId>
+			<artifactId>stax-api</artifactId>
+			<version>1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.shale</groupId>
+			<artifactId>shale-clay</artifactId>
+			<version>1.0.4-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.myfaces.core</groupId>
+			<artifactId>myfaces-api</artifactId>
+			<version>1.1.4</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.myfaces.core</groupId>
+			<artifactId>myfaces-impl</artifactId>
+			<version>1.1.4</version>
+			<scope>compile</scope>
+		</dependency>
+
+	</dependencies>
+</project>

Propchange: shale/tools/trunk/tld2claycfg/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/tools/trunk/tld2claycfg/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/Messages.java
URL: http://svn.apache.org/viewvc/shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/Messages.java?view=auto&rev=472721
==============================================================================
--- shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/Messages.java (added)
+++ shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/Messages.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,38 @@
+/*
+ * 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.shale.clay.util;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+    private static final String BUNDLE_NAME = "messages";
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+            .getBundle(BUNDLE_NAME);
+
+    private Messages() {
+    }
+
+    public static String getString(String key) {
+        try {
+            return RESOURCE_BUNDLE.getString(key);
+        } catch (MissingResourceException e) {
+            return '!' + key + '!';
+        }
+    }
+}

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/Messages.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/Messages.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/TldToClayconfig.java
URL: http://svn.apache.org/viewvc/shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/TldToClayconfig.java?view=auto&rev=472721
==============================================================================
--- shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/TldToClayconfig.java (added)
+++ shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/TldToClayconfig.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,573 @@
+/*
+ * 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.shale.clay.util;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.webapp.UIComponentTag;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.plugin.logging.SystemStreamLog;
+import org.apache.shale.clay.util.beans.Attribute;
+import org.apache.shale.clay.util.beans.Listener;
+import org.apache.shale.clay.util.beans.Tag;
+import org.apache.shale.clay.util.beans.Taglib;
+import org.apache.shale.clay.util.beans.Variable;
+
+public class TldToClayconfig {
+
+    private static Log LOGGER;
+
+    private static final String TAG = "tag";
+
+    private static final String LISTENER = "listener";
+
+    private static final String TAGLIB = "taglib";
+
+    private static final String ATTRIBUTE = "attribute";
+
+    private static final String ATTRIBUTES = "attributes";
+
+    private static final String VARIABLE = "variable";
+
+    private static final String TLIBVERSION = "tlib-version";
+
+    private static final String TLIBVERSION_C = "version";
+
+    private static final String JSPVERSION = "jsp-version";
+
+    private static final String JSPVERSION_C = "jspVersion";
+
+    private static final String SHORTNAME = "short-name";
+
+    private static final String SHORTNAME_C = "shortName";
+
+    private static final String TAGCLASS = "tag-class";
+
+    private static final String TAGCLASS_C = "tagClass";
+
+    private static final String TEICLASS = "tei-class";
+
+    private static final String TEICLASS_C = "teiClass";
+
+    private static final String BODYCONTENT = "body-content";
+
+    private static final String BODYCONTENT_C = "bodyContent";
+
+    private static final String DISPLAYNAME = "display-name";
+
+    private static final String DISPLAYNAME_C = "displayName";
+
+    private static final String LISTENERCLASS = "listener-class";
+
+    private static final String LISTENERCLASS_C = "listenerClass";
+
+    private static final String VIEW = "view";
+
+    private static final String COMPONENT = "component";
+
+    private static final String JSFID = "jsfid";
+
+    private static final String COMPONENTTYPE = "componentType";
+
+    private static final String EXTENDS = "extends";
+
+    private static final String BASECOMPONENT = "baseComponent";
+
+    private static final String SET = "set";
+
+    private static final String RENDERED = "rendered";
+
+    private static final String BINDING = "binding";
+
+    private static final String VB = "VB";
+
+    private static final String MB = "MB";
+
+    private static final String NAME = "name";
+
+    private static final String BINDINGTYPE = "bindingType";
+
+    private Taglib tagLib;
+
+    private Tag tag;
+
+    private Listener listener;
+
+    private Attribute attribute;
+
+    private Variable variable;
+
+    private String filename;
+
+    private String version;
+
+    private String destPath;
+
+    private String mbFilter;
+
+    private String[] mbfMap;
+
+    private ClassLoader classloader;
+
+    // Public methods
+    public void convert() throws Exception {
+
+        try {
+
+            URL url = findResource();
+            if (url == null) {
+                throw new IllegalArgumentException(Messages
+                        .getString("TldToClayconfig.exception.fnfe")
+                        + ": " + filename);
+            }
+
+            InputStream is = url.openStream();
+            XMLInputFactory factory = XMLInputFactory.newInstance();
+            XMLStreamReader parser = factory.createXMLStreamReader(is);
+
+            int tagCount = 0;
+            int attributeCount = 0;
+            int variableCount = 0;
+            int listenerCount = 0;
+            for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser
+                    .next()) {
+                switch (event) {
+                case XMLStreamConstants.START_DOCUMENT:
+                    break;
+
+                case XMLStreamConstants.START_ELEMENT:
+                    if (isVariable(parser.getLocalName())) {
+                        variable = createVariable();
+                        variableCount++;
+                        break;
+                    }
+                    if (isAttribute(parser.getLocalName())) {
+                        attribute = createAttribute();
+                        attributeCount++;
+                        break;
+                    }
+                    if (isListener(parser.getLocalName())) {
+                        listener = createListener();
+                        listenerCount++;
+                        break;
+                    }
+                    if (isTag(parser.getLocalName())) {
+                        tag = createTag();
+                        tagCount++;
+                        break;
+                    }
+                    if (isTaglib(parser.getLocalName())) {
+                        tagLib = createTagLib();
+                        break;
+                    }
+                    if (tagCount == 0 && listenerCount == 0) {
+                        addToTagLib(tagLib, parser);
+                        break;
+                    } else if (listenerCount > 0) {
+                        addToListener(listener, parser);
+                        break;
+                    } else if (attributeCount > 0) {
+                        addToAttribute(attribute, parser);
+                        break;
+                    } else {
+                        addToTag(tag, parser);
+                    }
+                    break;
+                case XMLStreamConstants.END_ELEMENT:
+                    if (isVariable(parser.getLocalName())) {
+                        closeVariable(tag, variable);
+                        variable = null;
+                        variableCount = 0;
+                        break;
+                    }
+                    if (isAttribute(parser.getLocalName())) {
+                        closeAttribute(tag, attribute);
+                        attribute = null;
+                        attributeCount = 0;
+                        break;
+                    }
+                    if (isTag(parser.getLocalName())) {
+                        closeTag(tagLib, tag);
+                        tag = null;
+                        tagCount = 0;
+                        break;
+                    }
+                    if (isListener(parser.getLocalName())) {
+                        closeListener(tagLib, listener);
+                        listener = null;
+                        listenerCount = 0;
+                        break;
+                    }
+                    if (isTaglib(parser.getLocalName())) {
+                        closeTaglib(tagLib);
+                        break;
+                    }
+                    break;
+                case XMLStreamConstants.CHARACTERS:
+                    if (tagCount == 0)
+                        break;
+                case XMLStreamConstants.CDATA:
+                    if (tagCount == 0)
+                        break;
+                }
+            }
+            parser.close();
+            writeConfigFile(tagLib, url.getPath().substring(
+                    url.getPath().lastIndexOf("/") + 1,
+                    url.getPath().lastIndexOf(".")));
+        } catch (Exception e) {
+            throw new Exception(Messages.getString("TldToClayconfig.exception")
+                    + e.getMessage());
+        }
+
+        if (LOGGER.isDebugEnabled()) {
+            LOGGER.debug("Done parsing taglib");
+        }
+    }
+
+    public String getMbFilter() {
+        return mbFilter;
+    }
+
+    public void setMbFilter(String mbFilter) {
+        this.mbFilter = mbFilter;
+        mbfMap = mbFilter.split(",");
+
+    }
+
+    public String getFilename() {
+        return filename;
+    }
+
+    public void setFilename(String filename) {
+        if (LOGGER.isDebugEnabled()) {
+            LOGGER.debug("Setting filename:" + filename);
+        }
+        this.filename = filename;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        if (LOGGER.isDebugEnabled()) {
+            LOGGER.debug("Setting version:" + version);
+        }
+        this.version = version;
+    }
+
+    public String getDestPath() {
+        return destPath;
+    }
+
+    public void setDestPath(String destPath) {
+        if (LOGGER.isDebugEnabled()) {
+            LOGGER.debug("Setting destination path:" + destPath);
+        }
+        this.destPath = destPath;
+    }
+
+    public static Log getLOGGER() {
+        return LOGGER;
+    }
+
+    public static void setLOGGER(Log logger) {
+        LOGGER = logger;
+    }
+
+    public ClassLoader getClassloader() {
+        return classloader;
+    }
+
+    public void setClassloader(ClassLoader classloader) {
+        this.classloader = classloader;
+    }
+
+    // Private methods
+
+    private URL findResource() throws Exception {
+        if (LOGGER.isDebugEnabled()) {
+            LOGGER.debug("Looking for: " + filename);
+        }
+        List urls = new ArrayList();
+        for (Enumeration ui = classloader.getResources(filename); ui
+                .hasMoreElements();) {
+            urls.add(ui.nextElement());
+        }
+        if (urls.size() > 0) {
+            return (URL) urls.get(0);
+        }
+        return null;
+
+    }
+
+    private void closeVariable(Tag tag, Variable variable) {
+        tag.addVariable(variable);
+    }
+
+    private Variable createVariable() {
+        return new Variable();
+    }
+
+    private boolean isVariable(String localName) {
+        return localName != null ? localName.equals(VARIABLE) : false;
+    }
+
+    private Attribute createAttribute() {
+        return new Attribute();
+    }
+
+    private void addToAttribute(Attribute attribute, XMLStreamReader parser)
+            throws Exception {
+        String item = coerce(parser.getLocalName());
+        attribute.getClass().getDeclaredField(item).set(attribute,
+                parser.getElementText());
+    }
+
+    private void closeAttribute(Tag tag, Attribute attribute) {
+        tag.addAttribute(attribute);
+    }
+
+    private boolean isAttribute(String localName) {
+        return localName != null ? localName.equals(ATTRIBUTE) : false;
+    }
+
+    private void addToTag(Tag tag, XMLStreamReader parser) throws Exception {
+
+        String item = coerce(parser.getLocalName());
+        tag.getClass().getDeclaredField(item).set(tag, parser.getElementText());
+    }
+
+    private void addToTagLib(Taglib tagLib, XMLStreamReader parser)
+            throws Exception {
+
+        String item = coerce(parser.getLocalName());
+        tagLib.getClass().getDeclaredField(item).set(tagLib,
+                parser.getElementText());
+    }
+
+    private void addToListener(Listener listener, XMLStreamReader parser)
+            throws Exception {
+
+        String item = coerce(parser.getLocalName());
+        listener.getClass().getDeclaredField(item).set(listener,
+                parser.getElementText());
+    }
+
+    private Taglib createTagLib() {
+        return new Taglib();
+    }
+
+    private void closeTaglib(Taglib tagLib) {
+    }
+
+    private void writeConfigFile(Taglib tagLib, String filename)
+            throws Exception {
+
+        XMLOutputFactory xof = XMLOutputFactory.newInstance();
+        XMLStreamWriter xtw = null;
+        File f = new File(destPath, filename + "-" + version + "-config.xml");
+        if (!f.exists()) {
+            f.getParentFile().mkdirs();
+            f.createNewFile();
+        }
+        xtw = xof.createXMLStreamWriter(new FileWriter(f));
+        xtw.writeStartDocument("utf-8", "1.0");
+        xtw.writeComment(Messages.getString("TldToClayconfig.doc.license"));
+        xtw.writeDTD(Messages.getString("TldToClayconfig.doc.dtd"));
+        xtw.writeStartElement(VIEW);
+        List tags = tagLib.getTags();
+        List attributes = null;
+        Tag tag = null;
+        Attribute attribute = null;
+        for (int i = 0; i < tags.size(); i++) {
+            tag = (Tag) tags.get(i);
+            if (isUIComponentTag(tag.getTagClass())) {
+                xtw.writeStartElement(COMPONENT);
+                xtw.writeAttribute(JSFID, tagLib.getShortName() + ":"
+                        + tag.getName());
+                xtw.writeAttribute(COMPONENTTYPE, getComponentType(tag
+                        .getTagClass()));
+                xtw.writeAttribute(EXTENDS, BASECOMPONENT);
+                attributes = tag.getAttributes();
+                if (attributes != null && attributes.size() > 0) {
+                    removeBaseActionAttributes(attributes);
+                }
+                if (attributes != null && attributes.size() > 0) {
+                    xtw.writeStartElement(ATTRIBUTES);
+                    for (int j = 0; j < attributes.size(); j++) {
+                        attribute = (Attribute) attributes.get(j);
+                        xtw.writeStartElement(SET);
+                        xtw.writeAttribute(NAME, attribute.getName());
+                        if (isValueReference(attribute.getName())) {
+                            xtw.writeAttribute(BINDINGTYPE, VB);
+                        } else {
+                            xtw.writeAttribute(BINDINGTYPE, MB);
+                        }
+                        xtw.writeEndElement();
+                    }
+                    xtw.writeEndElement();
+                }
+                xtw.writeEndElement();
+            }
+        }
+        xtw.writeEndDocument();
+        xtw.flush();
+        xtw.close();
+    }
+
+    private void removeBaseActionAttributes(List attributes) {
+        Attribute attribute = null;
+        List dummy = (List) ((ArrayList) attributes).clone();
+        Iterator it = dummy.iterator();
+        while (it.hasNext()) {
+            attribute = (Attribute) it.next();
+            if (attribute != null
+                    && (attribute.getName().equals(RENDERED) || attribute
+                            .getName().equals(BINDING))) {
+                attributes.remove(attribute);
+            }
+        }
+    }
+
+    private String getComponentType(String clazz) throws Exception {
+
+        clazz = clazz.trim();
+        Object cTag = (Object) classloader.loadClass(clazz).newInstance();
+        if (cTag instanceof UIComponentTag) {
+            return ((UIComponentTag) cTag).getComponentType();
+        }
+        return null;
+    }
+
+    private boolean isValueReference(String name) {
+
+        for (int i = 0; i < mbfMap.length; i++) {
+            if (name.matches(mbfMap[i])) {
+                return false;
+            }
+        }
+        return true;
+
+    }
+
+    private boolean isUIComponentTag(String clazz) throws Exception {
+
+        clazz = clazz.trim();
+        Object cTag = (Object) classloader.loadClass(clazz).newInstance();
+        if (cTag instanceof UIComponentTag) {
+            return true;
+        }
+        return false;
+    }
+
+    private void closeTag(Taglib tagLib, Tag tag) {
+        tagLib.addTag(tag);
+    }
+
+    private void closeListener(Taglib tagLib, Listener listener) {
+        tagLib.setListener(listener);
+    }
+
+    private boolean isTag(String name) {
+        return name != null ? name.equals(TAG) : false;
+    }
+
+    private boolean isListener(String name) {
+        return name != null ? name.equals(LISTENER) : false;
+    }
+
+    private boolean isTaglib(String name) {
+        return name != null ? name.equals(TAGLIB) : false;
+    }
+
+    private Tag createTag() {
+        return new Tag();
+    }
+
+    private Listener createListener() {
+        return new Listener();
+    }
+
+    // Take care of non-standard javanames for attributes
+    private String coerce(String localName) {
+
+        if (localName.equals(TLIBVERSION)) {
+            return TLIBVERSION_C;
+        } else if (localName.equals(JSPVERSION)) {
+            return JSPVERSION_C;
+        } else if (localName.equals(SHORTNAME)) {
+            return SHORTNAME_C;
+        } else if (localName.equals(TAGCLASS)) {
+            return TAGCLASS_C;
+        } else if (localName.equals(TEICLASS)) {
+            return TEICLASS_C;
+        } else if (localName.equals(BODYCONTENT)) {
+            return BODYCONTENT_C;
+        } else if (localName.equals(DISPLAYNAME)) {
+            return DISPLAYNAME_C;
+        } else if (localName.equals(LISTENERCLASS)) {
+            return LISTENERCLASS_C;
+        }
+
+        return localName;
+    }
+
+    // Utility method for running converter as a standalone
+    public static void main(String[] args) {
+        setLOGGER(new SystemStreamLog());
+        if (args.length < 4) {
+            LOGGER.error(Messages.getString("TldToClayconfig.info"));
+            return;
+        }
+
+        try {
+            ClassLoader classloader = Thread.currentThread()
+                    .getContextClassLoader();
+            String fn = args[0];
+            String v = args[1];
+            String d = args[2];
+            String mbf = args[3];
+            TldToClayconfig me = new TldToClayconfig();
+            me.setFilename(fn);
+            me.setVersion(v);
+            me.setDestPath(d);
+            me.setClassloader(classloader);
+            me.setMbFilter(mbf);
+            me.convert();
+        } catch (Exception e) {
+            e.printStackTrace();
+            LOGGER.error(Messages.getString("TldToClayconfig.exception"));
+            System.exit(0);
+        }
+    }
+
+}

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/TldToClayconfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/TldToClayconfig.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Attribute.java
URL: http://svn.apache.org/viewvc/shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Attribute.java?view=auto&rev=472721
==============================================================================
--- shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Attribute.java (added)
+++ shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Attribute.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,71 @@
+/*
+ * 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.shale.clay.util.beans;
+
+public class Attribute {
+
+    public String name;
+
+    public String required;
+
+    public String rtexprvalue;
+
+    public String type;
+
+    public String description;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getRequired() {
+        return required;
+    }
+
+    public void setRequired(String required) {
+        this.required = required;
+    }
+
+    public String getRtexprvalue() {
+        return rtexprvalue;
+    }
+
+    public void setRtexprvalue(String rtexprvalue) {
+        this.rtexprvalue = rtexprvalue;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+}

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Attribute.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Attribute.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Listener.java
URL: http://svn.apache.org/viewvc/shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Listener.java?view=auto&rev=472721
==============================================================================
--- shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Listener.java (added)
+++ shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Listener.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,35 @@
+/*
+ * 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.shale.clay.util.beans;
+
+public class Listener {
+
+    public String listenerClass;
+
+    public Listener() {
+
+    }
+
+    public String getListenerClass() {
+        return listenerClass;
+    }
+
+    public void setListenerClass(String listenerClass) {
+        this.listenerClass = listenerClass;
+    }
+
+}

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Listener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Listener.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Tag.java
URL: http://svn.apache.org/viewvc/shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Tag.java?view=auto&rev=472721
==============================================================================
--- shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Tag.java (added)
+++ shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Tag.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,157 @@
+/*
+ * 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.shale.clay.util.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Tag {
+
+    public String name;
+
+    public String tagClass;
+
+    public String teiClass;
+
+    public String bodyContent;
+
+    public String description;
+
+    public String displayName;
+
+    public String smallIcon;
+
+    public String largeIcon;
+
+    public List variables;
+
+    public List attributes;
+
+    public String example;
+
+    public Tag() {
+        super();
+    }
+
+    public Tag(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(List attributes) {
+        this.attributes = attributes;
+    }
+
+    public void addAttribute(Attribute attribute) {
+        if (attributes == null) {
+            attributes = new ArrayList();
+        }
+        if (attribute != null)
+            attributes.add(attribute);
+    }
+
+    public String getBodyContent() {
+        return bodyContent;
+    }
+
+    public void setBodyContent(String bodyContent) {
+        this.bodyContent = bodyContent;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public void setDisplayName(String displayName) {
+        this.displayName = displayName;
+    }
+
+    public String getExample() {
+        return example;
+    }
+
+    public void setExample(String example) {
+        this.example = example;
+    }
+
+    public String getLargeIcon() {
+        return largeIcon;
+    }
+
+    public void setLargeIcon(String largeIcon) {
+        this.largeIcon = largeIcon;
+    }
+
+    public String getSmallIcon() {
+        return smallIcon;
+    }
+
+    public void setSmallIcon(String smallIcon) {
+        this.smallIcon = smallIcon;
+    }
+
+    public String getTagClass() {
+        return tagClass;
+    }
+
+    public void setTagClass(String tagClass) {
+        this.tagClass = tagClass;
+    }
+
+    public String getTeiClass() {
+        return teiClass;
+    }
+
+    public void setTeiClass(String teiClass) {
+        this.teiClass = teiClass;
+    }
+
+    public List getVariables() {
+        return variables;
+    }
+
+    public void setVariables(List variables) {
+        this.variables = variables;
+    }
+
+    public void addVariable(Variable variable) {
+        if (variables == null) {
+            variables = new ArrayList();
+        }
+        if (variable != null)
+            variables.add(variable);
+    }
+}

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Tag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Tag.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Taglib.java
URL: http://svn.apache.org/viewvc/shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Taglib.java?view=auto&rev=472721
==============================================================================
--- shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Taglib.java (added)
+++ shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Taglib.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,147 @@
+/*
+ * 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.shale.clay.util.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Taglib {
+
+    public List tags;
+
+    public String version;
+
+    public String jspVersion;
+
+    public String shortName;
+
+    public String uri;
+
+    public String description;
+
+    public String displayName;
+
+    public String smallIcon;
+
+    public String largeIcon;
+
+    public String validator;
+
+    public Listener listener;
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public void setDisplayName(String displayName) {
+        this.displayName = displayName;
+    }
+
+    public String getLargeIcon() {
+        return largeIcon;
+    }
+
+    public void setLargeIcon(String largeIcon) {
+        this.largeIcon = largeIcon;
+    }
+
+    public Listener getListener() {
+        return listener;
+    }
+
+    public void setListener(Listener listener) {
+        this.listener = listener;
+    }
+
+    public String getSmallIcon() {
+        return smallIcon;
+    }
+
+    public void setSmallIcon(String smallIcon) {
+        this.smallIcon = smallIcon;
+    }
+
+    public String getValidator() {
+        return validator;
+    }
+
+    public void setValidator(String validator) {
+        this.validator = validator;
+    }
+
+    public String getShortName() {
+        return shortName;
+    }
+
+    public void setShortName(String shortName) {
+        this.shortName = shortName;
+    }
+
+    public Taglib() {
+        super();
+    }
+
+    public List getTags() {
+        return tags;
+    }
+
+    public void setTags(List tags) {
+        this.tags = tags;
+    }
+
+    public void addTag(Tag tag) {
+        if (tag != null) {
+            if (tags == null) {
+                tags = new ArrayList();
+            }
+            tags.add(tag);
+        }
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String getJspVersion() {
+        return jspVersion;
+    }
+
+    public void setJspVersion(String jspVersion) {
+        this.jspVersion = jspVersion;
+    }
+
+    public String getUri() {
+        return uri;
+    }
+
+    public void setTlibUri(String uri) {
+        this.uri = uri;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+}

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Taglib.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Taglib.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Variable.java
URL: http://svn.apache.org/viewvc/shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Variable.java?view=auto&rev=472721
==============================================================================
--- shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Variable.java (added)
+++ shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Variable.java Wed Nov  8 16:45:25 2006
@@ -0,0 +1,85 @@
+/*
+ * 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.shale.clay.util.beans;
+
+public class Variable {
+
+    public String nameGiven;
+
+    public String nameFromAttribute;
+
+    public String variableClass;
+
+    public String declare;
+
+    public String scope;
+
+    public String description;
+
+    public Variable() {
+        super();
+    }
+
+    public String getDeclare() {
+        return declare;
+    }
+
+    public void setDeclare(String declare) {
+        this.declare = declare;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getNameFromAttribute() {
+        return nameFromAttribute;
+    }
+
+    public void setNameFromAttribute(String nameFromAttribute) {
+        this.nameFromAttribute = nameFromAttribute;
+    }
+
+    public String getNameGiven() {
+        return nameGiven;
+    }
+
+    public void setNameGiven(String nameGiven) {
+        this.nameGiven = nameGiven;
+    }
+
+    public String getScope() {
+        return scope;
+    }
+
+    public void setScope(String scope) {
+        this.scope = scope;
+    }
+
+    public String getVariableClass() {
+        return variableClass;
+    }
+
+    public void setVariableClass(String variableClass) {
+        this.variableClass = variableClass;
+    }
+
+}

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Variable.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: shale/tools/trunk/tld2claycfg/src/main/java/org/apache/shale/clay/util/beans/Variable.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/tools/trunk/tld2claycfg/src/main/resources/messages.properties
URL: http://svn.apache.org/viewvc/shale/tools/trunk/tld2claycfg/src/main/resources/messages.properties?view=auto&rev=472721
==============================================================================
--- shale/tools/trunk/tld2claycfg/src/main/resources/messages.properties (added)
+++ shale/tools/trunk/tld2claycfg/src/main/resources/messages.properties Wed Nov  8 16:45:25 2006
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+TldToClayconfig.info=Usage: java TldToClayconfig filename version destPath methodbinding-filter
+TldToClayconfig.exception=Exception occurred while converting : 
+TldToClayconfig.exception.io=IOException while converting : 
+TldToClayconfig.exception.fnfe=Tld file not found : 
+TldToClayconfig.directory.creation.error=Could not create destination directory : 
+TldToClayconfig.doc.license=Licensed to the Apache Software Foundation (ASF) under one or more\n\
+ contributor license agreements.  See the NOTICE file distributed with\n\
+ this work for additional information regarding copyright ownership.\n\
+ The ASF licenses this file to you under the Apache License, Version 2.0\n\
+ (the "License"); you may not use this file except in compliance with\n\
+ the License.  You may obtain a copy of the License at\n\
+\n\
+     http://www.apache.org/licenses/LICENSE-2.0\n\
+\n\
+ Unless required by applicable law or agreed to in writing, software\n\
+ distributed under the License is distributed on an "AS IS" BASIS,\n\
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
+ See the License for the specific language governing permissions and\n\
+ limitations under the License.\n
+TldToClayconfig.doc.dtd=<!DOCTYPE view PUBLIC\n\
+      "-//Apache Software Foundation//DTD Shale Clay View Configuration 1.0//EN"\n\
+      "http://struts.apache.org/dtds/shale-clay-config_1_0.dtd">

Propchange: shale/tools/trunk/tld2claycfg/src/main/resources/messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/tools/trunk/tld2claycfg/src/main/resources/messages.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL



Mime
View raw message