Author: dblevins
Date: Sat May 28 23:05:18 2011
New Revision: 1128794

URL: http://svn.apache.org/viewvc?rev=1128794&view=rev
Log:
Stub project for some neat tooling ideas that came up on IRC

Added:
    openejb/trunk/sandbox/tools/pom.xml   (with props)
    openejb/trunk/sandbox/tools/src/
    openejb/trunk/sandbox/tools/src/main/
    openejb/trunk/sandbox/tools/src/main/java/
    openejb/trunk/sandbox/tools/src/main/java/org/
    openejb/trunk/sandbox/tools/src/main/java/org/apache/
    openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/
    openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/
    
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Daily.java   
(with props)
    
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Hourly.java  
 (with props)
    openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/examples/
    
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/examples/GenerateIndex.java
   (with props)
    openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/twitter/
    
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/twitter/Retweet.java
   (with props)
    openejb/trunk/sandbox/tools/src/main/resources/
    openejb/trunk/sandbox/tools/src/test/
    openejb/trunk/sandbox/tools/src/test/java/
    openejb/trunk/sandbox/tools/src/test/java/org/
    openejb/trunk/sandbox/tools/src/test/java/org/apache/
    openejb/trunk/sandbox/tools/src/test/java/org/apache/openejb/
    openejb/trunk/sandbox/tools/src/test/java/org/apache/openejb/tools/
    openejb/trunk/sandbox/tools/src/test/resources/

Added: openejb/trunk/sandbox/tools/pom.xml
URL: 
http://svn.apache.org/viewvc/openejb/trunk/sandbox/tools/pom.xml?rev=1128794&view=auto
==============================================================================
--- openejb/trunk/sandbox/tools/pom.xml (added)
+++ openejb/trunk/sandbox/tools/pom.xml Sat May 28 23:05:18 2011
@@ -0,0 +1,71 @@
+<?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: 1002369 $ $Date: 2010-09-28 14:55:40 -0700 (Tue, 28 Sep 2010) $ -->
+
+<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</groupId>
+    <artifactId>apache</artifactId>
+    <version>7</version>
+  </parent>
+
+  <groupId>org.apache.openejb.tools</groupId>
+  <artifactId>tools</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>OpenEJB Tools</name>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <build>
+    <defaultGoal>install</defaultGoal>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.3.2</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <repositories>
+    <repository>
+      <id>apache-m2-snapshot</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+    </repository>
+  </repositories>
+  <dependencies>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.8.1</version>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+</project>
+

Propchange: openejb/trunk/sandbox/tools/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Daily.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Daily.java?rev=1128794&view=auto
==============================================================================
--- 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Daily.java 
(added)
+++ 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Daily.java 
Sat May 28 23:05:18 2011
@@ -0,0 +1,36 @@
+/**
+ * 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.openejb.tools;
+
+import org.apache.openejb.tools.examples.GenerateIndex;
+
+/**
+ *  You can execute standalone java programs with Maven like so:
+ *
+ *  mvn clean install exec:java -Dexec.mainClass=org.apache.openejb.tools.Daily
+ *
+ *  The idea is to setup this main class as an Daily cron job
+ *  If we have other things we want to do daily, we can do them here.
+ *
+ * @version $Rev$ $Date$
+ */
+public class Daily {
+
+    public static void main(String[] args) {
+        GenerateIndex.main(args);
+    }
+}

Propchange: 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Daily.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Hourly.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Hourly.java?rev=1128794&view=auto
==============================================================================
--- 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Hourly.java 
(added)
+++ 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Hourly.java 
Sat May 28 23:05:18 2011
@@ -0,0 +1,36 @@
+/**
+ * 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.openejb.tools;
+
+import org.apache.openejb.tools.twitter.Retweet;
+
+/**
+ *  You can execute standalone java programs with Maven like so:
+ *
+ *  mvn clean install exec:java 
-Dexec.mainClass=org.apache.openejb.tools.Hourly
+ *
+ *  The idea is to setup this main class as an Hourly cron job
+ *  If we have other things we want to do hourly, we can do them here.
+ *
+ * @version $Rev$ $Date$
+ */
+public class Hourly {
+
+    public static void main(String[] args) {
+        Retweet.main(args);
+    }
+}

