JBoss Rich Faces SVN: r16814 - in root/cdk/trunk: bom and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-04-26 19:16:09 -0400 (Mon, 26 Apr 2010)
New Revision: 16814
Modified:
root/cdk/trunk/bom/pom.xml
root/cdk/trunk/pom.xml
Log:
fix maven release plugin issue
Modified: root/cdk/trunk/bom/pom.xml
===================================================================
--- root/cdk/trunk/bom/pom.xml 2010-04-26 20:54:10 UTC (rev 16813)
+++ root/cdk/trunk/bom/pom.xml 2010-04-26 23:16:09 UTC (rev 16814)
@@ -206,40 +206,40 @@
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>commons</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>commons</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
- <version>4.0.0-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>attributes</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>annotations</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>xinclude</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>generator</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
-</project>
\ No newline at end of file
+</project>
Modified: root/cdk/trunk/pom.xml
===================================================================
--- root/cdk/trunk/pom.xml 2010-04-26 20:54:10 UTC (rev 16813)
+++ root/cdk/trunk/pom.xml 2010-04-26 23:16:09 UTC (rev 16814)
@@ -52,6 +52,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
+ <version>2.0</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagBase>https://svn.jboss.org/repos/richfaces/root/cdk/tags</tagBase>
@@ -71,4 +72,4 @@
</build>
-</project>
\ No newline at end of file
+</project>
14 years
JBoss Rich Faces SVN: r16813 - root/cdk/trunk.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-04-26 16:54:10 -0400 (Mon, 26 Apr 2010)
New Revision: 16813
Modified:
root/cdk/trunk/pom.xml
Log:
version submodules by default
Modified: root/cdk/trunk/pom.xml
===================================================================
--- root/cdk/trunk/pom.xml 2010-04-26 20:43:19 UTC (rev 16812)
+++ root/cdk/trunk/pom.xml 2010-04-26 20:54:10 UTC (rev 16813)
@@ -53,6 +53,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
<tagBase>https://svn.jboss.org/repos/richfaces/root/cdk/tags</tagBase>
<!-- As we need access to our own artifacts -->
<preparationGoals>install</preparationGoals>
14 years
JBoss Rich Faces SVN: r16812 - in root/cdk/trunk: plugins and 17 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-04-26 16:43:19 -0400 (Mon, 26 Apr 2010)
New Revision: 16812
Added:
root/cdk/trunk/plugins/commons/
root/cdk/trunk/plugins/commons/pom.xml
root/cdk/trunk/plugins/commons/src/
root/cdk/trunk/plugins/commons/src/main/
root/cdk/trunk/plugins/commons/src/main/java/
root/cdk/trunk/plugins/commons/src/main/java/org/
root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/
root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/
root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Implementation.java
root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/JavaLogger.java
root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Logger.java
root/cdk/trunk/plugins/commons/src/test/
root/cdk/trunk/plugins/commons/src/test/java/
root/cdk/trunk/plugins/commons/src/test/java/org/
root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/
root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/
root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/As.java
root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/AsProvider.java
root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/CdkTestRunner.java
root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Mock.java
root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/MockController.java
root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Stub.java
Removed:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Implementation.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/JavaLogger.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Logger.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/As.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/AsProvider.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestRunner.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Mock.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/MockController.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/RunnerTest.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Stub.java
Modified:
root/cdk/trunk/bom/pom.xml
root/cdk/trunk/plugins/generator/pom.xml
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component/
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/xml-configured-component/
root/cdk/trunk/plugins/pom.xml
Log:
RESOLVED - issue RF-7750: Create a Bill Of Materials for CDK
https://jira.jboss.org/jira/browse/RF-7750
Modified: root/cdk/trunk/bom/pom.xml
===================================================================
--- root/cdk/trunk/bom/pom.xml 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/bom/pom.xml 2010-04-26 20:43:19 UTC (rev 16812)
@@ -23,6 +23,18 @@
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/cdk/trunk/bom</developerConnection>
<url>http://fisheye.jboss.org/browse/Richfaces/cdk/trunk/bom</url>
</scm>
+ <build>
+ <!-- Define CDK plugin that is used by JSF component projects -->
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
<dependencyManagement>
<dependencies>
<!-- JSF -->
@@ -191,6 +203,18 @@
<version>1.1.2</version>
</dependency>
<!-- Projects -->
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>commons</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>commons</artifactId>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>attributes</artifactId>
Property changes on: root/cdk/trunk/plugins/commons
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.project
.classpath
.clover
bin
Added: root/cdk/trunk/plugins/commons/pom.xml
===================================================================
--- root/cdk/trunk/plugins/commons/pom.xml (rev 0)
+++ root/cdk/trunk/plugins/commons/pom.xml 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>maven-plugins</artifactId>
+ <groupId>org.richfaces.cdk</groupId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>commons</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>commons</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Copied: root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Implementation.java (from rev 16811, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Implementation.java)
===================================================================
--- root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Implementation.java (rev 0)
+++ root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Implementation.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,49 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+
+/**
+ * <p class="changed_added_4_0">
+ * This annotation can be applied to any injection classifier annotation to define implementation class that should be
+ * used to call {@link com.google.inject.binder.AnnotatedBindingBuilder#annotatedWith(Annotation)}
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+@Target(ANNOTATION_TYPE)
+@Retention(RUNTIME)
+@Documented
+public @interface Implementation {
+ public Class<? extends Annotation> value();
+}
Property changes on: root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Implementation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Copied: root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/JavaLogger.java (from rev 16811, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/JavaLogger.java)
===================================================================
--- root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/JavaLogger.java (rev 0)
+++ root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/JavaLogger.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,192 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.util.logging.Level;
+
+/**
+ * <p class="changed_added_4_0">That logger delegates all calls to the JDK {@link java.util.logging.Logger}</p>
+ *
+ * @author asmirnov(a)exadel.com
+ */
+public class JavaLogger implements Logger {
+
+ public static final String CDK_LOG = "org.richfaces.cdk";
+
+ private int errorCount = 0;
+
+ private java.util.logging.Logger jdkLogger = java.util.logging.Logger.getLogger(CDK_LOG);
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#debug(java.lang.CharSequence)
+ */
+ @Override
+ public void debug(CharSequence content) {
+ jdkLogger.fine(String.valueOf(content));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#debug(java.lang.CharSequence, java.lang.Throwable)
+ */
+ @Override
+ public void debug(CharSequence content, Throwable error) {
+ jdkLogger.log(Level.FINE, String.valueOf(content), error);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#debug(java.lang.Throwable)
+ */
+ @Override
+ public void debug(Throwable error) {
+ jdkLogger.log(Level.FINE, "", error);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#error(java.lang.CharSequence)
+ */
+ @Override
+ public void error(CharSequence content) {
+ errorCount++;
+ jdkLogger.severe(String.valueOf(content));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#error(java.lang.CharSequence, java.lang.Throwable)
+ */
+ @Override
+ public void error(CharSequence content, Throwable error) {
+ errorCount++;
+ jdkLogger.log(Level.SEVERE, String.valueOf(content), error);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#error(java.lang.Throwable)
+ */
+ @Override
+ public void error(Throwable error) {
+ errorCount++;
+ jdkLogger.log(Level.SEVERE, "", error);
+ }
+
+ @Override
+ public int getErrorCount() {
+ return errorCount;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#info(java.lang.CharSequence)
+ */
+ @Override
+ public void info(CharSequence content) {
+ jdkLogger.info(String.valueOf(content));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#info(java.lang.CharSequence, java.lang.Throwable)
+ */
+ @Override
+ public void info(CharSequence content, Throwable error) {
+ jdkLogger.log(Level.INFO, String.valueOf(content), error);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#info(java.lang.Throwable)
+ */
+ @Override
+ public void info(Throwable error) {
+ jdkLogger.log(Level.INFO, "", error);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#isDebugEnabled()
+ */
+ @Override
+ public boolean isDebugEnabled() {
+ return jdkLogger.isLoggable(Level.FINE);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#isErrorEnabled()
+ */
+ @Override
+ public boolean isErrorEnabled() {
+ return jdkLogger.isLoggable(Level.SEVERE);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#isInfoEnabled()
+ */
+ @Override
+ public boolean isInfoEnabled() {
+ return jdkLogger.isLoggable(Level.INFO);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#isWarnEnabled()
+ */
+ @Override
+ public boolean isWarnEnabled() {
+ return jdkLogger.isLoggable(Level.WARNING);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#warn(java.lang.CharSequence)
+ */
+ @Override
+ public void warn(CharSequence content) {
+ jdkLogger.warning(String.valueOf(content));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#warn(java.lang.CharSequence, java.lang.Throwable)
+ */
+ @Override
+ public void warn(CharSequence content, Throwable error) {
+ jdkLogger.log(Level.WARNING, String.valueOf(content), error);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.richfaces.cdk.Logger#warn(java.lang.Throwable)
+ */
+ @Override
+ public void warn(Throwable error) {
+ jdkLogger.log(Level.WARNING, "", error);
+ }
+}
Property changes on: root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/JavaLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Copied: root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Logger.java (from rev 16811, root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Logger.java)
===================================================================
--- root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Logger.java (rev 0)
+++ root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Logger.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,68 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import com.google.inject.ImplementedBy;
+
+/**
+ * That interface hides current logging system from generator classes.
+ * Concrete tools ( Maven, Ant, JUnit ) should provide appropriate logger instance that delegates
+ * messages to the current log system.
+ *
+ * @author shura
+ */
+(a)ImplementedBy(JavaLogger.class)
+public interface Logger {
+ public boolean isDebugEnabled();
+
+ public void debug(CharSequence content);
+
+ public void debug(CharSequence content, Throwable error);
+
+ public void debug(Throwable error);
+
+ public boolean isInfoEnabled();
+
+ public void info(CharSequence content);
+
+ public void info(CharSequence content, Throwable error);
+
+ public void info(Throwable error);
+
+ public boolean isWarnEnabled();
+
+ public void warn(CharSequence content);
+
+ public void warn(CharSequence content, Throwable error);
+
+ public void warn(Throwable error);
+
+ public boolean isErrorEnabled();
+
+ public void error(CharSequence content);
+
+ public void error(CharSequence content, Throwable error);
+
+ public void error(Throwable error);
+
+ public int getErrorCount();
+}
Property changes on: root/cdk/trunk/plugins/commons/src/main/java/org/richfaces/cdk/Logger.java
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Copied: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/As.java (from rev 16811, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/As.java)
===================================================================
--- root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/As.java (rev 0)
+++ root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/As.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD })
+public @interface As {
+ public Class<?> value();
+}
Property changes on: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/As.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Copied: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/AsProvider.java (from rev 16811, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/AsProvider.java)
===================================================================
--- root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/AsProvider.java (rev 0)
+++ root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/AsProvider.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,44 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.google.inject.Provider;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD })
+public @interface AsProvider {
+ public Class<? extends Provider<?>> value();
+}
Property changes on: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/AsProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Copied: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/CdkTestRunner.java (from rev 16811, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestRunner.java)
===================================================================
--- root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/CdkTestRunner.java (rev 0)
+++ root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/CdkTestRunner.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,242 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Modifier;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.easymock.EasyMock;
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.BindingAnnotation;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+import com.google.inject.Provider;
+import com.google.inject.TypeLiteral;
+import com.google.inject.binder.AnnotatedBindingBuilder;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public class CdkTestRunner extends BlockJUnit4ClassRunner {
+
+ /**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @param klass
+ * @throws InitializationError
+ * @throws InitializationError
+ */
+ public CdkTestRunner(Class<?> klass) throws InitializationError {
+ super(klass);
+ }
+
+ /**
+ * Gets all declared fields and all inherited fields.
+ */
+ protected Set<Field> getFields(Class<?> c) {
+ Set<Field> fields = new HashSet<Field>(Arrays.asList(c.getDeclaredFields()));
+ while ((c = c.getSuperclass()) != null) {
+ for (Field f : c.getDeclaredFields()) {
+ if (!Modifier.isStatic(f.getModifiers()) && !Modifier.isPrivate(f.getModifiers())) {
+ fields.add(f);
+ }
+ }
+ }
+ return fields;
+ }
+
+ @Override
+ protected void runChild(FrameworkMethod method, RunNotifier notifier) {
+ super.runChild(method, notifier);
+ }
+
+ @Override
+ protected Object createTest() throws Exception {
+ Class<?> c = getTestClass().getJavaClass();
+ Set<Field> testFields = getFields(c);
+
+ // make sure we have one (and only one) @Unit field
+ // Field unitField = getUnitField(testFields);
+ // if ( unitField.getAnnotation(Mock.class) != null ) {
+ // throw new IncompatibleAnnotationException(Unit.class, Mock.class);
+ // }
+ //
+ final Map<Field, Binding> fieldValues = getMockValues(testFields);
+ // if ( fieldValues.containsKey(unitField)) {
+ // throw new IncompatibleAnnotationException(Unit.class, unitField.getType());
+ // }
+
+ Object test = createTest(c, fieldValues);
+
+ // any field values created by AtUnit but not injected by the container are injected here.
+ for (Field field : fieldValues.keySet()) {
+ Binding binding = fieldValues.get(field);
+ field.setAccessible(true);
+ if (null != binding.value && field.get(test) == null) {
+ field.set(test, binding.value);
+ }
+ }
+
+ return test;
+ }
+
+ private Object createTest(Class<?> testClass, Map<Field, Binding> fieldValues) throws Exception {
+ FieldModule fields = new FieldModule(fieldValues);
+
+ Injector injector;
+ if (Module.class.isAssignableFrom(testClass)) {
+ injector = Guice.createInjector(fields, (Module) testClass.newInstance());
+ } else {
+ injector = Guice.createInjector(fields);
+ }
+ return injector.getInstance(testClass);
+ }
+
+ protected static final class FieldModule extends AbstractModule implements MockController {
+ final Map<Field, Binding> fields;
+
+ public FieldModule(Map<Field, Binding> fields) {
+ this.fields = fields;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void configure() {
+ // Bind mock controllet to this instance, to automatically replay/verify all mocks created by runner.
+ bind(MockController.class).toInstance(this);
+ // map field values by type
+ for (Field field : fields.keySet()) {
+ TypeLiteral literal = TypeLiteral.get(field.getGenericType());
+ AnnotatedBindingBuilder builder = bind(literal);
+ // Check field annotations.
+ Annotation[] fieldAnnotations = field.getAnnotations();
+ for (Annotation annotation : fieldAnnotations) {
+ Class<? extends Annotation> annotationType = annotation.annotationType();
+ if (/* annotationType.isAnnotationPresent(Qualifier.class)|| */annotationType
+ .isAnnotationPresent(BindingAnnotation.class)) {
+ Implementation implementation = annotationType.getAnnotation(Implementation.class);
+ if (null != implementation) {
+ try {
+ Annotation value =
+ implementation.value().getConstructor(annotationType).newInstance(annotation);
+ builder.annotatedWith(value);
+ } catch (SecurityException e) {
+ throw new RuntimeException(e);
+ } catch (NoSuchMethodException e) {
+ builder.annotatedWith(annotationType);
+ } catch (IllegalArgumentException e) {
+ throw new RuntimeException(e);
+ } catch (InstantiationException e) {
+ throw new RuntimeException(e);
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+ } else {
+ builder.annotatedWith(annotationType);
+ }
+ }
+ }
+ Binding binding = fields.get(field);
+ if (null != binding.value) {
+ builder.toInstance(binding.value);
+ } else if (null != binding.implementation) {
+ builder.to(binding.implementation);
+ } else if (null != binding.provider) {
+ builder.toProvider(binding.provider);
+ }
+ }
+ }
+
+ @Override
+ public void replay() {
+ for (Binding field : fields.values()) {
+ if(null != field.value){
+ EasyMock.replay(field.value);
+ }
+ }
+ }
+
+ @Override
+ public void verify() {
+ for (Binding field : fields.values()) {
+ if(null != field.value){
+ EasyMock.verify(field.value);
+ }
+ }
+ }
+ }
+
+ protected static final class Binding {
+ private Object value;
+ private Class<?> implementation;
+ private Class<? extends Provider<?>> provider;
+ }
+
+ private Map<Field, Binding> getMockValues(Set<Field> testFields) {
+ Map<Field, Binding> mocksAndStubs = new HashMap<Field, Binding>();
+ // TODO - create annotation attribute that tells runner to use the scme Mock Controller to create related mocks.
+ for (Field field : testFields) {
+ if (field.getAnnotation(Mock.class) != null) {
+ Binding bind = new Binding();
+ bind.value = EasyMock.createStrictMock(field.getType());
+ mocksAndStubs.put(field, bind);
+ } else if (field.getAnnotation(Stub.class) != null) {
+ Binding bind = new Binding();
+ bind.value = EasyMock.createNiceMock(field.getType());
+ mocksAndStubs.put(field, bind);
+ } else if (null != field.getAnnotation(As.class)) {
+ Binding bind = new Binding();
+ bind.implementation = field.getAnnotation(As.class).value();
+ mocksAndStubs.put(field, bind);
+ } else if (null != field.getAnnotation(AsProvider.class)) {
+ Binding bind = new Binding();
+ bind.provider = field.getAnnotation(AsProvider.class).value();
+ mocksAndStubs.put(field, bind);
+ }
+ }
+
+ return mocksAndStubs;
+ }
+
+}
Property changes on: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/CdkTestRunner.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Copied: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Mock.java (from rev 16811, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Mock.java)
===================================================================
--- root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Mock.java (rev 0)
+++ root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Mock.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD })
+public @interface Mock {
+
+}
Property changes on: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Mock.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Copied: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/MockController.java (from rev 16811, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/MockController.java)
===================================================================
--- root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/MockController.java (rev 0)
+++ root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/MockController.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,43 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+/**
+ * <p class="changed_added_4_0">Instance of an Object implemented this interface can be injected into test class to simplify mock objects manipulations.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface MockController {
+
+ /**
+ * <p class="changed_added_4_0">Repaly all mock objects created by the {@link CdkTestRunner}</p>
+ */
+ public void replay();
+
+ /**
+ * <p class="changed_added_4_0">Verify all mock objects created by the {@link CdkTestRunner}</p>
+ */
+ public void verify();
+
+}
Property changes on: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/MockController.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Stub.java (from rev 16811, root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Stub.java)
===================================================================
--- root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Stub.java (rev 0)
+++ root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Stub.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -0,0 +1,42 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.cdk;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0">
+ * </p>
+ *
+ * @author asmirnov(a)exadel.com
+ *
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target( { ElementType.FIELD })
+public @interface Stub {
+
+}
Property changes on: root/cdk/trunk/plugins/commons/src/test/java/org/richfaces/cdk/Stub.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
Modified: root/cdk/trunk/plugins/generator/pom.xml
===================================================================
--- root/cdk/trunk/plugins/generator/pom.xml 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/pom.xml 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,203 +1,212 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <parent>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>maven-plugins</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>generator</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <name>Java Server Faces component generator</name>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <parent>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-plugins</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>generator</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>Java Server Faces component generator</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>guice-maven-plugin</artifactId>
- <!--<configuration>-->
- <!--<mainClass>mypackage.boot.camel.CamelStartup</mainClass>-->
- <!--</configuration>-->
- </plugin>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-resources</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <properties>
- <sourceSchema>src/main/resources/META-INF/schema/xhtml-el.xsd</sourceSchema>
- <targetNamespace>http://richfaces.org/cdk/xhtml-el</targetNamespace>
- <outputFile>generated-resources/META-INF/cdk/attributes/xhtml-el.xml</outputFile>
- </properties>
- <classpath>
- <element>
- <groupId>com.sun.xsom</groupId>
- <artifactId>xsom</artifactId>
- </element>
- <element>
- <groupId>com.google.collections</groupId>
- <artifactId>google-collections</artifactId>
- </element>
- </classpath>
- <source>${project.basedir}/src/main/script/SchemaAttributesParserTask.groovy</source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <useManifestOnlyJar>false</useManifestOnlyJar>
- <useSystemClassLoader>true</useSystemClassLoader>
- </configuration>
- </plugin>
- <!--
- plugin> <groupId>org.codehaus.mojo</groupId>
- <artifactId>jaxb2-maven-plugin</artifactId> <executions> <execution>
- <goals> <goal>xjc</goal> </goals> </execution> </executions>
- <configuration> <packageName>org.richfaces.cdk.model</packageName>
- </configuration> </plugin
- -->
- </plugins>
- <resources>
- <resource>
- <directory>
- src/main/resources
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>guice-maven-plugin</artifactId>
+ <!--<configuration>-->
+ <!--<mainClass>mypackage.boot.camel.CamelStartup</mainClass>-->
+ <!--</configuration>-->
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <properties>
+ <sourceSchema>src/main/resources/META-INF/schema/xhtml-el.xsd</sourceSchema>
+ <targetNamespace>http://richfaces.org/cdk/xhtml-el</targetNamespace>
+ <outputFile>generated-resources/META-INF/cdk/attributes/xhtml-el.xml</outputFile>
+ </properties>
+ <classpath>
+ <element>
+ <groupId>com.sun.xsom</groupId>
+ <artifactId>xsom</artifactId>
+ </element>
+ <element>
+ <groupId>com.google.collections</groupId>
+ <artifactId>google-collections</artifactId>
+ </element>
+ </classpath>
+ <source>${project.basedir}/src/main/script/SchemaAttributesParserTask.groovy</source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <useManifestOnlyJar>false</useManifestOnlyJar>
+ <useSystemClassLoader>true</useSystemClassLoader>
+ </configuration>
+ </plugin>
+ <!--
+ plugin> <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jaxb2-maven-plugin</artifactId> <executions> <execution>
+ <goals> <goal>xjc</goal> </goals> </execution> </executions>
+ <configuration> <packageName>org.richfaces.cdk.model</packageName>
+ </configuration> </plugin
+ -->
+ </plugins>
+ <resources>
+ <resource>
+ <directory>
+ src/main/resources
</directory>
- </resource>
- <resource>
- <directory>
- ${project.build.directory}/generated-resources
+ </resource>
+ <resource>
+ <directory>
+ ${project.build.directory}/generated-resources
</directory>
- </resource>
- </resources>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-guice</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- <dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
- </dependency>
+ </resource>
+ </resources>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-guice</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.freemarker</groupId>
+ <artifactId>freemarker</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>commons</artifactId>
+ </dependency>
<dependency>
- <groupId>org.freemarker</groupId>
- <artifactId>freemarker</artifactId>
- </dependency>
- <dependency>
<groupId>org.richfaces.cdk</groupId>
- <artifactId>annotations</artifactId>
+ <artifactId>commons</artifactId>
+ <classifier>tests</classifier>
+ <scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>attributes</artifactId>
- </dependency>
- <dependency>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>xinclude</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.el</groupId>
- <artifactId>jboss-el</artifactId>
- </dependency>
- <dependency>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </dependency>
- <!--
- <dependency> <groupId>com.google.collections</groupId>
- <artifactId>google-collections</artifactId>
- <version>1.0-rc2</version> </dependency> <dependency>
- <groupId>org.w3c.css</groupId> <artifactId>sac</artifactId>
- <version>1.3</version> </dependency>
- -->
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.collections</groupId>
- <artifactId>google-collections</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.xsom</groupId>
- <artifactId>xsom</artifactId>
- </dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-model</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-core</artifactId>
- </dependency>
-<!-- <dependency>
- <groupId>com.google.code.guice</groupId>
- <artifactId>guice</artifactId>
- <version>1.0</version>
- </dependency>-->
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>attributes</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>xinclude</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.el</groupId>
+ <artifactId>jboss-el</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </dependency>
+ <!--
+ <dependency> <groupId>com.google.collections</groupId>
+ <artifactId>google-collections</artifactId>
+ <version>1.0-rc2</version> </dependency> <dependency>
+ <groupId>org.w3c.css</groupId> <artifactId>sac</artifactId>
+ <version>1.3</version> </dependency>
+ -->
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.collections</groupId>
+ <artifactId>google-collections</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xsom</groupId>
+ <artifactId>xsom</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ </dependency>
+ <!--
+ <dependency> <groupId>com.google.code.guice</groupId>
+ <artifactId>guice</artifactId> <version>1.0</version> </dependency>
+ -->
-<!-- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
- </dependency>-->
- <dependency>
- <groupId>com.google.inject</groupId>
- <artifactId>guice</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.inject.extensions</groupId>
- <artifactId>guice-multibindings</artifactId>
- </dependency>
-<!-- <dependency>
- <groupId>com.google.inject.extensions</groupId>
- <artifactId>guice-grapher</artifactId>
- </dependency>-->
- <!-- <dependency>
- <groupId>com.google.inject.extensions</groupId>
- <artifactId>guice-assisted-inject</artifactId>
- </dependency>-->
- </dependencies>
+ <!--
+ <dependency> <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId> <version>1</version>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-multibindings</artifactId>
+ </dependency>
+ <!--
+ <dependency> <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-grapher</artifactId> </dependency>
+ -->
+ <!--
+ <dependency> <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-assisted-inject</artifactId> </dependency>
+ -->
+ </dependencies>
</project>
\ No newline at end of file
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Implementation.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Implementation.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Implementation.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,44 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * <p class="changed_added_4_0"></p>
- * @author asmirnov(a)exadel.com
- *
- */
-@Target(ANNOTATION_TYPE)
-@Retention(RUNTIME)
-@Documented
-public @interface Implementation {
- public Class<? extends Annotation> value();
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/JavaLogger.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/JavaLogger.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/JavaLogger.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,192 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import java.util.logging.Level;
-
-/**
- * <p class="changed_added_4_0">That logger delegates all calls to the JDK {@link java.util.logging.Logger}</p>
- *
- * @author asmirnov(a)exadel.com
- */
-public class JavaLogger implements Logger {
-
- public static final String CDK_LOG = "org.richfaces.cdk";
-
- private int errorCount = 0;
-
- private java.util.logging.Logger jdkLogger = java.util.logging.Logger.getLogger(CDK_LOG);
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#debug(java.lang.CharSequence)
- */
- @Override
- public void debug(CharSequence content) {
- jdkLogger.fine(String.valueOf(content));
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#debug(java.lang.CharSequence, java.lang.Throwable)
- */
- @Override
- public void debug(CharSequence content, Throwable error) {
- jdkLogger.log(Level.FINE, String.valueOf(content), error);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#debug(java.lang.Throwable)
- */
- @Override
- public void debug(Throwable error) {
- jdkLogger.log(Level.FINE, "", error);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#error(java.lang.CharSequence)
- */
- @Override
- public void error(CharSequence content) {
- errorCount++;
- jdkLogger.severe(String.valueOf(content));
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#error(java.lang.CharSequence, java.lang.Throwable)
- */
- @Override
- public void error(CharSequence content, Throwable error) {
- errorCount++;
- jdkLogger.log(Level.SEVERE, String.valueOf(content), error);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#error(java.lang.Throwable)
- */
- @Override
- public void error(Throwable error) {
- errorCount++;
- jdkLogger.log(Level.SEVERE, "", error);
- }
-
- @Override
- public int getErrorCount() {
- return errorCount;
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#info(java.lang.CharSequence)
- */
- @Override
- public void info(CharSequence content) {
- jdkLogger.info(String.valueOf(content));
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#info(java.lang.CharSequence, java.lang.Throwable)
- */
- @Override
- public void info(CharSequence content, Throwable error) {
- jdkLogger.log(Level.INFO, String.valueOf(content), error);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#info(java.lang.Throwable)
- */
- @Override
- public void info(Throwable error) {
- jdkLogger.log(Level.INFO, "", error);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#isDebugEnabled()
- */
- @Override
- public boolean isDebugEnabled() {
- return jdkLogger.isLoggable(Level.FINE);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#isErrorEnabled()
- */
- @Override
- public boolean isErrorEnabled() {
- return jdkLogger.isLoggable(Level.SEVERE);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#isInfoEnabled()
- */
- @Override
- public boolean isInfoEnabled() {
- return jdkLogger.isLoggable(Level.INFO);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#isWarnEnabled()
- */
- @Override
- public boolean isWarnEnabled() {
- return jdkLogger.isLoggable(Level.WARNING);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#warn(java.lang.CharSequence)
- */
- @Override
- public void warn(CharSequence content) {
- jdkLogger.warning(String.valueOf(content));
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#warn(java.lang.CharSequence, java.lang.Throwable)
- */
- @Override
- public void warn(CharSequence content, Throwable error) {
- jdkLogger.log(Level.WARNING, String.valueOf(content), error);
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.cdk.Logger#warn(java.lang.Throwable)
- */
- @Override
- public void warn(Throwable error) {
- jdkLogger.log(Level.WARNING, "", error);
- }
-}
Deleted: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Logger.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Logger.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/Logger.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,68 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import com.google.inject.ImplementedBy;
-
-/**
- * That interface hides current logging system from generator classes.
- * Concrete tools ( Maven, Ant, JUnit ) should provide appropriate logger instance that delegates
- * messages to the current log system.
- *
- * @author shura
- */
-(a)ImplementedBy(JavaLogger.class)
-public interface Logger {
- public boolean isDebugEnabled();
-
- public void debug(CharSequence content);
-
- public void debug(CharSequence content, Throwable error);
-
- public void debug(Throwable error);
-
- public boolean isInfoEnabled();
-
- public void info(CharSequence content);
-
- public void info(CharSequence content, Throwable error);
-
- public void info(Throwable error);
-
- public boolean isWarnEnabled();
-
- public void warn(CharSequence content);
-
- public void warn(CharSequence content, Throwable error);
-
- public void warn(Throwable error);
-
- public boolean isErrorEnabled();
-
- public void error(CharSequence content);
-
- public void error(CharSequence content, Throwable error);
-
- public void error(Throwable error);
-
- public int getErrorCount();
-}
Deleted: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/As.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/As.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/As.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,42 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * <p class="changed_added_4_0">
- * </p>
- *
- * @author asmirnov(a)exadel.com
- *
- */
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target( { ElementType.FIELD })
-public @interface As {
- public Class<?> value();
-}
Deleted: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/AsProvider.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/AsProvider.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/AsProvider.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,44 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import com.google.inject.Provider;
-
-/**
- * <p class="changed_added_4_0">
- * </p>
- *
- * @author asmirnov(a)exadel.com
- *
- */
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target( { ElementType.FIELD })
-public @interface AsProvider {
- public Class<? extends Provider<?>> value();
-}
Deleted: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestRunner.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestRunner.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/CdkTestRunner.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,241 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Modifier;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.easymock.EasyMock;
-import org.junit.runner.notification.RunNotifier;
-import org.junit.runners.BlockJUnit4ClassRunner;
-import org.junit.runners.model.FrameworkMethod;
-import org.junit.runners.model.InitializationError;
-
-import com.google.common.collect.Sets;
-import com.google.inject.AbstractModule;
-import com.google.inject.BindingAnnotation;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.Provider;
-import com.google.inject.TypeLiteral;
-import com.google.inject.binder.AnnotatedBindingBuilder;
-
-/**
- * <p class="changed_added_4_0">
- * </p>
- *
- * @author asmirnov(a)exadel.com
- *
- */
-public class CdkTestRunner extends BlockJUnit4ClassRunner {
-
- /**
- * <p class="changed_added_4_0">
- * </p>
- *
- * @param klass
- * @throws InitializationError
- * @throws InitializationError
- */
- public CdkTestRunner(Class<?> klass) throws InitializationError {
- super(klass);
- }
-
- /**
- * Gets all declared fields and all inherited fields.
- */
- protected Set<Field> getFields(Class<?> c) {
- Set<Field> fields = Sets.newHashSet(c.getDeclaredFields());
- while ((c = c.getSuperclass()) != null) {
- for (Field f : c.getDeclaredFields()) {
- if (!Modifier.isStatic(f.getModifiers()) && !Modifier.isPrivate(f.getModifiers())) {
- fields.add(f);
- }
- }
- }
- return fields;
- }
-
- @Override
- protected void runChild(FrameworkMethod method, RunNotifier notifier) {
- super.runChild(method, notifier);
- }
-
- @Override
- protected Object createTest() throws Exception {
- Class<?> c = getTestClass().getJavaClass();
- Set<Field> testFields = getFields(c);
-
- // make sure we have one (and only one) @Unit field
- // Field unitField = getUnitField(testFields);
- // if ( unitField.getAnnotation(Mock.class) != null ) {
- // throw new IncompatibleAnnotationException(Unit.class, Mock.class);
- // }
- //
- final Map<Field, Binding> fieldValues = getMockValues(testFields);
- // if ( fieldValues.containsKey(unitField)) {
- // throw new IncompatibleAnnotationException(Unit.class, unitField.getType());
- // }
-
- Object test = createTest(c, fieldValues);
-
- // any field values created by AtUnit but not injected by the container are injected here.
- for (Field field : fieldValues.keySet()) {
- Binding binding = fieldValues.get(field);
- field.setAccessible(true);
- if (null != binding.value && field.get(test) == null) {
- field.set(test, binding.value);
- }
- }
-
- return test;
- }
-
- private Object createTest(Class<?> testClass, Map<Field, Binding> fieldValues) throws Exception {
- FieldModule fields = new FieldModule(fieldValues);
-
- Injector injector;
- if (Module.class.isAssignableFrom(testClass)) {
- injector = Guice.createInjector(fields, (Module) testClass.newInstance());
- } else {
- injector = Guice.createInjector(fields);
- }
- return injector.getInstance(testClass);
- }
-
- protected static final class FieldModule extends AbstractModule implements MockController {
- final Map<Field, Binding> fields;
-
- public FieldModule(Map<Field, Binding> fields) {
- this.fields = fields;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- protected void configure() {
- // Bind mock controllet to this instance, to automatically replay/verify all mocks created by runner.
- bind(MockController.class).toInstance(this);
- // map field values by type
- for (Field field : fields.keySet()) {
- TypeLiteral literal = TypeLiteral.get(field.getGenericType());
- AnnotatedBindingBuilder builder = bind(literal);
- // Check field annotations.
- Annotation[] fieldAnnotations = field.getAnnotations();
- for (Annotation annotation : fieldAnnotations) {
- Class<? extends Annotation> annotationType = annotation.annotationType();
- if (/* annotationType.isAnnotationPresent(Qualifier.class)|| */annotationType
- .isAnnotationPresent(BindingAnnotation.class)) {
- Implementation implementation = annotationType.getAnnotation(Implementation.class);
- if (null != implementation) {
- try {
- Annotation value =
- implementation.value().getConstructor(annotationType).newInstance(annotation);
- builder.annotatedWith(value);
- } catch (SecurityException e) {
- throw new RuntimeException(e);
- } catch (NoSuchMethodException e) {
- builder.annotatedWith(annotationType);
- } catch (IllegalArgumentException e) {
- throw new RuntimeException(e);
- } catch (InstantiationException e) {
- throw new RuntimeException(e);
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- } catch (InvocationTargetException e) {
- throw new RuntimeException(e);
- }
- } else {
- builder.annotatedWith(annotationType);
- }
- }
- }
- Binding binding = fields.get(field);
- if (null != binding.value) {
- builder.toInstance(binding.value);
- } else if (null != binding.implementation) {
- builder.to(binding.implementation);
- } else if (null != binding.provider) {
- builder.toProvider(binding.provider);
- }
- }
- }
-
- @Override
- public void replay() {
- for (Binding field : fields.values()) {
- if(null != field.value){
- EasyMock.replay(field.value);
- }
- }
- }
-
- @Override
- public void verify() {
- for (Binding field : fields.values()) {
- if(null != field.value){
- EasyMock.verify(field.value);
- }
- }
- }
- }
-
- protected static final class Binding {
- private Object value;
- private Class<?> implementation;
- private Class<? extends Provider<?>> provider;
- }
-
- private Map<Field, Binding> getMockValues(Set<Field> testFields) {
- Map<Field, Binding> mocksAndStubs = new HashMap<Field, Binding>();
- // TODO - create annotation attribute that tells runner to use the scme Mock Controller to create related mocks.
- for (Field field : testFields) {
- if (field.getAnnotation(Mock.class) != null) {
- Binding bind = new Binding();
- bind.value = EasyMock.createStrictMock(field.getType());
- mocksAndStubs.put(field, bind);
- } else if (field.getAnnotation(Stub.class) != null) {
- Binding bind = new Binding();
- bind.value = EasyMock.createNiceMock(field.getType());
- mocksAndStubs.put(field, bind);
- } else if (null != field.getAnnotation(As.class)) {
- Binding bind = new Binding();
- bind.implementation = field.getAnnotation(As.class).value();
- mocksAndStubs.put(field, bind);
- } else if (null != field.getAnnotation(AsProvider.class)) {
- Binding bind = new Binding();
- bind.provider = field.getAnnotation(AsProvider.class).value();
- mocksAndStubs.put(field, bind);
- }
- }
-
- return mocksAndStubs;
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Mock.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Mock.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Mock.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,42 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * <p class="changed_added_4_0">
- * </p>
- *
- * @author asmirnov(a)exadel.com
- *
- */
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target( { ElementType.FIELD })
-public @interface Mock {
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/MockController.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/MockController.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/MockController.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,43 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-/**
- * <p class="changed_added_4_0">Instance of an Object implemented this interface can be injected into test class to simplify mock objects manipulations.</p>
- * @author asmirnov(a)exadel.com
- *
- */
-public interface MockController {
-
- /**
- * <p class="changed_added_4_0">Repaly all mock objects created by the {@link CdkTestRunner}</p>
- */
- public void replay();
-
- /**
- * <p class="changed_added_4_0">Verify all mock objects created by the {@link CdkTestRunner}</p>
- */
- public void verify();
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/RunnerTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/RunnerTest.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/RunnerTest.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,35 +0,0 @@
-package org.richfaces.cdk;
-
-import static org.easymock.EasyMock.*;
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-(a)RunWith(CdkTestRunner.class)
-public class RunnerTest {
-
- @Mock
- private Logger log;
-
- @Stub
- @Source(Sources.JAVA_SOURCES)
- FileManager sources;
-
- @Test
- public void easyMockInjections() throws Exception {
- assertNotNull(log);
- assertNotNull(sources);
- replay(log, sources);
- verify(log, sources);
- }
-
- @Test
- public void easyMockInjections2() throws Exception {
- assertNotNull(log);
- assertNotNull(sources);
- replay(log, sources);
- verify(log, sources);
- }
-
-}
Deleted: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Stub.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Stub.java 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/Stub.java 2010-04-26 20:43:19 UTC (rev 16812)
@@ -1,42 +0,0 @@
-/*
- * $Id$
- *
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.cdk;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * <p class="changed_added_4_0">
- * </p>
- *
- * @author asmirnov(a)exadel.com
- *
- */
-(a)Retention(RetentionPolicy.RUNTIME)
-@Target( { ElementType.FIELD })
-public @interface Stub {
-
-}
Property changes on: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/annotated-component
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.project
.classpath
.clover
bin
Property changes on: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/xml-configured-component
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.project
.classpath
.clover
bin
Modified: root/cdk/trunk/plugins/pom.xml
===================================================================
--- root/cdk/trunk/plugins/pom.xml 2010-04-26 16:45:15 UTC (rev 16811)
+++ root/cdk/trunk/plugins/pom.xml 2010-04-26 20:43:19 UTC (rev 16812)
@@ -28,6 +28,7 @@
</build>
<modules>
+ <module>commons</module>
<module>annotations</module>
<module>attributes</module>
<module>xinclude</module>
14 years
JBoss Rich Faces SVN: r16811 - root/framework/trunk/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-04-26 12:45:15 -0400 (Mon, 26 Apr 2010)
New Revision: 16811
Modified:
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
Log:
base component js docs update
Modified: root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
===================================================================
--- root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-04-26 14:59:30 UTC (rev 16810)
+++ root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-04-26 16:45:15 UTC (rev 16811)
@@ -102,7 +102,15 @@
return "#"+this.id;
},
- //TODO: add jsdocs and qunit tests
+ /**
+ * Attach component object to DOM element by component id, DOM element or jQuery object and returns the element
+ *
+ * @function
+ * @name RichFaces.BaseComponent#attachToDom
+ * @param {string|DOMElement|jQuery} source - component id, DOM element or DOM elements wrapped by jQuery
+ *
+ * @return {DOMElement}
+ * */
attachToDom: function(source) {
var element = richfaces.getDomElement(source);
if (element) {
14 years
JBoss Rich Faces SVN: r16810 - in root/framework/trunk/impl/src/test: resources/javascript and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-04-26 10:59:30 -0400 (Mon, 26 Apr 2010)
New Revision: 16810
Added:
root/framework/trunk/impl/src/test/resources/javascript/richfaces-jsf-ajax-qunit.js
root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-clear.js
root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-getSize.js
root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-isEmpty.js
root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-request.js
root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-submitFirst.js
Modified:
root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java
root/framework/trunk/impl/src/test/resources/javascript/richfaces-client-api.html
Log:
queue qunit tests
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java 2010-04-26 14:33:58 UTC (rev 16809)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java 2010-04-26 14:59:30 UTC (rev 16810)
@@ -118,5 +118,10 @@
runTest(getClass().getClassLoader().getResource("javascript/4_0_0.html"));
runTest(getClass().getClassLoader().getResource("javascript/richfaces-client-api.html"), "?richfaces-event");
runTest(getClass().getClassLoader().getResource("javascript/richfaces-client-api.html"), "?jquery-position");
+ runTest(getClass().getClassLoader().getResource("javascript/richfaces-client-api.html"), "?richfaces-queue-request");
+ runTest(getClass().getClassLoader().getResource("javascript/richfaces-client-api.html"), "?richfaces-queue-getSize");
+ runTest(getClass().getClassLoader().getResource("javascript/richfaces-client-api.html"), "?richfaces-queue-isEmpty");
+ runTest(getClass().getClassLoader().getResource("javascript/richfaces-client-api.html"), "?richfaces-queue-clear");
+ runTest(getClass().getClassLoader().getResource("javascript/richfaces-client-api.html"), "?richfaces-queue-submitFirst");
}
}
Modified: root/framework/trunk/impl/src/test/resources/javascript/richfaces-client-api.html
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-client-api.html 2010-04-26 14:33:58 UTC (rev 16809)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-client-api.html 2010-04-26 14:59:30 UTC (rev 16810)
@@ -8,30 +8,25 @@
<script type="text/javascript" src="../../classes/META-INF/resources/jquery.js"></script>
<script type="text/javascript" src="qunit/qunit.js"></script>
<script type="text/javascript" src="../../classes/META-INF/resources/richfaces.js"></script>
+ <script type="text/javascript" src="richfaces-jsf-ajax-qunit.js"></script>
<script type="text/javascript" src="../../classes/META-INF/resources/jquery.position.js"></script>
+ <script type="text/javascript" src="../../classes/META-INF/resources/richfaces-queue.js"></script>
<script type="text/javascript" src="../../classes/META-INF/resources/richfaces-base-component.js"></script>
<script type="text/javascript" src="../../classes/META-INF/resources/richfaces-event.js"></script>
<script type="text/javascript" src="richfaces-qunit.js"></script>
<script type="text/javascript" src="richfaces-event-qunit.js"></script>
<script type="text/javascript" src="jquery-position-qunit.js"></script>
+ <script type="text/javascript" src="richfaces-queue-qunit-request.js"></script>
+ <script type="text/javascript" src="richfaces-queue-qunit-getSize.js"></script>
+ <script type="text/javascript" src="richfaces-queue-qunit-isEmpty.js"></script>
+ <script type="text/javascript" src="richfaces-queue-qunit-clear.js"></script>
+ <script type="text/javascript" src="richfaces-queue-qunit-submitFirst.js"></script>
</head>
<body>
<h1 id="qunit-header">Richfaces Client API Tests</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
- <script type="text/javascript">
- /*
- var p;
- if ((p=location.href.indexOf("?"))!=-1) {
- var script = document.createElement("script");
- script.setAttribute("src", location.href.substr(p+1)+".js");
- script.setAttribute("type", "text/javascript");
- var head = document.getElementsByTagName("head")[0]||document.documentElement;
- head.appendChild(script);
- }
- */
- </script>
<div id="testDiv" style="margin-top:10px; border:1px solid #a0a0a0">Main Test Div</div>
</body>
Added: root/framework/trunk/impl/src/test/resources/javascript/richfaces-jsf-ajax-qunit.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-jsf-ajax-qunit.js (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-jsf-ajax-qunit.js 2010-04-26 14:59:30 UTC (rev 16810)
@@ -0,0 +1,19 @@
+window.jsf = {};
+jsf.ajax = (function() {
+ return {
+ eventHandlers:[],
+ errorHandlers:[],
+ request:function (source, event, options) {
+ for (var i=0; i<jsf.ajax.eventHandlers.length;i++) {
+ jsf.ajax.eventHandlers[i]({type:"event", status:"success"});
+ }
+ },
+ addOnEvent: function (handler) {
+ jsf.ajax.eventHandlers.push(handler);
+ },
+ addOnError: function (handler) {
+ }
+ }
+})();
+
+window.jsf_ajax_request = jsf.ajax.request;
\ No newline at end of file
Added: root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-clear.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-clear.js (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-clear.js 2010-04-26 14:59:30 UTC (rev 16810)
@@ -0,0 +1,20 @@
+RichFaces.QUnit.run(function(){
+ module("richfaces-queue-clear");
+
+ var element = document.getElementById("testDiv");
+ var event = {type:"testevent"};
+ var options = {requestDelay:1000, param:"value"};
+
+ // queue.clear
+ test("RichFaces.queue.clear", function() {
+ expect(3);
+ ok(RichFaces.queue.isEmpty(), "empty");
+ jsf.ajax.request(element, event, options);
+ jsf.ajax.request(element, event, options);
+ jsf.ajax.request(element, event, options);
+ ok(!RichFaces.queue.isEmpty(), "not empty");
+ RichFaces.queue.clear();
+ ok(RichFaces.queue.isEmpty(), "empty");
+ });
+
+});
\ No newline at end of file
Added: root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-getSize.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-getSize.js (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-getSize.js 2010-04-26 14:59:30 UTC (rev 16810)
@@ -0,0 +1,17 @@
+RichFaces.QUnit.run(function(){
+ module("richfaces-queue-getSize");
+
+ var element = document.getElementById("testDiv");
+ var event = {type:"testevent"};
+ var options = {requestDelay:1000, param:"value"};
+
+ // queue.getSize
+ test("RichFaces.queue.getSize", function() {
+ expect(2);
+ var size = RichFaces.queue.getSize();
+ equals(size, 0, "empty queue");
+ jsf.ajax.request(element, event, options);
+ size = RichFaces.queue.getSize();
+ equals(size, 1, "not empty");
+ });
+});
\ No newline at end of file
Added: root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-isEmpty.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-isEmpty.js (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-isEmpty.js 2010-04-26 14:59:30 UTC (rev 16810)
@@ -0,0 +1,17 @@
+RichFaces.QUnit.run(function(){
+ module("richfaces-queue-isEmpty");
+
+ var element = document.getElementById("testDiv");
+ var event = {type:"testevent"};
+ var options = {requestDelay:1000, param:"value"};
+
+ // queue.isEmpty
+ test("RichFaces.queue.isEmpty", function() {
+ expect(2);
+ var size = RichFaces.queue.isEmpty();
+ ok(RichFaces.queue.isEmpty(), "empty queue");
+ jsf.ajax.request(element, event, options);
+ size = RichFaces.queue.isEmpty();
+ ok(!RichFaces.queue.isEmpty(), "not empty");
+ });
+});
\ No newline at end of file
Added: root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-request.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-request.js (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-request.js 2010-04-26 14:59:30 UTC (rev 16810)
@@ -0,0 +1,19 @@
+RichFaces.QUnit.run(function(){
+ module("richfaces-queue-request");
+
+ var element = document.getElementById("testDiv");
+ var event = {type:"testevent"};
+ var options = {requestDelay:1000, param:"value"};
+
+ // reference to original jsf.ajax.request function
+ test("Reference to origional jsf.ajax.request function", function() {
+ expect(1);
+ equals(RichFaces.ajax.request, jsf_ajax_request);
+ });
+
+ //TODO: add setQueueOptions here
+
+
+ //TODO: add request test here
+
+});
\ No newline at end of file
Added: root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-submitFirst.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-submitFirst.js (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-queue-qunit-submitFirst.js 2010-04-26 14:59:30 UTC (rev 16810)
@@ -0,0 +1,17 @@
+RichFaces.QUnit.run(function(){
+ module("richfaces-queue-submitFirst");
+
+ var element = document.getElementById("testDiv");
+ var event = {type:"testevent"};
+ var options = {requestDelay: 1000, param:"value"};
+
+ // queue.submitFirst
+ test("RichFaces.queue.submitFirst", function() {
+ expect(2);
+ jsf.ajax.request(element, event, options);
+ equals(RichFaces.queue.getSize(), 1, "one queueEntry is waiting");
+ RichFaces.queue.submitFirst();
+ equals(RichFaces.queue.getSize(), 0, "empty after submitFirst()");
+ });
+
+});
\ No newline at end of file
14 years
JBoss Rich Faces SVN: r16809 - root/framework/trunk/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-04-26 10:33:58 -0400 (Mon, 26 Apr 2010)
New Revision: 16809
Modified:
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js
Log:
new functional was added to base component and richfaces.js
Modified: root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
===================================================================
--- root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-04-26 14:24:29 UTC (rev 16808)
+++ root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-04-26 14:33:58 UTC (rev 16809)
@@ -100,6 +100,16 @@
* */
getEventElement: function() {
return "#"+this.id;
+ },
+
+ //TODO: add jsdocs and qunit tests
+ attachToDom: function(source) {
+ var element = richfaces.getDomElement(source);
+ if (element) {
+ element["richfaces"] = element["richfaces"] || {};
+ element.richfaces.component = this;
+ }
+ return element;
}
};
})(params));
Modified: root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js
===================================================================
--- root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js 2010-04-26 14:24:29 UTC (rev 16808)
+++ root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces.js 2010-04-26 14:33:58 UTC (rev 16809)
@@ -11,8 +11,8 @@
(function(richfaces, jQuery) {
- // get RichFaces component object by component id or DOM element or jQuery object
- richfaces.$ = function (source) {
+ // get DOM element by id or DOM element or jQuery object
+ richfaces.getDomElement = function (source) {
var type = typeof source;
var element;
if (type == "string") {
@@ -28,12 +28,16 @@
element = source.get(0);
}
}
+ return element;
+ }
+
+ // get RichFaces component object by component id or DOM element or jQuery object
+ richfaces.$ = function (source) {
+ var element = richfaces.getDomElement(source);
if (element) {
return (element["richfaces"] || {})["component"];
}
-
- return;
}
//form.js
14 years
JBoss Rich Faces SVN: r16808 - in root/ui-sandbox/trunk/components/componentcontrol/src/main: resources/META-INF/resources/script and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-04-26 10:24:29 -0400 (Mon, 26 Apr 2010)
New Revision: 16808
Modified:
root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
root/ui-sandbox/trunk/components/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js
Log:
add client script, client script encode
Modified: root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
===================================================================
--- root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java 2010-04-26 13:38:50 UTC (rev 16807)
+++ root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java 2010-04-26 14:24:29 UTC (rev 16808)
@@ -1,7 +1,6 @@
package org.richfaces.renderkit;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -17,6 +16,9 @@
import javax.faces.render.RenderKitFactory;
import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.JSReference;
+import org.ajax4jsf.javascript.ScriptUtils;
import org.richfaces.component.UIHashParameter;
import org.richfaces.component.behavior.ComponentControlBehavior;
@@ -34,11 +36,14 @@
private static final String FUNC_NAME = "RichFaces.ui.ComponentControl.execute";
- private static final String API_FUNCTION = "operation";
+ private static final String REF_EVENT = "event";
+
+ private static final String REF_COMPONENT = "component";
- private static final String API_ARGUMENTS = "args";
-
-
+ private static final String PARAM_CALLBACK = "callback";
+
+ private static final String PARAM_TARGET = "target";
+
public static final String SEPARATOR = "\\.";
@@ -46,21 +51,34 @@
@Override
public String getScript(ClientBehaviorContext behaviorContext, ClientBehavior behavior) {
ComponentControlBehavior controlBehavior = (ComponentControlBehavior)behavior;
- Map<String, Object> parameters = new HashMap<String, Object>();
- //JSFunctionDefenition
- String target = controlBehavior.getTarget();
-
+
+ JSFunctionDefinition callback = new JSFunctionDefinition();
+ callback.addParameter(new JSReference(REF_EVENT));
+ callback.addParameter(new JSReference(REF_COMPONENT));
+
String apiFunctionName = controlBehavior.getOperation();
- parameters.put(API_FUNCTION, apiFunctionName);
+
+ StringBuffer script = new StringBuffer();
+ script.append(REF_COMPONENT).append("[").append(apiFunctionName).append("].").append("apply").append("(");
List<Object> apiFunctionParams = createSignature(controlBehavior);
- parameters.put(API_ARGUMENTS, apiFunctionParams.toArray());
-
+ script.append(REF_COMPONENT).append(",").append(ScriptUtils.toScript(apiFunctionParams.toArray())).append(");");
+ callback.addToBody(script);
+
+ String target = controlBehavior.getTarget();
+
+ Map<String, Object> parameters = new HashMap<String, Object>();
+ parameters.put(PARAM_CALLBACK, callback);
+ parameters.put(PARAM_TARGET, target);
+
JSFunction eventFunction = new JSFunction(FUNC_NAME);
- eventFunction.addParameter(target);
+ eventFunction.addParameter(new JSReference(REF_EVENT));
eventFunction.addParameter(parameters);
-
- return (eventFunction != null ? eventFunction.toScript() : null);
+
+ StringBuffer execution = new StringBuffer();
+ execution.append(eventFunction.toScript());
+ execution.append("; return false;");
+ return execution.toString();
}
protected List<Object> createSignature(ComponentControlBehavior behavior) {
Modified: root/ui-sandbox/trunk/components/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js
===================================================================
--- root/ui-sandbox/trunk/components/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js 2010-04-26 13:38:50 UTC (rev 16807)
+++ root/ui-sandbox/trunk/components/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js 2010-04-26 14:24:29 UTC (rev 16808)
@@ -1,19 +1,23 @@
-(function (jQuery, richfaces) {
+(function ($, richfaces) {
richfaces = richfaces || {};
richfaces.ui.ComponentControl = richfaces.ui.ComponentControl || {};
- jQuery.extend(richfaces.ui.ComponentControl, {
+ $.extend(richfaces.ui.ComponentControl, {
- execute: function(id, parameters) {
- richfaces.ui.ComponentControl.eachComponent();
-
+ execute: function(event, parameters) {
+ var target = parameters.target;
+ var callback = parameters.callback;
+
+ if(target && (callback && typeof callback == 'function')) {
+ richfaces.ui.ComponentControl.eachComponent(event, target, callback);
+ }
},
- eachComponent : function(forAttr, callback) {
- jQuery(forAttr.replace(/:/g, "\\:").each(function() {
+ eachComponent : function(event, target, callback) {
+ $(target.replace(/:/g, "\\:")).each(function() {
if (this.component) {
- callback(this.component);
+ callback(event, this.component);
}
});
}
14 years
JBoss Rich Faces SVN: r16807 - root/cdk/trunk/bom.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-04-26 09:38:50 -0400 (Mon, 26 Apr 2010)
New Revision: 16807
Modified:
root/cdk/trunk/bom/pom.xml
Log:
fix build
Modified: root/cdk/trunk/bom/pom.xml
===================================================================
--- root/cdk/trunk/bom/pom.xml 2010-04-26 12:27:38 UTC (rev 16806)
+++ root/cdk/trunk/bom/pom.xml 2010-04-26 13:38:50 UTC (rev 16807)
@@ -30,7 +30,7 @@
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.0.3-SNAPSHOT</version>
- <scope>provided</scope>
+ <!--<scope>provided</scope>-->
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
14 years
JBoss Rich Faces SVN: r16806 - root/cdk/trunk/plugins/xinclude.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-04-26 08:27:38 -0400 (Mon, 26 Apr 2010)
New Revision: 16806
Modified:
root/cdk/trunk/plugins/xinclude/pom.xml
Log:
fix build
Modified: root/cdk/trunk/plugins/xinclude/pom.xml
===================================================================
--- root/cdk/trunk/plugins/xinclude/pom.xml 2010-04-24 00:00:40 UTC (rev 16805)
+++ root/cdk/trunk/plugins/xinclude/pom.xml 2010-04-26 12:27:38 UTC (rev 16806)
@@ -47,7 +47,7 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <scope>test</scope>
+ <!--<scope>test</scope>-->
</dependency>
</dependencies>
14 years
JBoss Rich Faces SVN: r16805 - in root/cdk/trunk: bom and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-04-23 20:00:40 -0400 (Fri, 23 Apr 2010)
New Revision: 16805
Added:
root/cdk/trunk/bom/
root/cdk/trunk/bom/pom.xml
root/cdk/trunk/root/
root/cdk/trunk/root/pom.xml
Modified:
root/cdk/trunk/plugins/annotations/pom.xml
root/cdk/trunk/plugins/attributes/pom.xml
root/cdk/trunk/plugins/maven-cdk-plugin/pom.xml
root/cdk/trunk/plugins/pom.xml
root/cdk/trunk/plugins/xinclude/pom.xml
root/cdk/trunk/pom.xml
Log:
CODING IN PROGRESS - issue RF-7750: Create a Bill Of Materials for CDK
https://jira.jboss.org/jira/browse/RF-7750
Added: root/cdk/trunk/bom/pom.xml
===================================================================
--- root/cdk/trunk/bom/pom.xml (rev 0)
+++ root/cdk/trunk/bom/pom.xml 2010-04-24 00:00:40 UTC (rev 16805)
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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">
+
+ <!--
+ TODO inherit this module from the RichFaces root that should define
+ all global properties: distribution management, license, developers,
+ company ...
+ -->
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>bom</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>JSF Components Development Kit (CDK) bill of materials.</name>
+ <description>This module defines all versions of CDK projects and their dependencies.</description>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/cdk/trunk/bom</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/cdk/trunk/bom</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Richfaces/cdk/trunk/bom</url>
+ </scm>
+ <dependencyManagement>
+ <dependencies>
+ <!-- JSF -->
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>2.0.3-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.el</groupId>
+ <artifactId>jboss-el</artifactId>
+ <version>1.0_02.CR4</version>
+ </dependency>
+ <!-- Common libraries -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xsom</groupId>
+ <artifactId>xsom</artifactId>
+ <version>20081112</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.collections</groupId>
+ <artifactId>google-collections</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-multibindings</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-grapher</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-assisted-inject</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-guice</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.freemarker</groupId>
+ <artifactId>freemarker</artifactId>
+ <version>2.3.9</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>xml-apis</artifactId>
+ <groupId>xml-apis</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>xml-apis</artifactId>
+ <groupId>xml-apis</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- Tests -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <scope>test</scope>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>2.5.2</version>
+ </dependency>
+ <!-- Maven -->
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>2.0.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>2.0.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>2.0.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.0.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-archiver</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>file-management</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.5.15</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <!-- Projects -->
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>attributes</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>xinclude</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>generator</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
\ No newline at end of file
Modified: root/cdk/trunk/plugins/annotations/pom.xml
===================================================================
--- root/cdk/trunk/plugins/annotations/pom.xml 2010-04-23 23:54:29 UTC (rev 16804)
+++ root/cdk/trunk/plugins/annotations/pom.xml 2010-04-24 00:00:40 UTC (rev 16805)
@@ -6,30 +6,17 @@
<artifactId>maven-plugins</artifactId>
<groupId>org.richfaces.cdk</groupId>
<version>4.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.richfaces.cdk</groupId>
<artifactId>annotations</artifactId>
<version>4.0.0-SNAPSHOT</version>
<description>That project contains annotations for JSF classes</description>
<name>annotations</name>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
<dependencies>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.3-SNAPSHOT</version>
- <scope>provided</scope>
</dependency>
</dependencies>
</project>
Modified: root/cdk/trunk/plugins/attributes/pom.xml
===================================================================
--- root/cdk/trunk/plugins/attributes/pom.xml 2010-04-23 23:54:29 UTC (rev 16804)
+++ root/cdk/trunk/plugins/attributes/pom.xml 2010-04-24 00:00:40 UTC (rev 16805)
@@ -7,31 +7,18 @@
<artifactId>maven-plugins</artifactId>
<groupId>org.richfaces.cdk</groupId>
<version>4.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.richfaces.cdk</groupId>
<artifactId>attributes</artifactId>
<version>4.0.0-SNAPSHOT</version>
<description>That project contains JAXB bindings for model classes representing schema attributes data</description>
<name>attributes</name>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.6</version>
- <scope>test</scope>
</dependency>
</dependencies>
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/pom.xml
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/pom.xml 2010-04-23 23:54:29 UTC (rev 16804)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/pom.xml 2010-04-24 00:00:40 UTC (rev 16805)
@@ -15,64 +15,45 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
- <version>2.0.10</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
- <version>2.0.10</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
- <version>2.0.10</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
- <version>2.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>file-management</artifactId>
- <version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>1.5.15</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-velocity</artifactId>
- <version>1.1.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.6</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>generator</artifactId>
- <version>4.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.codehaus.modello</groupId>
<artifactId>modello-maven-plugin</artifactId>
- <version>1.0.2</version>
<executions>
<execution>
<goals>
@@ -100,8 +81,8 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
- <version>1.3</version>
<configuration>
<debug>true</debug>
<projectsDirectory>src/it</projectsDirectory>
Modified: root/cdk/trunk/plugins/pom.xml
===================================================================
--- root/cdk/trunk/plugins/pom.xml 2010-04-23 23:54:29 UTC (rev 16804)
+++ root/cdk/trunk/plugins/pom.xml 2010-04-24 00:00:40 UTC (rev 16805)
@@ -4,15 +4,28 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>cdk</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../root</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-plugins</artifactId>
<packaging>pom</packaging>
- <name>maven plugin CDK plugins</name>
-
+ <name>maven CDK plugins</name>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/cdk/trunk/plugins</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/cdk/trunk/plugins</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Richfaces/cdk/trunk/plugins</url>
+ </scm>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
<modules>
<module>annotations</module>
Modified: root/cdk/trunk/plugins/xinclude/pom.xml
===================================================================
--- root/cdk/trunk/plugins/xinclude/pom.xml 2010-04-23 23:54:29 UTC (rev 16804)
+++ root/cdk/trunk/plugins/xinclude/pom.xml 2010-04-24 00:00:40 UTC (rev 16805)
@@ -24,6 +24,7 @@
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-plugins</artifactId>
<version>4.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.richfaces.cdk</groupId>
@@ -33,62 +34,31 @@
<description>Cocoon 3 xinclude transformer with Xpointer scheme support.</description>
<dependencies>
- <!--
- <dependency> <groupId>org.apache.cocoon.pipeline</groupId>
- <artifactId>cocoon-pipeline</artifactId>
- <version>3.0.0-alpha-1</version> </dependency>
- -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
- <!-- Other dependencies -->
- <!-- dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- <scope>runtime</scope>
- </dependency -->
-
<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.6</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
- <scope>test</scope>
- <version>1.2</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
+ <scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.1</version>
<configuration>
<archive>
<manifestEntries>
- <Cocoon-Block-Name>${pom.artifactId}</Cocoon-Block-Name>
+ <Cocoon-Block-Name>${project.artifactId}</Cocoon-Block-Name>
</manifestEntries>
</archive>
</configuration>
@@ -105,7 +75,6 @@
</execution>
</executions>
</plugin>
-
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Modified: root/cdk/trunk/pom.xml
===================================================================
--- root/cdk/trunk/pom.xml 2010-04-23 23:54:29 UTC (rev 16804)
+++ root/cdk/trunk/pom.xml 2010-04-24 00:00:40 UTC (rev 16805)
@@ -3,26 +3,29 @@
<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>
-
- <groupId>org.richfaces</groupId>
- <artifactId>cdk</artifactId>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>aggregator</artifactId>
<version>4.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>JSF Components Development Kit (CDK)</name>
-
+ <name>JSF Components Development Kit (CDK) aggregator project.</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<modules>
+ <module>bom</module>
+ <module>root</module>
<module>plugins</module>
<module>archetypes</module>
</modules>
+ <!-- SCM and distribution management -->
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/cdk/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/cdk/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Richfaces/cdk</url>
+ </scm>
<distributionManagement>
<downloadUrl>
@@ -43,126 +46,28 @@
</site-->
</distributionManagement>
- <repositories>
- <repository>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <id>maven-repository2.dev.java.net</id>
- <name>Java.net Repository for Maven 2</name>
- <url>http://download.java.net/maven/2</url>
- </repository>
+ <!-- Minimal build configuration -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/richfaces/root/cdk/tags</tagBase>
+ <!-- As we need access to our own artifacts -->
+ <preparationGoals>install</preparationGoals>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <inherited>false</inherited>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
- <repository>
- <id>repository.jboss.org</id>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- <repository>
- <id>snapshots.jboss.org</id>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <url>http://snapshots.jboss.org/maven2</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>repository.jboss.org</id>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <url>http://repository.jboss.org/maven2</url>
- </pluginRepository>
- <pluginRepository>
- <id>snapshots.jboss.org</id>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <url>http://snapshots.jboss.org/maven2</url>
- </pluginRepository>
- </pluginRepositories>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.1</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>xml-maven-plugin</artifactId>
- <version>1.0-beta-2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-archetype-plugin</artifactId>
- <version>2.0-alpha-4</version>
- <extensions>true</extensions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.3</version>
-
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <executions>
- <execution>
- <id>richfaces-checkstyle-report</id>
- <configuration>
- <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml</configLocation>
- <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
- </configuration>
-
- <phase>process-sources</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.3</version>
-
- <configuration>
- <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml</configLocation>
- <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
</project>
\ No newline at end of file
Added: root/cdk/trunk/root/pom.xml
===================================================================
--- root/cdk/trunk/root/pom.xml (rev 0)
+++ root/cdk/trunk/root/pom.xml 2010-04-24 00:00:40 UTC (rev 16805)
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<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">
+
+ <parent>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>bom</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../bom</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.richfaces</groupId>
+ <artifactId>cdk</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>JSF Components Development Kit (CDK)</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ </properties>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/cdk/trunk/root</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/cdk/trunk/root</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Richfaces/cdk/trunk/root</url>
+ </scm>
+ <!--
+ TODO move distribution management and repositories to the root pom
+ -->
+ <distributionManagement>
+ <downloadUrl>
+ http://labs.jboss.com/portal/jbossrichfaces/downloads
+ </downloadUrl>
+ <repository>
+ <id>repository.jboss.org</id>
+ <uniqueVersion>false</uniqueVersion>
+ <url>${releaseRepository}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <uniqueVersion>true</uniqueVersion>
+ <url>${snapshotRepository}</url>
+ </snapshotRepository>
+ <!--site>
+ <url>file:target/site2</url>
+ </site-->
+ </distributionManagement>
+
+ <repositories>
+ <repository>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <id>maven-repository2.dev.java.net</id>
+ <name>Java.net Repository for Maven 2</name>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+
+ <repository>
+ <id>repository.jboss.org</id>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <url>http://snapshots.jboss.org/maven2</url>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <url>http://repository.jboss.org/maven2</url>
+ </pluginRepository>
+ <pluginRepository>
+ <id>snapshots.jboss.org</id>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <url>http://snapshots.jboss.org/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <inherited>true</inherited>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ <version>1.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javacc-maven-plugin</artifactId>
+ <version>2.4.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-4</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.3</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <version>1.0.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.3</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>richfaces-checkstyle-report</id>
+ <configuration>
+ <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
+ </configLocation>
+ <suppressionsLocation>checkstyle-suppressions.xml
+ </suppressionsLocation>
+ </configuration>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>guice-maven-plugin</artifactId>
+ <version>2.2.0</version>
+ <!--<configuration>-->
+ <!--<mainClass>mypackage.boot.camel.CamelStartup</mainClass>-->
+ <!--</configuration>-->
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-guice</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.groovy.maven.runtime</groupId>
+ <artifactId>gmaven-runtime-1.6</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <configLocation>richfaces-checkstyle/richfaces-checkstyle.xml
+ </configLocation>
+ <suppressionsLocation>checkstyle-suppressions.xml
+ </suppressionsLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
\ No newline at end of file
14 years