Author: bdaw
Date: 2008-02-09 08:17:09 -0500 (Sat, 09 Feb 2008)
New Revision: 9890
Added:
modules/portlet/trunk/portlet-controller/src/main/java/org/jboss/portal/portlet/controller/
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAPF.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java
Removed:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller/
Modified:
modules/portlet/trunk/bridge/pom.xml
modules/portlet/trunk/build/pom.xml
modules/portlet/trunk/federation/pom.xml
modules/portlet/trunk/jsr168api/pom.xml
modules/portlet/trunk/management/pom.xml
modules/portlet/trunk/pom.xml
modules/portlet/trunk/portlet-controller/pom.xml
modules/portlet/trunk/portlet/pom.xml
modules/portlet/trunk/test/pom.xml
modules/portlet/trunk/test/src/test/build.xml
Log:
extracted portlet-controller module and version update to 2.0-SNAPSHOT
Modified: modules/portlet/trunk/bridge/pom.xml
===================================================================
--- modules/portlet/trunk/bridge/pom.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/bridge/pom.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/build/pom.xml
===================================================================
--- modules/portlet/trunk/build/pom.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/build/pom.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JBoss Portal Portlet Module</name>
<
url>http://www.jboss.com/products/jbossmc</url>
@@ -40,7 +40,7 @@
<version.jboss-remoting>2.2.1.GA</version.jboss-remoting>
<version.jboss.portal.common>1.2.0-SNAPSHOT</version.jboss.portal.common>
<version.jboss.portal.web>1.2.0-SNAPSHOT</version.jboss.portal.web>
- <version.jboss.unit>1.2.0-SNAPSHOT</version.jboss.unit>
+ <version.jboss.unit>1.2.0-Beta1</version.jboss.unit>
<version.log4j>1.2.14</version.log4j>
<version.apache.commons-logging>1.1.1</version.apache.commons-logging>
<version.apache.commons-httpclient>3.0.1</version.apache.commons-httpclient>
Modified: modules/portlet/trunk/federation/pom.xml
===================================================================
--- modules/portlet/trunk/federation/pom.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/federation/pom.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/jsr168api/pom.xml
===================================================================
--- modules/portlet/trunk/jsr168api/pom.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/jsr168api/pom.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/management/pom.xml
===================================================================
--- modules/portlet/trunk/management/pom.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/management/pom.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/pom.xml
===================================================================
--- modules/portlet/trunk/pom.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/pom.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -5,7 +5,7 @@
<artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Portlet Module Aggregator</name>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<
url>http://labs.jboss.com/jbossportal</url>
<dependencies/>
@@ -29,6 +29,7 @@
<module>build</module>
<module>jsr168api</module>
<module>portlet</module>
+ <module>portlet-controller</module>
<module>bridge</module>
<module>federation</module>
<module>management</module>
Modified: modules/portlet/trunk/portlet/pom.xml
===================================================================
--- modules/portlet/trunk/portlet/pom.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/portlet/pom.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -40,6 +40,14 @@
<artifactId>jaxb-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.5.0</version>
+ <scope>system</scope>
+ <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
+ </dependency>
+
<!--TEST SCOPE-->
<dependency>
<groupId>org.jboss.unit</groupId>
@@ -100,6 +108,27 @@
</reports>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.myfaces.tobago</groupId>
+ <artifactId>maven-apt-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <configuration>
+ <!--<generated>.apt_generated</generated>-->
+ <!--<aptOptions>x=3</aptOptions>-->
+ <target>1.5</target>
+ <nocompile>true</nocompile>
+ <showWarnings>true</showWarnings>
+
<factory>org.jboss.portal.unit.reports.TestCaseAPF</factory>
+ </configuration>
+ <goals>
+ <goal>testExecute</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAPF.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAPF.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAPF.java 2008-02-09
13:17:09 UTC (rev 9890)
@@ -0,0 +1,65 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* 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.portal.unit.reports;
+
+import com.sun.mirror.apt.AnnotationProcessorFactory;
+import com.sun.mirror.apt.AnnotationProcessor;
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.apt.AnnotationProcessors;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+
+import java.util.Collection;
+import java.util.Set;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class TestCaseAPF implements AnnotationProcessorFactory
+{
+ public Collection<String> supportedOptions()
+ {
+ return Collections.emptyList();
+ }
+
+ public Collection<String> supportedAnnotationTypes()
+ {
+ return
Collections.singletonList("org.jboss.portal.unit.annotations.TestCase");
+ }
+
+ public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration>
annotationTypeDeclarations, AnnotationProcessorEnvironment
annotationProcessorEnvironment)
+ {
+ System.out.println("### HERE");
+ AnnotationProcessor result;
+ if(annotationTypeDeclarations.isEmpty()) {
+ result = AnnotationProcessors.NO_OP;
+ }
+ else {
+ // Next Step - implement this class:
+ result = new TestCaseAnnotationProcessor(annotationProcessorEnvironment);
+ }
+ return result;
+
+ }
+}
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java 2008-02-09
13:17:09 UTC (rev 9890)
@@ -0,0 +1,114 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* 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.portal.unit.reports;
+
+import com.sun.mirror.apt.AnnotationProcessor;
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+import com.sun.mirror.declaration.Declaration;
+import com.sun.mirror.declaration.AnnotationMirror;
+import com.sun.mirror.declaration.AnnotationTypeElementDeclaration;
+import com.sun.mirror.declaration.AnnotationValue;
+import com.sun.mirror.util.SourcePosition;
+
+import java.util.Collection;
+import java.util.Map;
+import java.io.File;
+import java.io.OutputStream;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import java.io.FileNotFoundException;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class TestCaseAnnotationProcessor implements AnnotationProcessor
+{
+
+ private AnnotationProcessorEnvironment environment;
+
+ private AnnotationTypeDeclaration testCaseDeclaration;
+
+ public TestCaseAnnotationProcessor(AnnotationProcessorEnvironment env) {
+
+ environment = env;
+ testCaseDeclaration = (AnnotationTypeDeclaration) environment
+ .getTypeDeclaration("org.jboss.portal.unit.annotations.TestCase");
+ }
+
+ public void process()
+ {
+ Collection<Declaration> declarations = environment
+ .getDeclarationsAnnotatedWith(testCaseDeclaration);
+ for (Declaration declaration : declarations) {
+ processAnnotations(declaration);
+ }
+ }
+
+ private void processAnnotations(Declaration declaration) {
+ // Get all of the annotation usage for this declaration.
+ // the annotation mirror is a reflection of what is in the source.
+
+ File f = new File("./apt-output.txt");
+
+ PrintStream ps = null;
+
+ try
+ {
+ ps = new PrintStream(f);
+ }
+ catch (FileNotFoundException e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings |
File Templates.
+ }
+
+
+ Collection<AnnotationMirror> annotations = declaration
+ .getAnnotationMirrors();
+ // iterate over the mirrors.
+ for (AnnotationMirror mirror : annotations) {
+ // if the mirror in this iteration is for our note declaration...
+ if(mirror.getAnnotationType().getDeclaration().equals(
+ testCaseDeclaration)) {
+
+ // print out the goodies.
+ SourcePosition position = mirror.getPosition();
+ Map<AnnotationTypeElementDeclaration, AnnotationValue> values = mirror
+ .getElementValues();
+
+ ps.println("Declaration: " + declaration.toString());
+ ps.println("Position: " + position);
+ ps.println("Values:");
+ for (Map.Entry<AnnotationTypeElementDeclaration, AnnotationValue> entry :
values
+ .entrySet()) {
+ AnnotationTypeElementDeclaration elemDecl = entry.getKey();
+ AnnotationValue value = entry.getValue();
+ ps.println(" " + elemDecl + "=" + value);
+ }
+ }
+ }
+ ps.close();
+
+ }
+}
Modified: modules/portlet/trunk/portlet-controller/pom.xml
===================================================================
--- modules/portlet/trunk/portlet-controller/pom.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/portlet-controller/pom.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -17,7 +17,7 @@
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>portlet-portlet</artifactId>
<version>${project.version}</version>
- <type>test-jar</type>
+ <type>jar</type>
</dependency>
<!--TEST SCOPE-->
Copied:
modules/portlet/trunk/portlet-controller/src/main/java/org/jboss/portal/portlet/controller
(from rev 9884,
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/controller)
Modified: modules/portlet/trunk/test/pom.xml
===================================================================
--- modules/portlet/trunk/test/pom.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/test/pom.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -19,8 +19,14 @@
<version>${project.version}</version>
<type>test-jar</type>
</dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-controller</artifactId>
+ <version>${project.version}</version>
+ </dependency>
- <!--TEST SCOPE-->
+
+
<dependency>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>portlet-portlet</artifactId>
@@ -355,6 +361,8 @@
value="${maven.dependency.javax.portlet.portlet-api.jar.path}"/>
<property name="dependency.portal-portlet.jar"
value="${maven.dependency.org.jboss.portal.portlet.portlet-portlet.jar.path}"/>
+ <property
name="dependency.portal-portlet-controller.jar"
+
value="${maven.dependency.org.jboss.portal.portlet.portlet-controller.jar.path}"/>
<property name="dependency.portal-portlet-tests.test-jar"
value="${maven.dependency.org.jboss.portal.portlet.portlet-portlet.tests.test-jar.path}"/>
<property name="dependency.cargo-core-uberjar.jar"
Modified: modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- modules/portlet/trunk/test/src/test/build.xml 2008-02-09 12:42:28 UTC (rev 9889)
+++ modules/portlet/trunk/test/src/test/build.xml 2008-02-09 13:17:09 UTC (rev 9890)
@@ -127,6 +127,9 @@
<path id="mc.portal-portlet">
<pathelement path="${dependency.portal-portlet.jar}"/>
</path>
+ <path id="mc.portal-portlet-controller">
+ <pathelement
path="${dependency.portal-portlet-controller.jar}"/>
+ </path>
<path id="mc.jaxb-api">
<pathelement path="${dependency.jaxb-api.jar}"/>
</path>
@@ -394,10 +397,14 @@
<!-- -->
<path refid="mc.portal-common"/>
+ <path refid="mc.portal-portlet-controller"/>
+
<!-- Remote plugin -->
<path refid="mc.jboss-remoting"/>
<path refid="mc.portal-test-generic"/>
+
+
<!-- MC 2.0.0.Beta4 -->
<path refid="mc.trove"/>
<path refid="mc.javassist"/>
@@ -430,6 +437,8 @@
<!-- -->
<path refid="mc.portal-common"/>
+ <path refid="mc.portal-portlet-controller"/>
+
<!-- Remote plugin -->
<path refid="mc.jboss-remoting"/>
<path refid="mc.portal-test-generic"/>
@@ -697,8 +706,11 @@
<!-- -->
<fileset dir="${target}"
includes="portlet-test-lib.jar"/>
+
<path refid="mc.portal-common"/>
+ <path refid="mc.portal-portlet-controller"/>
+
<!-- MC 2.0.0.Beta4 -->
<path refid="mc.trove"/>
<path refid="mc.javassist"/>