Seam SVN: r13344 - /.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-07-07 22:44:39 -0400 (Wed, 07 Jul 2010)
New Revision: 13344
Added:
about.txt
Log:
explains the SVN structure
Added: about.txt
===================================================================
--- about.txt (rev 0)
+++ about.txt 2010-07-08 02:44:39 UTC (rev 13344)
@@ -0,0 +1,26 @@
+This is the SVN repository for all versions of the Seam framework.
+
+http://seamframework.org
+
+Seam 2
+======
+The source code for Seam 2.x can be found under the following two root directories:
+
+branches/ Seam 2.x branches, divided into community and enterprise editions
+tags/ Seam 2.x release tags; JBPAPP prefix for enterprise, JBoss_Seam prefix for community
+
+There is no longer a trunk for Seam 2.x.
+
+Seam 3
+======
+Seam 3.x is modular and each component may have independent release cycles.
+Therefore, the source code is partitioned into separate SVN roots under the
+following directories:
+
+build/ Seam 3 parent POM, Maven build extensions, the Seam 3 checkout script and the archetype for a Seam 3 module
+dist/ Seam 3 BOM (bill of materials) and assembly builds (for select modules, docs and examples)
+examples/ Aggregate examples that demonstrate integration of Seam 3 modules
+modules/ Seam 3 modules, partitioned by technology or concern (for instance, the drools integration has its own module)
+sandbox/ Prototypes of Seam 3 modules, examples or other project ideas
+
+Seam 3 has bundled releases, which is assembled from the dist root.
14 years, 8 months
Seam SVN: r13343 - modules.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-07-07 22:36:28 -0400 (Wed, 07 Jul 2010)
New Revision: 13343
Removed:
modules/branches/
Log:
remove erroneous branches directory
14 years, 8 months
Seam SVN: r13342 - branches/enterprise/JBPAPP_5_0/seam-gen/ide-project-files/eclipse.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-07-07 09:31:49 -0400 (Wed, 07 Jul 2010)
New Revision: 13342
Modified:
branches/enterprise/JBPAPP_5_0/seam-gen/ide-project-files/eclipse/.classpath
Log:
JBPAPP-4111 - missed .classpath reference
Modified: branches/enterprise/JBPAPP_5_0/seam-gen/ide-project-files/eclipse/.classpath
===================================================================
--- branches/enterprise/JBPAPP_5_0/seam-gen/ide-project-files/eclipse/.classpath 2010-07-07 00:46:18 UTC (rev 13341)
+++ branches/enterprise/JBPAPP_5_0/seam-gen/ide-project-files/eclipse/.classpath 2010-07-07 13:31:49 UTC (rev 13342)
@@ -13,7 +13,7 @@
<classpathentry kind="lib" path="lib/jboss-seam.jar" sourcepath="lib/src/jboss-seam-sources.jar"/>
<classpathentry kind="lib" path="lib/jboss-seam-ui.jar" sourcepath="lib/src/jboss-seam-ui-sources.jar"/>
<classpathentry kind="lib" path="lib/jboss-seam-debug.jar"/>
- <classpathentry kind="lib" path="lib/jboss-cache.jar"/>
+ <classpathentry kind="lib" path="lib/jbosscache-core.jar"/>
<classpathentry kind="lib" path="lib/jbpm-jpdl.jar"/>
<classpathentry kind="lib" path="lib/antlr.jar"/>
<classpathentry kind="lib" path="lib/jgroups.jar"/>
14 years, 8 months
Seam SVN: r13341 - in sandbox/encore: core/src/main/java/org/jboss/encore/grammar/java and 4 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-07-06 20:46:18 -0400 (Tue, 06 Jul 2010)
New Revision: 13341
Added:
sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/Method.java
sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/ast/
sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/ast/MethodFinderVisitor.java
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/CommandCompleter.java
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/cli/
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/cli/Command.java
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/cli/Option.java
Modified:
sandbox/encore/core/pom.xml
sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/JavaParser.java
sandbox/encore/core/src/test/java/org/jboss/encore/grammar/java/JavaParserTest.java
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Shell.java
Log:
Parser API & Shell beginnings
Modified: sandbox/encore/core/pom.xml
===================================================================
--- sandbox/encore/core/pom.xml 2010-07-06 17:22:48 UTC (rev 13340)
+++ sandbox/encore/core/pom.xml 2010-07-07 00:46:18 UTC (rev 13341)
@@ -44,10 +44,12 @@
<groupId>org.eclipse.equinox</groupId>
<artifactId>app</artifactId>
</exclusion>
+ <!--
<exclusion>
<groupId>org.eclipse</groupId>
<artifactId>text</artifactId>
</exclusion>
+ -->
<exclusion>
<groupId>org.eclipse.core</groupId>
<artifactId>filesystem</artifactId>
Modified: sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/JavaParser.java
===================================================================
--- sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/JavaParser.java 2010-07-06 17:22:48 UTC (rev 13340)
+++ sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/JavaParser.java 2010-07-07 00:46:18 UTC (rev 13341)
@@ -1,44 +1,118 @@
package org.jboss.encore.grammar.java;
import java.io.InputStream;
+import java.util.Collections;
+import java.util.List;
+import java.util.Stack;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
import org.eclipse.jdt.internal.compiler.util.Util;
+import org.eclipse.jface.text.Document;
+import org.eclipse.text.edits.TextEdit;
+import org.eclipse.text.edits.UndoEdit;
public class JavaParser
{
+ private Document document;
+ private final Stack<UndoEdit> undoStack = new Stack<UndoEdit>();
+
/**
- * Parses and process the java source code as a compilation unit and the
- * result it abstract syntax tree (AST) representation and this action uses
- * the third edition of java Language Specification, that gets the
- * possibility to support J2SE 5 during the parsing.
+ * Parses and process the java source code as a compilation unit and the result it abstract syntax tree (AST)
+ * representation and this action uses the third edition of java Language Specification.
*
- * @param source - the java source to be parsed (i.e. the char[] contains
- * Java source).
- * @return CompilationUnit Abstract syntax tree representation of a java
- * source file.
+ * @param source - the java source to be parsed (i.e. the char[] contains Java source).
+ * @return CompilationUnit Abstract syntax tree representation of a java source file.
*/
- public static CompilationUnit parse(InputStream inputStream)
+ public JavaParser(final InputStream inputStream)
{
try
{
char[] source = Util.getInputStreamAsCharArray(inputStream, inputStream.available(), "ISO8859_1");
+ document = new Document(new String(source));
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("InputStream must be a parsable java file: ", e);
+ }
+ }
- ASTParser parser = ASTParser.newParser(AST.JLS3);
- parser.setSource(source);
- parser.setKind(ASTParser.K_COMPILATION_UNIT);
- // to get more informations from the unit.
- parser.setResolveBindings(true);
+ public JavaParser(final char[] source)
+ {
+ document = new Document(new String(source));
+ }
- return (CompilationUnit) parser.createAST(null);
+ public CompilationUnit parse()
+ {
+ ASTParser parser = ASTParser.newParser(AST.JLS3);
+ parser.setSource(document.get().toCharArray());
+ parser.setResolveBindings(true);
+ parser.setKind(ASTParser.K_COMPILATION_UNIT);
+ CompilationUnit cu = (CompilationUnit) parser.createAST(null);
+ return cu;
+ }
+
+ public JavaParser addImport(final String className)
+ {
+ CompilationUnit cu = parse();
+ try
+ {
+ AST ast = cu.getAST();
+ ASTRewrite rewriter = ASTRewrite.create(ast);
+ ListRewrite lrw = rewriter.getListRewrite(cu, CompilationUnit.IMPORTS_PROPERTY);
+
+ ImportDeclaration id = ast.newImportDeclaration();
+ id.setName(ast.newName(tokenizeClassName(className)));
+
+ lrw.insertLast(id, null);
+
+ TextEdit edits = rewriter.rewriteAST(document, null);
+ UndoEdit undo = edits.apply(document);
+ undoStack.add(undo);
+
+ return this;
}
catch (Exception e)
{
- throw new IllegalArgumentException("InputStream must be a parsable java file: ", e);
+ throw new RuntimeException("Could not add import: \"" + className +
+ "\" to compilation unit: \"" + "\"", e);
}
}
+ public void addImport(final Class<?> type)
+ {
+ addImport(type.getName());
+ }
+
+ public void addImports(final Class<?>... types)
+ {
+ for (Class<?> type : types)
+ {
+ addImport(type.getName());
+ }
+ }
+
+ private String[] tokenizeClassName(final String className)
+ {
+ String[] result = className.split("\\.");
+ return result;
+ }
+
+ public Stack<UndoEdit> getUndoStack()
+ {
+ return undoStack;
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<ImportDeclaration> getImports()
+ {
+ CompilationUnit unit = parse();
+ List<ImportDeclaration> imports = unit.imports();
+ return Collections.unmodifiableList(imports);
+ }
}
Added: sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/Method.java
===================================================================
--- sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/Method.java (rev 0)
+++ sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/Method.java 2010-07-07 00:46:18 UTC (rev 13341)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.grammar.java;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public class Method
+{
+
+}
Added: sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/ast/MethodFinderVisitor.java
===================================================================
--- sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/ast/MethodFinderVisitor.java (rev 0)
+++ sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/ast/MethodFinderVisitor.java 2010-07-07 00:46:18 UTC (rev 13341)
@@ -0,0 +1,34 @@
+package org.jboss.encore.grammar.java.ast;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+
+public class MethodFinderVisitor extends ASTVisitor
+{
+ private final List<MethodDeclaration> methods = new ArrayList<MethodDeclaration>();
+ private ASTNode parent;
+
+ @Override
+ public boolean visit(final TypeDeclaration node)
+ {
+ parent = node;
+ methods.addAll(Arrays.asList(node.getMethods()));
+ return super.visit(node);
+ }
+
+ public List<MethodDeclaration> getMethods()
+ {
+ return methods;
+ }
+
+ public TypeDeclaration getParent()
+ {
+ return (TypeDeclaration) parent;
+ }
+}
\ No newline at end of file
Modified: sandbox/encore/core/src/test/java/org/jboss/encore/grammar/java/JavaParserTest.java
===================================================================
--- sandbox/encore/core/src/test/java/org/jboss/encore/grammar/java/JavaParserTest.java 2010-07-06 17:22:48 UTC (rev 13340)
+++ sandbox/encore/core/src/test/java/org/jboss/encore/grammar/java/JavaParserTest.java 2010-07-07 00:46:18 UTC (rev 13341)
@@ -1,19 +1,13 @@
package org.jboss.encore.grammar.java;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
+import java.net.URL;
import java.util.List;
+import java.util.Map;
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.ASTVisitor;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.ImportDeclaration;
-import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.junit.Before;
import org.junit.Test;
@@ -31,54 +25,38 @@
@Test
public void testParse() throws Exception
{
- CompilationUnit unit = JavaParser.parse(stream);
+ JavaParser parser = new JavaParser(stream);
+ List<ImportDeclaration> imports = parser.getImports();
- @SuppressWarnings("unchecked")
- List<ImportDeclaration> imports = unit.imports();
-
- assertEquals("java.net.URL", imports.get(0).getName().getFullyQualifiedName());
+ assertEquals(URL.class.getName(), imports.get(0).getName().getFullyQualifiedName());
}
@Test
- public void testAddMethod() throws Exception
+ public void testAddImport() throws Exception
{
- CompilationUnit unit = JavaParser.parse(stream);
- MethodFinderVisitor visitor = new MethodFinderVisitor();
- unit.accept(visitor);
- List<MethodDeclaration> methods = visitor.getMethods();
- TypeDeclaration parent = visitor.getParent();
- MethodDeclaration newMethod = parent.getAST().newMethodDeclaration();
- newMethod.setName(parent.getAST().newSimpleName("addedMethod"));
- newMethod.setConstructor(false);
- newMethod.setReturnType2(null);
-
- // http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.jdt.doc.isv...
- methods = visitor.getMethods();
-
- assertTrue(methods.contains(newMethod));
+ JavaParser parser = new JavaParser(stream);
+ parser.addImport(List.class.getName());
+ List<ImportDeclaration> imports = parser.getImports();
+ assertEquals(2, imports.size());
+ assertEquals(URL.class.getName(), imports.get(0).getName().getFullyQualifiedName());
+ assertEquals(List.class.getName(), imports.get(1).getName().getFullyQualifiedName());
}
- public class MethodFinderVisitor extends ASTVisitor
+ @Test
+ public void testAddImportsClasses() throws Exception
{
- private final List<MethodDeclaration> methods = new ArrayList<MethodDeclaration>();
- private ASTNode parent;
+ JavaParser parser = new JavaParser(stream);
- @Override
- public boolean visit(final TypeDeclaration node)
- {
- parent = node;
- methods.addAll(Arrays.asList(node.getMethods()));
- return super.visit(node);
- }
+ List<ImportDeclaration> imports = parser.getImports();
+ assertEquals(1, imports.size());
- public List<MethodDeclaration> getMethods()
- {
- return methods;
- }
+ parser.addImports(List.class, Map.class);
- public TypeDeclaration getParent()
- {
- return (TypeDeclaration) parent;
- }
+ imports = parser.getImports();
+ assertEquals(3, imports.size());
+ assertEquals(URL.class.getName(), imports.get(0).getName().getFullyQualifiedName());
+ assertEquals(List.class.getName(), imports.get(1).getName().getFullyQualifiedName());
+ assertEquals(Map.class.getName(), imports.get(2).getName().getFullyQualifiedName());
}
+
}
Added: sandbox/encore/shell/src/main/java/org/jboss/encore/shell/CommandCompleter.java
===================================================================
--- sandbox/encore/shell/src/main/java/org/jboss/encore/shell/CommandCompleter.java (rev 0)
+++ sandbox/encore/shell/src/main/java/org/jboss/encore/shell/CommandCompleter.java 2010-07-07 00:46:18 UTC (rev 13341)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.shell;
+
+import java.util.List;
+
+import jline.console.completer.Completer;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public class CommandCompleter implements Completer
+{
+
+ @Override
+ public int complete(final String buffer, final int cursor, final List<CharSequence> candidates)
+ {
+ return 0;
+ }
+
+}
Modified: sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Shell.java
===================================================================
--- sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Shell.java 2010-07-06 17:22:48 UTC (rev 13340)
+++ sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Shell.java 2010-07-07 00:46:18 UTC (rev 13341)
@@ -27,6 +27,8 @@
import javax.inject.Inject;
import javax.inject.Singleton;
+import jline.console.ConsoleReader;
+
import org.jboss.encore.shell.events.StartupEvent;
import org.jboss.weld.environment.se.bindings.Parameters;
import org.slf4j.Logger;
@@ -38,6 +40,9 @@
@Singleton
public class Shell
{
+ private static String completionKeys = "TAB";
+ private final String prompt = "encore> ";
+
@Inject
@Parameters
private List<String> parameters;
@@ -45,9 +50,15 @@
@Inject
Logger log;
- public void init(@Observes final StartupEvent event)
+ private ConsoleReader reader;
+
+ public void init(@Observes final StartupEvent event) throws Exception
{
System.out.println("Startup");
log.info("Encore Shell - Starting up.");
+
+ reader = new ConsoleReader();
+ reader.setHistoryEnabled(true);
+ reader.setPrompt(prompt);
}
}
\ No newline at end of file
Added: sandbox/encore/shell/src/main/java/org/jboss/encore/shell/cli/Command.java
===================================================================
--- sandbox/encore/shell/src/main/java/org/jboss/encore/shell/cli/Command.java (rev 0)
+++ sandbox/encore/shell/src/main/java/org/jboss/encore/shell/cli/Command.java 2010-07-07 00:46:18 UTC (rev 13341)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.shell.cli;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ * Represents a single command to be run on a Shell.
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+@Qualifier
+@Target({ METHOD, PARAMETER, TYPE, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface Command
+{
+ /**
+ * One or more names for this command.
+ */
+ String[] value();
+
+ /**
+ * Help text for this command.
+ */
+ String help();
+}
Added: sandbox/encore/shell/src/main/java/org/jboss/encore/shell/cli/Option.java
===================================================================
--- sandbox/encore/shell/src/main/java/org/jboss/encore/shell/cli/Option.java (rev 0)
+++ sandbox/encore/shell/src/main/java/org/jboss/encore/shell/cli/Option.java 2010-07-07 00:46:18 UTC (rev 13341)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.shell.cli;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+
+@Qualifier
+@Target({ METHOD, PARAMETER })
+@Retention(RUNTIME)
+@Documented
+public @interface Option
+{
+
+}
14 years, 8 months
Seam SVN: r13340 - dist/trunk.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-07-06 13:22:48 -0400 (Tue, 06 Jul 2010)
New Revision: 13340
Modified:
dist/trunk/pom.xml
Log:
add JBoss nexus repo since we need the JBoss spec pom
Modified: dist/trunk/pom.xml
===================================================================
--- dist/trunk/pom.xml 2010-07-06 17:18:48 UTC (rev 13339)
+++ dist/trunk/pom.xml 2010-07-06 17:22:48 UTC (rev 13340)
@@ -30,6 +30,20 @@
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Repository Group</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public/</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
</repositories>
<pluginRepositories>
14 years, 8 months
Seam SVN: r13339 - in sandbox/encore: shell and 1 other directory.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-07-06 13:18:48 -0400 (Tue, 06 Jul 2010)
New Revision: 13339
Modified:
sandbox/encore/core/
sandbox/encore/shell/
Log:
Ignores
Property changes on: sandbox/encore/core
___________________________________________________________________
Name: svn:ignore
- .settings
target
+ .settings
target
.classpath
.project
Property changes on: sandbox/encore/shell
___________________________________________________________________
Name: svn:ignore
- .settings
target
+ .settings
target
.classpath
.project
14 years, 8 months
Seam SVN: r13338 - in sandbox/encore: core and 1 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-07-06 13:16:03 -0400 (Tue, 06 Jul 2010)
New Revision: 13338
Modified:
sandbox/encore/
sandbox/encore/core/
sandbox/encore/shell/
Log:
Ignores
Property changes on: sandbox/encore
___________________________________________________________________
Name: svn:ignore
- .settings
+ .settings
.project
Property changes on: sandbox/encore/core
___________________________________________________________________
Name: svn:ignore
+ .settings
target
Property changes on: sandbox/encore/shell
___________________________________________________________________
Name: svn:ignore
+ .settings
target
14 years, 8 months
Seam SVN: r13337 - in sandbox/encore: core and 61 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-07-06 13:14:08 -0400 (Tue, 06 Jul 2010)
New Revision: 13337
Added:
sandbox/encore/core/
sandbox/encore/core/pom.xml
sandbox/encore/core/src/
sandbox/encore/core/src/main/
sandbox/encore/core/src/main/java/
sandbox/encore/core/src/main/java/org/
sandbox/encore/core/src/main/java/org/jboss/
sandbox/encore/core/src/main/java/org/jboss/encore/
sandbox/encore/core/src/main/java/org/jboss/encore/grammar/
sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/
sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/JavaParser.java
sandbox/encore/core/src/main/java/org/jboss/encore/model/
sandbox/encore/core/src/main/java/org/jboss/encore/model/Mutable.java
sandbox/encore/core/src/main/java/org/jboss/encore/model/Project.java
sandbox/encore/core/src/main/java/org/jboss/encore/model/Stateful.java
sandbox/encore/core/src/main/java/org/jboss/encore/model/java/
sandbox/encore/core/src/main/java/org/jboss/seam/
sandbox/encore/core/src/main/java/org/jboss/seam/encore/
sandbox/encore/core/src/main/resources/
sandbox/encore/core/src/test/
sandbox/encore/core/src/test/java/
sandbox/encore/core/src/test/java/org/
sandbox/encore/core/src/test/java/org/jboss/
sandbox/encore/core/src/test/java/org/jboss/encore/
sandbox/encore/core/src/test/java/org/jboss/encore/grammar/
sandbox/encore/core/src/test/java/org/jboss/encore/grammar/java/
sandbox/encore/core/src/test/java/org/jboss/encore/grammar/java/JavaParserTest.java
sandbox/encore/core/src/test/java/org/jboss/seam/
sandbox/encore/core/src/test/java/org/jboss/seam/encore/
sandbox/encore/core/src/test/resources/
sandbox/encore/core/src/test/resources/org/
sandbox/encore/core/src/test/resources/org/jboss/
sandbox/encore/core/src/test/resources/org/jboss/encore/
sandbox/encore/core/src/test/resources/org/jboss/encore/grammar/
sandbox/encore/core/src/test/resources/org/jboss/encore/grammar/java/
sandbox/encore/core/src/test/resources/org/jboss/encore/grammar/java/MockClassFile.java
sandbox/encore/pom.xml
sandbox/encore/shell/
sandbox/encore/shell/pom.xml
sandbox/encore/shell/src/
sandbox/encore/shell/src/main/
sandbox/encore/shell/src/main/java/
sandbox/encore/shell/src/main/java/org/
sandbox/encore/shell/src/main/java/org/jboss/
sandbox/encore/shell/src/main/java/org/jboss/encore/
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Main.java
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Shell.java
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/events/
sandbox/encore/shell/src/main/java/org/jboss/encore/shell/events/StartupEvent.java
sandbox/encore/shell/src/main/resources/
sandbox/encore/shell/src/main/resources/META-INF/
sandbox/encore/shell/src/main/resources/META-INF/beans.xml
sandbox/encore/shell/src/test/
sandbox/encore/shell/src/test/java/
sandbox/encore/shell/src/test/java/org/
sandbox/encore/shell/src/test/java/org/jboss/
sandbox/encore/shell/src/test/java/org/jboss/encore/
sandbox/encore/shell/src/test/java/org/jboss/encore/shell/
sandbox/encore/shell/src/test/resources/
sandbox/encore/src/
sandbox/encore/src/main/
sandbox/encore/src/main/java/
sandbox/encore/src/main/java/org/
sandbox/encore/src/main/java/org/jboss/
sandbox/encore/src/main/java/org/jboss/encore/
sandbox/encore/src/main/java/org/jboss/encore/grammar/
sandbox/encore/src/main/java/org/jboss/encore/grammar/java/
sandbox/encore/src/main/java/org/jboss/encore/model/
sandbox/encore/src/main/java/org/jboss/encore/model/java/
sandbox/encore/src/main/java/org/jboss/encore/mojo/
sandbox/encore/src/main/java/org/jboss/seam/
sandbox/encore/src/main/java/org/jboss/seam/encore/
sandbox/encore/src/main/resources/
sandbox/encore/src/test/
sandbox/encore/src/test/java/
sandbox/encore/src/test/java/org/
sandbox/encore/src/test/java/org/jboss/
sandbox/encore/src/test/java/org/jboss/encore/
sandbox/encore/src/test/java/org/jboss/encore/grammar/
sandbox/encore/src/test/java/org/jboss/encore/grammar/java/
sandbox/encore/src/test/java/org/jboss/seam/
sandbox/encore/src/test/java/org/jboss/seam/encore/
sandbox/encore/src/test/resources/
sandbox/encore/src/test/resources/org/
sandbox/encore/src/test/resources/org/jboss/
sandbox/encore/src/test/resources/org/jboss/encore/
sandbox/encore/src/test/resources/org/jboss/encore/grammar/
sandbox/encore/src/test/resources/org/jboss/encore/grammar/java/
Modified:
sandbox/encore/
Log:
Module Structure Updates
Property changes on: sandbox/encore
___________________________________________________________________
Name: svn:ignore
+ .settings
Added: sandbox/encore/core/pom.xml
===================================================================
--- sandbox/encore/core/pom.xml (rev 0)
+++ sandbox/encore/core/pom.xml 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,59 @@
+<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>
+ <artifactId>encore</artifactId>
+ <groupId>org.jboss.encore</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>core</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <packaging>jar</packaging>
+ <name>Encore Core APIs</name>
+ <description>Simplified project bootstrapping and incremental enhancement framework</description>
+
+ <dependencies>
+ <!-- Resource manipulation dependencies -->
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-api</artifactId>
+ <version>1.0.0-alpha-9</version>
+ </dependency>
+
+ <!-- Eclipse Java Development Tools (JDT) parser and its (many) required
+ libraries -->
+ <dependency>
+ <groupId>org.eclipse.equinox</groupId>
+ <artifactId>common</artifactId>
+ <version>3.3.0-v20070426</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jdt</groupId>
+ <artifactId>core</artifactId>
+ <version>3.3.0-v_771</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse.core.runtime.compatibility</groupId>
+ <artifactId>auth</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.equinox</groupId>
+ <artifactId>app</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse</groupId>
+ <artifactId>text</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>filesystem</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/JavaParser.java
===================================================================
--- sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/JavaParser.java (rev 0)
+++ sandbox/encore/core/src/main/java/org/jboss/encore/grammar/java/JavaParser.java 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,44 @@
+package org.jboss.encore.grammar.java;
+
+import java.io.InputStream;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.internal.compiler.util.Util;
+
+public class JavaParser
+{
+
+ /**
+ * Parses and process the java source code as a compilation unit and the
+ * result it abstract syntax tree (AST) representation and this action uses
+ * the third edition of java Language Specification, that gets the
+ * possibility to support J2SE 5 during the parsing.
+ *
+ * @param source - the java source to be parsed (i.e. the char[] contains
+ * Java source).
+ * @return CompilationUnit Abstract syntax tree representation of a java
+ * source file.
+ */
+ public static CompilationUnit parse(InputStream inputStream)
+ {
+ try
+ {
+ char[] source = Util.getInputStreamAsCharArray(inputStream, inputStream.available(), "ISO8859_1");
+
+ ASTParser parser = ASTParser.newParser(AST.JLS3);
+ parser.setSource(source);
+ parser.setKind(ASTParser.K_COMPILATION_UNIT);
+ // to get more informations from the unit.
+ parser.setResolveBindings(true);
+
+ return (CompilationUnit) parser.createAST(null);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("InputStream must be a parsable java file: ", e);
+ }
+ }
+
+}
Added: sandbox/encore/core/src/main/java/org/jboss/encore/model/Mutable.java
===================================================================
--- sandbox/encore/core/src/main/java/org/jboss/encore/model/Mutable.java (rev 0)
+++ sandbox/encore/core/src/main/java/org/jboss/encore/model/Mutable.java 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.model;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public interface Mutable
+{
+
+}
Added: sandbox/encore/core/src/main/java/org/jboss/encore/model/Project.java
===================================================================
--- sandbox/encore/core/src/main/java/org/jboss/encore/model/Project.java (rev 0)
+++ sandbox/encore/core/src/main/java/org/jboss/encore/model/Project.java 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.model;
+
+/**
+ * The root node of the Project Object Graph (POG)
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public interface Project extends Mutable, Stateful
+{
+
+}
Added: sandbox/encore/core/src/main/java/org/jboss/encore/model/Stateful.java
===================================================================
--- sandbox/encore/core/src/main/java/org/jboss/encore/model/Stateful.java (rev 0)
+++ sandbox/encore/core/src/main/java/org/jboss/encore/model/Stateful.java 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.model;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public interface Stateful
+{
+
+}
Added: sandbox/encore/core/src/test/java/org/jboss/encore/grammar/java/JavaParserTest.java
===================================================================
--- sandbox/encore/core/src/test/java/org/jboss/encore/grammar/java/JavaParserTest.java (rev 0)
+++ sandbox/encore/core/src/test/java/org/jboss/encore/grammar/java/JavaParserTest.java 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,84 @@
+package org.jboss.encore.grammar.java;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.junit.Before;
+import org.junit.Test;
+
+public class JavaParserTest
+{
+ private InputStream stream;
+
+ @Before
+ public void reset()
+ {
+ stream = JavaParserTest.class
+ .getResourceAsStream("/org/jboss/encore/grammar/java/MockClassFile.java");
+ }
+
+ @Test
+ public void testParse() throws Exception
+ {
+ CompilationUnit unit = JavaParser.parse(stream);
+
+ @SuppressWarnings("unchecked")
+ List<ImportDeclaration> imports = unit.imports();
+
+ assertEquals("java.net.URL", imports.get(0).getName().getFullyQualifiedName());
+ }
+
+ @Test
+ public void testAddMethod() throws Exception
+ {
+ CompilationUnit unit = JavaParser.parse(stream);
+ MethodFinderVisitor visitor = new MethodFinderVisitor();
+ unit.accept(visitor);
+ List<MethodDeclaration> methods = visitor.getMethods();
+ TypeDeclaration parent = visitor.getParent();
+ MethodDeclaration newMethod = parent.getAST().newMethodDeclaration();
+ newMethod.setName(parent.getAST().newSimpleName("addedMethod"));
+ newMethod.setConstructor(false);
+ newMethod.setReturnType2(null);
+
+ // http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.jdt.doc.isv...
+ methods = visitor.getMethods();
+
+ assertTrue(methods.contains(newMethod));
+ }
+
+ public class MethodFinderVisitor extends ASTVisitor
+ {
+ private final List<MethodDeclaration> methods = new ArrayList<MethodDeclaration>();
+ private ASTNode parent;
+
+ @Override
+ public boolean visit(final TypeDeclaration node)
+ {
+ parent = node;
+ methods.addAll(Arrays.asList(node.getMethods()));
+ return super.visit(node);
+ }
+
+ public List<MethodDeclaration> getMethods()
+ {
+ return methods;
+ }
+
+ public TypeDeclaration getParent()
+ {
+ return (TypeDeclaration) parent;
+ }
+ }
+}
Added: sandbox/encore/core/src/test/resources/org/jboss/encore/grammar/java/MockClassFile.java
===================================================================
--- sandbox/encore/core/src/test/resources/org/jboss/encore/grammar/java/MockClassFile.java (rev 0)
+++ sandbox/encore/core/src/test/resources/org/jboss/encore/grammar/java/MockClassFile.java 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,22 @@
+package org.jboss.seam.encore.grammar.java;
+
+import java.net.URL;
+
+public class MockClassFile
+{
+ private String field;
+ private URL urlField;
+
+ public MockClassFile()
+ {
+ }
+
+ public void method()
+ {
+ }
+
+ public String valueOf(URL url)
+ {
+ return url.getPath();
+ }
+}
Added: sandbox/encore/pom.xml
===================================================================
--- sandbox/encore/pom.xml (rev 0)
+++ sandbox/encore/pom.xml 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,64 @@
+<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.jboss.encore</groupId>
+ <artifactId>encore</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Encore Framework</name>
+ <description>Simplified project bootstrapping, incremental
+ enhancement framework, and plugins </description>
+
+ <modules>
+ <module>core</module>
+ <module>shell</module>
+ </modules>
+
+ <properties>
+ <arquillian.version>1.0.0.Alpha2</arquillian.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian</groupId>
+ <artifactId>arquillian-junit</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <version>1.0-SP1</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: sandbox/encore/shell/pom.xml
===================================================================
--- sandbox/encore/shell/pom.xml (rev 0)
+++ sandbox/encore/shell/pom.xml 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,49 @@
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>encore</artifactId>
+ <groupId>org.jboss.encore</groupId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>shell</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <name>Encore Shell</name>
+ <description>A CLI runner for the Encore framework</description>
+
+ <dependencies>
+ <!-- CDI Dependencies -->
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-se</artifactId>
+ <version>1.0.1-Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-extensions</artifactId>
+ <version>1.0.0.Alpha2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.5.10</version>
+ </dependency>
+
+ <!-- Shell Libraries -->
+ <dependency>
+ <groupId>org.sonatype.jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>2.3</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Main.java
===================================================================
--- sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Main.java (rev 0)
+++ sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Main.java 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.shell;
+
+import org.jboss.encore.shell.events.StartupEvent;
+import org.jboss.weld.environment.se.Weld;
+import org.jboss.weld.environment.se.WeldContainer;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public class Main
+{
+ public static void main(final String[] args)
+ {
+ Weld weld = new Weld();
+ WeldContainer container = weld.initialize();
+ container.event().fire(new StartupEvent());
+ weld.shutdown();
+ }
+
+}
Added: sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Shell.java
===================================================================
--- sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Shell.java (rev 0)
+++ sandbox/encore/shell/src/main/java/org/jboss/encore/shell/Shell.java 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.shell;
+
+import java.util.List;
+
+import javax.enterprise.event.Observes;
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+import org.jboss.encore.shell.events.StartupEvent;
+import org.jboss.weld.environment.se.bindings.Parameters;
+import org.slf4j.Logger;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+@Singleton
+public class Shell
+{
+ @Inject
+ @Parameters
+ private List<String> parameters;
+
+ @Inject
+ Logger log;
+
+ public void init(@Observes final StartupEvent event)
+ {
+ System.out.println("Startup");
+ log.info("Encore Shell - Starting up.");
+ }
+}
\ No newline at end of file
Added: sandbox/encore/shell/src/main/java/org/jboss/encore/shell/events/StartupEvent.java
===================================================================
--- sandbox/encore/shell/src/main/java/org/jboss/encore/shell/events/StartupEvent.java (rev 0)
+++ sandbox/encore/shell/src/main/java/org/jboss/encore/shell/events/StartupEvent.java 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.encore.shell.events;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public class StartupEvent
+{
+
+}
Added: sandbox/encore/shell/src/main/resources/META-INF/beans.xml
===================================================================
--- sandbox/encore/shell/src/main/resources/META-INF/beans.xml (rev 0)
+++ sandbox/encore/shell/src/main/resources/META-INF/beans.xml 2010-07-06 17:14:08 UTC (rev 13337)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans>
+</beans>
14 years, 8 months
Seam SVN: r13336 - sandbox.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-07-06 13:11:41 -0400 (Tue, 06 Jul 2010)
New Revision: 13336
Added:
sandbox/encore/
Log:
Module Structure Update
14 years, 8 months