You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by em...@apache.org on 2014/06/19 07:58:25 UTC
svn commit: r1603719 - in /james/bond/trunk/bond: ./ .settings/ src/
src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/james/ src/main/java/org/apache/james/bond/
src/main/java/org/apache/james/bond/client/ ...
Author: emma
Date: Thu Jun 19 05:58:24 2014
New Revision: 1603719
URL: http://svn.apache.org/r1603719
Log:
Empty project
Added:
james/bond/trunk/bond/
james/bond/trunk/bond/.classpath
james/bond/trunk/bond/.project
james/bond/trunk/bond/.settings/
james/bond/trunk/bond/.settings/com.google.gdt.eclipse.core.prefs
james/bond/trunk/bond/.settings/com.google.gwt.eclipse.core.prefs
james/bond/trunk/bond/README.txt
james/bond/trunk/bond/pom.xml
james/bond/trunk/bond/src/
james/bond/trunk/bond/src/main/
james/bond/trunk/bond/src/main/java/
james/bond/trunk/bond/src/main/java/org/
james/bond/trunk/bond/src/main/java/org/apache/
james/bond/trunk/bond/src/main/java/org/apache/james/
james/bond/trunk/bond/src/main/java/org/apache/james/bond/
james/bond/trunk/bond/src/main/java/org/apache/james/bond/Bond.gwt.xml
james/bond/trunk/bond/src/main/java/org/apache/james/bond/client/
james/bond/trunk/bond/src/main/java/org/apache/james/bond/client/Bond.java
james/bond/trunk/bond/src/main/java/org/apache/james/bond/public/
james/bond/trunk/bond/src/main/java/org/apache/james/bond/public/Bond.html
james/bond/trunk/bond/src/main/webapp/
james/bond/trunk/bond/src/main/webapp/WEB-INF/
james/bond/trunk/bond/src/main/webapp/WEB-INF/web.xml
james/bond/trunk/bond/src/main/webapp/index.html
james/bond/trunk/bond/src/test/
james/bond/trunk/bond/src/test/java/
james/bond/trunk/bond/src/test/java/org/
james/bond/trunk/bond/src/test/java/org/apache/
james/bond/trunk/bond/src/test/java/org/apache/james/
james/bond/trunk/bond/src/test/java/org/apache/james/bond/
james/bond/trunk/bond/src/test/java/org/apache/james/bond/client/
james/bond/trunk/bond/src/test/java/org/apache/james/bond/client/BondTest.java
Added: james/bond/trunk/bond/.classpath
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/.classpath?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/.classpath (added)
+++ james/bond/trunk/bond/.classpath Thu Jun 19 05:58:24 2014
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+ <classpathentry kind="src" output="target/bond-1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="output" path="target/bond-1.0-SNAPSHOT/WEB-INF/classes"/>
+</classpath>
Added: james/bond/trunk/bond/.project
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/.project?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/.project (added)
+++ james/bond/trunk/bond/.project Thu Jun 19 05:58:24 2014
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Bond</name>
+ <comment>Bond is GwtQuery application</comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>com.google.gwt.eclipse.core.gwtNature</nature>
+ </natures>
+</projectDescription>
Added: james/bond/trunk/bond/.settings/com.google.gdt.eclipse.core.prefs
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/.settings/com.google.gdt.eclipse.core.prefs?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/.settings/com.google.gdt.eclipse.core.prefs (added)
+++ james/bond/trunk/bond/.settings/com.google.gdt.eclipse.core.prefs Thu Jun 19 05:58:24 2014
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+jarsExcludedFromWebInfLib=
+warSrcDir=src/main/webapp
+warSrcDirIsOutput=true
Added: james/bond/trunk/bond/.settings/com.google.gwt.eclipse.core.prefs
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/.settings/com.google.gwt.eclipse.core.prefs?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/.settings/com.google.gwt.eclipse.core.prefs (added)
+++ james/bond/trunk/bond/.settings/com.google.gwt.eclipse.core.prefs Thu Jun 19 05:58:24 2014
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+entryPointModules=org.apache.james.bond.Bond
+filesCopiedToWebInfLib=gwt-servlet.jar
Added: james/bond/trunk/bond/README.txt
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/README.txt?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/README.txt (added)
+++ james/bond/trunk/bond/README.txt Thu Jun 19 05:58:24 2014
@@ -0,0 +1,32 @@
+
+
+This is the project Bond which uses the GwtQuery Library.
+
+- Assuming you have installed maven, compile and install it just running:
+$ mvn clean install
+
+- Run it in development mode:
+$ mvn gwt:run
+
+- Import and run in Eclipse:
+
+ The archetype generates a project ready to be used in eclipse,
+ but before importing it you have to install the following plugins:
+
+ * Google plugin for eclipse (update-site: http://dl.google.com/eclipse/plugin/3.7 or 3.6 or 3.5)
+ * Sonatype Maven plugin (update-site: http://m2eclipse.sonatype.org/site/m2e)
+
+ Then you can import the project in your eclipse workspace:
+
+ * File -> Import -> Existing Projects into Workspace
+
+ Finally you should be able to run the project in development mode and to run the gwt test unit.
+
+ * Right click on the project -> Run as -> Web Application
+ * Right click on the test class -> Run as -> GWT JUnit Test
+
+- Although the project has the files .classpath and .project, you could generate them running any
+ of the following commands:
+
+$ mvn eclipse:m2eclipse (if you like to use m2eclipse)
+$ mvn eclipse:eclipse (to use the project without m2eclipse)
Added: james/bond/trunk/bond/pom.xml
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/pom.xml?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/pom.xml (added)
+++ james/bond/trunk/bond/pom.xml Thu Jun 19 05:58:24 2014
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>Bond gwtquery project</name>
+ <groupId>org.apache.james</groupId>
+ <artifactId>bond</artifactId>
+ <packaging>war</packaging>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
+ <gQueryVersion>1.3.2</gQueryVersion>
+ <gwtversion>2.5.1</gwtversion>
+ <gwtmaven>2.5.1</gwtmaven>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>http://repo1.maven.org/maven2</url>
+ </repository>
+ <repository>
+ <id>gwtquery-plugins</id>
+ <url>http://gwtquery-plugins.googlecode.com/svn/mavenrepo</url>
+ </repository>
+ <repository>
+ <id>sonatype</id>
+ <url>http://oss.sonatype.org/content/repositories/snapshots</url>
+ <snapshots><enabled>true</enabled></snapshots>
+ <releases><enabled>false</enabled></releases>
+ </repository>
+ <repository>
+ <id>m.g.o</id>
+ <url>http://maven.glassfish.org/content/groups/public/</url>
+ </repository>
+ </repositories>
+
+ <scm>
+ </scm>
+
+ <issueManagement>
+ </issueManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>${gwtversion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-dev</artifactId>
+ <version>${gwtversion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <version>${gwtversion}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.googlecode.gwtquery</groupId>
+ <artifactId>gwtquery</artifactId>
+ <version>${gQueryVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- GWT 2.3.0 depends on these -->
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ <classifier>sources</classifier>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <version>${gwtmaven}</version>
+ <configuration>
+ <logLevel>${gwt.loglevel}</logLevel>
+ <style>${gwt.outputstyle}</style>
+ <gwtVersion>${gwtversion}</gwtVersion>
+ <compileReport>true</compileReport>
+ <runTarget>Bond/Bond.html</runTarget>
+ <hostedWebApp>${project.build.directory}/${project.build.finalName}</hostedWebApp>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.8.1</version>
+ <configuration>
+ <additionalClasspathElements>
+ <additionalClasspathElement>\${project.build.sourceDirectory}</additionalClasspathElement>
+ <additionalClasspathElement>\${project.build.testSourceDirectory}</additionalClasspathElement>
+ </additionalClasspathElements>
+ <useManifestOnlyJar>false</useManifestOnlyJar>
+ <forkMode>always</forkMode>
+ <systemProperties>
+ <property>
+ <name>gwt.args</name>
+ <value>-out target/gwt-tests</value>
+ </property>
+ <property>
+ <!-- Setting this to true (default) causes a exception first time test are run Gwt issue_6443 -->
+ <name>gwt.persistentunitcache</name>
+ <value>false</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>false</downloadJavadocs>
+ <additionalBuildcommands>
+ <buildcommand>com.google.gwt.eclipse.core.gwtProjectValidator</buildcommand>
+ <buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</buildcommand>
+ <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+ <buildcommand>org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver</buildcommand>
+ </additionalBuildcommands>
+ <additionalProjectnatures>
+ <projectnature>com.google.gwt.eclipse.core.gwtNature</projectnature>
+ <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+ <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
+ </additionalProjectnatures>
+ <classpathContainers>
+ <classpathContainer>com.google.gwt.eclipse.core.GWT_CONTAINER</classpathContainer>
+ <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
+ <classpathContainer>org.eclipse.jdt.junit.JUNIT_CONTAINER/3</classpathContainer>
+ </classpathContainers>
+ </configuration>
+ </plugin>
+ <!-- GWT plugin does not copy the webapp folder in hosted mode -->
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/webapp</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
+ </build>
+</project>
Added: james/bond/trunk/bond/src/main/java/org/apache/james/bond/Bond.gwt.xml
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/src/main/java/org/apache/james/bond/Bond.gwt.xml?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/src/main/java/org/apache/james/bond/Bond.gwt.xml (added)
+++ james/bond/trunk/bond/src/main/java/org/apache/james/bond/Bond.gwt.xml Thu Jun 19 05:58:24 2014
@@ -0,0 +1,5 @@
+<module rename-to='Bond'>
+ <inherits name='com.google.gwt.query.Query'/>
+ <entry-point class='org.apache.james.bond.client.Bond'/>
+</module>
+
Added: james/bond/trunk/bond/src/main/java/org/apache/james/bond/client/Bond.java
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/src/main/java/org/apache/james/bond/client/Bond.java?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/src/main/java/org/apache/james/bond/client/Bond.java (added)
+++ james/bond/trunk/bond/src/main/java/org/apache/james/bond/client/Bond.java Thu Jun 19 05:58:24 2014
@@ -0,0 +1,28 @@
+package org.apache.james.bond.client;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.query.client.Function;
+import static com.google.gwt.query.client.GQuery.*;
+
+
+import com.google.gwt.core.client.EntryPoint;
+
+/**
+ * Example code for a GwtQuery application
+ */
+public class Bond implements EntryPoint {
+
+ public void onModuleLoad() {
+
+ $("div")
+ .hover(new Function() {
+ public void f(Element e) {
+ $(e).css("color", "blue").stop(true, true).animate("fontSize: '+=10px'");
+ }
+ }, new Function() {
+ public void f(Element e) {
+ $(e).css("color", "").stop(true, true).animate("fontSize: '-=10px'");
+ }
+ });
+ }
+
+}
Added: james/bond/trunk/bond/src/main/java/org/apache/james/bond/public/Bond.html
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/src/main/java/org/apache/james/bond/public/Bond.html?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/src/main/java/org/apache/james/bond/public/Bond.html (added)
+++ james/bond/trunk/bond/src/main/java/org/apache/james/bond/public/Bond.html Thu Jun 19 05:58:24 2014
@@ -0,0 +1,13 @@
+<!doctype html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>GwtQuery: Bond plugin example</title>
+<style type="text/css">
+</style>
+ <script language="javascript" src="Bond.nocache.js"></script>
+</head>
+ <body>
+ <div>Hello world</div>
+ </body>
+</html>
Added: james/bond/trunk/bond/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/src/main/webapp/WEB-INF/web.xml?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/src/main/webapp/WEB-INF/web.xml (added)
+++ james/bond/trunk/bond/src/main/webapp/WEB-INF/web.xml Thu Jun 19 05:58:24 2014
@@ -0,0 +1,5 @@
+<web-app>
+ <welcome-file-list>
+ <welcome-file>Bond/Bond.html</welcome-file>
+ </welcome-file-list>
+</web-app>
Added: james/bond/trunk/bond/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/src/main/webapp/index.html?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/src/main/webapp/index.html (added)
+++ james/bond/trunk/bond/src/main/webapp/index.html Thu Jun 19 05:58:24 2014
@@ -0,0 +1,15 @@
+<html>
+ <head>
+ </head>
+ <body>
+ <script type="text/javascript">
+ // a workaround for capturing and passing gwt.codesvr parameter in development mode
+ function goTo(location) {
+ window.location = location + window.location.search;
+ }
+ goTo('Bond/Bond.html');
+ </script>
+ <h2>Loading the demo of the Bond gwtquery application</h2>
+ </body>
+</html>
+
Added: james/bond/trunk/bond/src/test/java/org/apache/james/bond/client/BondTest.java
URL: http://svn.apache.org/viewvc/james/bond/trunk/bond/src/test/java/org/apache/james/bond/client/BondTest.java?rev=1603719&view=auto
==============================================================================
--- james/bond/trunk/bond/src/test/java/org/apache/james/bond/client/BondTest.java (added)
+++ james/bond/trunk/bond/src/test/java/org/apache/james/bond/client/BondTest.java Thu Jun 19 05:58:24 2014
@@ -0,0 +1,59 @@
+package org.apache.james.bond.client;
+
+import static com.google.gwt.query.client.GQuery.*;
+import com.google.gwt.junit.client.GWTTestCase;
+import com.google.gwt.query.client.GQuery;
+import com.google.gwt.query.client.plugins.Effects.Speed;
+import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.Timer;
+/**
+ * Test class for Bond entry-point
+ */
+public class BondTest extends GWTTestCase {
+
+ public String getModuleName() {
+ return "org.apache.james.bond.Bond";
+ }
+
+ private double fontSize(GQuery g) {
+ return $(g).cur("fontSize", true);
+ }
+
+ public void testOnModuleLoad() {
+
+ // Create a container in the document
+ final GQuery g = $("<div></div>").appendTo(document);
+
+ // run onModuleLoad
+ Bond a = new Bond();
+ a.onModuleLoad();
+
+ // delay the test
+ delayTestFinish(Speed.DEFAULT * 5);
+
+ // trigger mouse over event
+ final double size1 = fontSize(g);
+ g.trigger(Event.ONMOUSEOVER);
+ new Timer() {
+ public void run() {
+ // assert that the font size increases
+ assertTrue(fontSize(g) > size1);
+
+ // trigger mouse out event
+ final double size2 = fontSize(g);
+ g.trigger(Event.ONMOUSEOUT);
+ new Timer() {
+ public void run() {
+ // assert that the font size decreases
+ assertTrue(fontSize(g) < size2);
+ g.remove();
+
+ // finish the test
+ finishTest();
+ }
+ }.schedule(Speed.DEFAULT);
+ }
+ }.schedule(Speed.DEFAULT);
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org