Propchange: 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/Hourly.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/examples/GenerateIndex.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/examples/GenerateIndex.java?rev=1128794&view=auto
==============================================================================
--- 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/examples/GenerateIndex.java
 (added)
+++ 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/examples/GenerateIndex.java
 Sat May 28 23:05:18 2011
@@ -0,0 +1,87 @@
+/**
+ * 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.openejb.tools.examples;
+
+/**
+ * Most the examples do not have any documentation.
+ *
+ * There are some wiki pages for some of the examples, but these
+ * are hard to create and maintain.  The examples change frequently
+ * enough that we really should have documentation that goes with
+ * each version of the examples.
+ *
+ * If we put a README.md file in each example and use Markdown
+ * which is a really simple text format that has many tools
+ * capable of generating html, we could probably generate a
+ * web page for each example.  Then we could generate a index
+ * for all the examples.
+ *
+ * We could then take this all and upload it to the website
+ *
+ * Something kind of like this:
+ *    http://people.apache.org/~dblevins/simple-stateless.html
+ *
+ * But nicer looking, with breadcrumbs and links for navigating
+ * around to other examples
+ *
+ *
+ * IDEAS FOR AFTER SOMETHING IS WORKING
+ *
+ * Perhaps at some point some xref style processing of the source
+ * and links to the source
+ *
+ * Perhaps at some point use ASM to see what annotations and API
+ * classes were used and make an index that lists examples by
+ * which APIs are used
+ *
+ * Perhaps at some point use Swizzle stream to do a sort of SNIPPET
+ * thing like the Confluence plugin, so we wouldn't have to copy
+ * source into the example
+ *
+ * @version $Rev$ $Date$
+ */
+public class GenerateIndex {
+
+    // A couple possible markdown processors in Java
+    //   http://code.google.com/p/markdownj/wiki/Maven
+    //   http://code.google.com/p/doxia-module-markdown/wiki/Usage
+
+
+    // Syntax highlighting can be done with this:
+    //   http://code.google.com/p/google-code-prettify
+
+    /**
+     * Can be run in an IDE or via Maven like so:
+     *
+     * mvn clean install exec:java 
-Dexec.mainClass=org.apache.openejb.tools.examples.GenerateIndex
+     * @param args
+     */
+    public static void main(String[] args)
+    {
+        // crack open the examples zip file
+
+        // create a directory for each example
+
+        // use the README.md markdown file to generate an index.html page
+
+        // If there is no README.md we should just generate a basic page
+        // maybe something that includes the FooTest.java code and shows
+        // shows that with links to other classes in the example
+
+        // create an index for all example directories
+    }
+}

Propchange: 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/examples/GenerateIndex.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/twitter/Retweet.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/twitter/Retweet.java?rev=1128794&view=auto
==============================================================================
--- 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/twitter/Retweet.java
 (added)
+++ 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/twitter/Retweet.java
 Sat May 28 23:05:18 2011
@@ -0,0 +1,53 @@
+/**
+ * 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.openejb.tools.twitter;
+
+/**
+ *
+ * We should monitor this feed http://twitter.com/#!/OpenEJB/contributors
+ * and retweet anything that mentions OpenEJB
+ *
+ * So if anyone in the contributors list tweeted about OpenEJB, the OpenEJB 
twitter account would retweet it
+ *
+ * Two things will happen as a result:
+ *   -  The more activity on the OpenEJB twitter account the more followers it 
will get
+ *   -  The more @joe and other contributors are seen on the account, the more 
followers they will get
+ *
+ * The OpenEJB twitter account has more followers than most everyone else so 
getting it
+ * to retweet is a good way to expose people to all our wonderful contributors
+ * and get them some followers and help the project at the same time.
+ *
+ * The result is we as a community will have more ability overall to get the 
word out!
+ *
+ *
+ * @version $Rev$ $Date$
+ */
+public class Retweet {
+
+    public static void main(String[] args) {
+
+        // Grab the http://twitter.com/#!/OpenEJB/contributors feed via the 
Twitter API
+
+        // Scan for new tweets from the last hour
+
+        // Retweet any tweets that haven't been retweeted
+
+        // We could look at the OpenEJB twitter feed itself to determine if a 
tweet
+        // has already been retweeted
+
+    }
+}

Propchange: 
openejb/trunk/sandbox/tools/src/main/java/org/apache/openejb/tools/twitter/Retweet.java
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to