You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(34) |
Apr
(16) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <am...@us...> - 2006-04-10 05:56:40
|
Revision: 116 Author: amooy Date: 2006-04-09 22:55:48 -0700 (Sun, 09 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=116&view=rev Log Message: ----------- Renamed all xebia.com packages to net.sf.sensor.sample Cleaned up the project descriptors Attempted to get it working in WTP but no luck yet :( Modified Paths: -------------- trunk/sensor-sample-app/.classpath trunk/sensor-sample-app/.project trunk/sensor-sample-app/.settings/.component trunk/sensor-sample-app/project.xml trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcArticleDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcUserDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryArticleDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryUserDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/Article.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/User.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/UserPropertyEditor.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception/WordListException.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl/BlogServiceImpl.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/ArticleValidator.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/InetAddressEditor.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/AddArticleController.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ArticleCommand.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/BlogWizard.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/OverviewController.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ShowArticleController.java trunk/sensor-sample-app/src/resource/applicationContext-jdbc-daos.xml trunk/sensor-sample-app/src/resource/applicationContext-memory-daos.xml trunk/sensor-sample-app/src/resource/applicationContext-oracle-jdbc-daos.xml trunk/sensor-sample-app/src/web/WEB-INF/applicationContext.xml trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/AbstractDAOTest.java trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcArticleDaoTest.java trunk/sensor-sample-app/test/resources/test-context-dao.xml Added Paths: ----------- trunk/sensor-sample-app/src/java/net/ trunk/sensor-sample-app/src/java/net/sf/ trunk/sensor-sample-app/src/java/net/sf/sensor/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ArticleDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/UserDao.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/BlogService.java trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ trunk/sensor-sample-app/src/resource/log4j.dtd trunk/sensor-sample-app/src/resource/log4j.xml trunk/sensor-sample-app/test/java/net/ trunk/sensor-sample-app/test/java/net/sf/ trunk/sensor-sample-app/test/java/net/sf/sensor/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/impl/ trunk/sensor-sample-app/test/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/ Removed Paths: ------------- trunk/sensor-sample-app/src/java/com/ trunk/sensor-sample-app/test/java/com/ Modified: trunk/sensor-sample-app/.classpath =================================================================== --- trunk/sensor-sample-app/.classpath 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/.classpath 2006-04-10 05:55:48 UTC (rev 116) @@ -1,28 +1,31 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="/sensor-core"/> - <classpathentry kind="src" path="/sensor-support"/> - <classpathentry kind="src" path="/sensor-console"/> - <classpathentry sourcepath="/MAVEN_REPO/springframework/zips/spring-src-1.2.6.zip" kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.6.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-1.2.6.jar"/> - <classpathentry kind="lib" path="lib/mysql-connector-java-3.1.12-bin.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="src" path="src/java"/> - <classpathentry output="target/test-classes" kind="src" path="test/java"/> - <classpathentry including="**/*.xml|**/*.txt|**/*.properties" output="target/classes" kind="src" path="src/resource"/> - <classpathentry including="**/*.xml|**/*.sql" output="target/test-classes" kind="src" path="test/resources"/> - <classpathentry kind="output" path="target/classes"/> -</classpath> +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="/sensor-core"/> + <classpathentry kind="src" path="/sensor-support"/> + <classpathentry kind="src" path="/sensor-console"/> + <classpathentry sourcepath="/MAVEN_REPO/springframework/zips/spring-src-1.2.6.zip" kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/cglib/jars/cglib-full-2.0.2.jar"/> + <classpathentry kind="lib" path="lib/mysql-connector-java-3.1.12-bin.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.2.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-pool/jars/commons-pool-1.3.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-1.2.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="src" path="src/java"/> + <classpathentry output="target/test-classes" kind="src" path="test/java"/> + <classpathentry including="**/*.xml|**/*.txt|**/*.properties" output="target/classes" kind="src" path="src/resource"/> + <classpathentry including="**/*.xml|**/*.sql" output="target/test-classes" kind="src" path="test/resources"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> Modified: trunk/sensor-sample-app/.project =================================================================== --- trunk/sensor-sample-app/.project 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/.project 2006-04-10 05:55:48 UTC (rev 116) @@ -3,6 +3,9 @@ <name>sensor-sample-app</name> <comment></comment> <projects> + <project>sensor-core</project> + <project>sensor-support</project> + <project>sensor-console</project> </projects> <buildSpec> <buildCommand> @@ -10,21 +13,16 @@ <arguments> </arguments> </buildCommand> - <buildCommand> +<!-- <buildCommand> <name>nl.inspiring.maviclipse.core.maviclipseBuilder</name> <arguments> </arguments> - </buildCommand> + </buildCommand>--> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> - <buildCommand> - <name>org.eclipse.wst.validation.validationbuilder</name> - <arguments> - </arguments> - </buildCommand> </buildSpec> <natures> <nature>nl.inspiring.maviclipse.core.maviclipseNature</nature> Modified: trunk/sensor-sample-app/.settings/.component =================================================================== --- trunk/sensor-sample-app/.settings/.component 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/.settings/.component 2006-04-10 05:55:48 UTC (rev 116) @@ -1,52 +1,64 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project-modules id="moduleCoreId"> - <wb-module deploy-name="sensor-sample-app"> - <wb-resource source-path="/src/web" deploy-path="/"/> - <wb-resource source-path="/src/java" deploy-path="/WEB-INF/classes"/> - <wb-resource source-path="/test/java" deploy-path="/WEB-INF/classes"/> - <wb-resource source-path="/src/resource" deploy-path="/WEB-INF/classes"/> - <wb-resource source-path="/test/resources" deploy-path="/WEB-INF/classes"/> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-core/sensor-core"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-support/sensor-support"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-console/sensor-console"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/springframework/jars/spring-1.2.6.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib//sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity/jars/velocity-1.4.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"> - <dependency-type>uses</dependency-type> - </dependent-module> - <property name="context-root" value="sensor-sample-app"/> - <property name="java-output-path" value="/build/classes/"/> - </wb-module> -</project-modules> - +<?xml version="1.0" encoding="UTF-8"?> +<project-modules id="moduleCoreId"> + <wb-module deploy-name="sensor-sample-app"> + <wb-resource deploy-path="/" source-path="/src/web"/> + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/java"/> + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/resource"/> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-core/sensor-core"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-support/sensor-support"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-console/sensor-console"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/springframework/jars/spring-1.2.6.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/cglib/jars/cglib-full-2.0.2.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib//sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.2.1.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-pool/jars/commons-pool-1.3.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity/jars/velocity-1.4.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-io/jars/commons-io-1.1.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> +<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"> +<dependency-type>uses</dependency-type> +</dependent-module> + <property name="context-root" value="sensor-sample-app"/> + <property name="java-output-path" value="/build/classes/"/> + </wb-module> +</project-modules> Modified: trunk/sensor-sample-app/project.xml =================================================================== --- trunk/sensor-sample-app/project.xml 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/project.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -8,7 +8,7 @@ <currentVersion>0.1-dev</currentVersion> <inceptionYear>2005</inceptionYear> - <package>com.xebia.springroller</package> + <package>net.sf.sensor.sample.springroller</package> <organization> <name>Xebia</name> @@ -106,8 +106,7 @@ </developers> <dependencies> - - + <!-- Sensor dependencies --> <dependency> <groupId>sensor</groupId> @@ -146,28 +145,25 @@ <artifactId>spring</artifactId> <version>1.2.6</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> <dependency> <groupId>aopalliance</groupId> <artifactId>aopalliance</artifactId> <version>1.0</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - <dependency> - <groupId>springframework</groupId> - <artifactId>spring-mock</artifactId> - <version>1.2.6</version> - <type>jar</type> - </dependency> + <dependency> + <groupId>cglib</groupId> + <artifactId>cglib-full</artifactId> + <version>2.0.2</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <!-- Database Drivers and dependencies --> <!-- use an oracle database driver if you run on an Oracle database --> - <!-- somehow this does not work in Tomcat, so put the jar in the common/lib file of the TOMCAT_HOME directory --> <dependency> <groupId>mysql</groupId> @@ -175,30 +171,44 @@ <version>3.1.12</version> <jar>lib/mysql-connector-java-3.1.12-bin.jar</jar> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> + <dependency> + <groupId>hsqldb</groupId> + <artifactId>hsqldb</artifactId> + <version>1.8.0.1</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + <version>1.2.1</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <dependency> + <groupId>commons-pool</groupId> + <artifactId>commons-pool</artifactId> + <version>1.3</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> - <!-- Web application support --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.0.6</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.0.6</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> <!-- Velocity --> @@ -207,91 +217,68 @@ <artifactId>velocity</artifactId> <version>1.4</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> <dependency> <groupId>velocity-tools</groupId> <artifactId>velocity-tools</artifactId> <version>1.2</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - <!-- commons --> + <!-- Misc Jakarta Commons --> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.1</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>1.1</version> <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> </dependency> - + + <!-- Logging --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.4</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.12</version> <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> + <properties><war.bundle>true</war.bundle></properties> </dependency> - - <!--dependency> - <groupId>cglib</groupId> - <artifactId>cglib-full</artifactId> - <version>2.0.2</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency--> - - <!-- unittest dependencies --> + <!-- Unit testing dependencies --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <type>jar</type> </dependency> - - <dependency> <groupId>dbunit</groupId> <artifactId>dbunit</artifactId> <version>2.1</version> <type>jar</type> </dependency> - <dependency> - <groupId>hsqldb</groupId> - <artifactId>hsqldb</artifactId> - <version>1.8.0.1</version> + <groupId>springframework</groupId> + <artifactId>spring-mock</artifactId> + <version>1.2.6</version> <type>jar</type> </dependency> - <!-- Compile time libs always avaliable at runtime (on all j2ee app servers) --> <dependency> <groupId>servletapi</groupId> Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ArticleDao.java (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java) =================================================================== --- trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/ArticleDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -0,0 +1,65 @@ +package net.sf.sensor.sample.springroller.dao; + +import java.util.List; + +import net.sf.sensor.sample.springroller.domain.Article; + + +/** + * Interface implements by DAO's for {@link Article} objects. + * + * @author Vincent Partington + */ +public interface ArticleDao { + + /** + * Returns the article with the specified ID. + * + * @param id + * the ID of the article. + * @return the article or <code>null</code> if the article could not be found. + */ + Article getArticle(int articleId); + + /** + * Returns a list of all articles, sorted by publication date. + * + * @return a read-only list containing all articles. + */ + List getAllArticles(); + + /** + * Returns a list of all articles authored by a specific user, sorted by publication date. + * + * @param authorName + * the name of the author of the articles to find. + * @return a read-only list of all articles authored by a specific user. + */ + List getArticlesByAuthor(String authorName); + + /** + * Adds an article. + * + * @param newArticle + * the article to add. The ID of the article is set. + */ + void addArticle(Article newArticle); + + /** + * Updates an article. + * + * @param updatedArticle + * the article to update. The ID of the article is used to determine which article to + * update. + */ + void updateArticle(Article updatedArticle); + + /** + * Deletes an article. + * + * @param articleId + * the ID of the article to delete. + */ + void deleteArticle(int articleId); + +} Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/UserDao.java (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java) =================================================================== --- trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/UserDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/UserDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -0,0 +1,55 @@ +package net.sf.sensor.sample.springroller.dao; + +import java.util.List; + +import net.sf.sensor.sample.springroller.domain.User; + + +/** + * Interface implements by DAO's for {@link User} objects. + * + * @author Vincent Partington + */ +public interface UserDao { + + /** + * Returns the user with the specified username. + * + * @param username + * the username. + * @return the user or <code>null</code> if the user could not be found. + */ + User getUser(String username); + + /** + * Returns a list of all users, sorted by username, + * + * @return a read-only list containing all users. + */ + List getAllUsers(); + + /** + * Adds a user. + * + * @param newUser + * the user to add. The username should already have been set. + */ + void addUser(User newUser); + + /** + * Updates a user. + * + * @param updatedUser + * the user to update. The username is used to determine which user to update. + */ + void updateUser(User updatedUser); + + /** + * Deletes a user. + * + * @param username + * the username. + */ + void deleteUser(String username); + +} Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcArticleDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,23 +1,24 @@ -package com.xebia.springroller.dao.impl.jdbc; +package net.sf.sensor.sample.springroller.dao.impl.jdbc; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; +import net.sf.sensor.sample.springroller.dao.ArticleDao; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; + import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.support.JdbcDaoSupport; -import com.xebia.springroller.dao.ArticleDao; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.domain.User; /** * - * Class that implements {@link com.xebia.springroller.dao.ArticleDao} by using + * Class that implements {@link net.sf.sensor.sample.springroller.dao.ArticleDao} by using * {@link org.springframework.jdbc.core.JdbcTemplate}. * * This class uses a private RowMapper to map the columns from the resultset to - * the {@link com.xebia.springroller.domain.Article article}. + * the {@link net.sf.sensor.sample.springroller.domain.Article article}. * * Ids are either generated using a sequence or the auto increment. The id * generator is injected by spring. Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcUserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/JdbcUserDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,16 +1,17 @@ -package com.xebia.springroller.dao.impl.jdbc; +package net.sf.sensor.sample.springroller.dao.impl.jdbc; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; +import net.sf.sensor.sample.springroller.dao.UserDao; +import net.sf.sensor.sample.springroller.domain.User; + import org.springframework.jdbc.core.PreparedStatementSetter; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.support.JdbcDaoSupport; -import com.xebia.springroller.dao.UserDao; -import com.xebia.springroller.domain.User; public class JdbcUserDao extends JdbcDaoSupport implements UserDao { Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,7 +1,7 @@ /** * */ -package com.xebia.springroller.dao.impl.jdbc; +package net.sf.sensor.sample.springroller.dao.impl.jdbc; /** * Implements Oracle specific constructs. Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryArticleDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.dao.impl.memory; +package net.sf.sensor.sample.springroller.dao.impl.memory; import java.util.ArrayList; import java.util.Collections; @@ -8,11 +8,12 @@ import java.util.List; import java.util.Map; -import com.xebia.springroller.dao.ArticleDao; -import com.xebia.springroller.domain.Article; +import net.sf.sensor.sample.springroller.dao.ArticleDao; +import net.sf.sensor.sample.springroller.domain.Article; + /** - * Implementation of the {@link com.xebia.springroller.dao.ArticleDao} that keeps the articles in memory. + * Implementation of the {@link net.sf.sensor.sample.springroller.dao.ArticleDao} that keeps the articles in memory. * * @author Vincent Partington * Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryUserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/dao/impl/memory/MemoryUserDao.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.dao.impl.memory; +package net.sf.sensor.sample.springroller.dao.impl.memory; import java.util.ArrayList; import java.util.Collections; @@ -8,11 +8,12 @@ import java.util.List; import java.util.Map; -import com.xebia.springroller.dao.UserDao; -import com.xebia.springroller.domain.User; +import net.sf.sensor.sample.springroller.dao.UserDao; +import net.sf.sensor.sample.springroller.domain.User; + /** - * Implementation of the {@link com.xebia.springroller.dao.UserDao} that keeps the users in memory. + * Implementation of the {@link net.sf.sensor.sample.springroller.dao.UserDao} that keeps the users in memory. * @author Vincent Partington * */ Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/domain) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/Article.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/Article.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.domain; +package net.sf.sensor.sample.springroller.domain; import java.io.Serializable; import java.net.InetAddress; Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/User.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/User.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/User.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.domain; +package net.sf.sensor.sample.springroller.domain; import java.io.Serializable; Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/UserPropertyEditor.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/UserPropertyEditor.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/domain/UserPropertyEditor.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,9 +1,10 @@ -package com.xebia.springroller.domain; +package net.sf.sensor.sample.springroller.domain; import java.beans.PropertyEditorSupport; -import com.xebia.springroller.service.BlogService; +import net.sf.sensor.sample.springroller.service.BlogService; + public class UserPropertyEditor extends PropertyEditorSupport { private BlogService blogService; Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/exception) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception/WordListException.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/exception/WordListException.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/exception/WordListException.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,7 +1,7 @@ /** * */ -package com.xebia.springroller.exception; +package net.sf.sensor.sample.springroller.exception; /** * Exception that is thrown when the wordlist can not be read from the class path. Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/BlogService.java (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/service/BlogService.java) =================================================================== --- trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/BlogService.java (rev 0) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/BlogService.java 2006-04-10 05:55:48 UTC (rev 116) @@ -0,0 +1,61 @@ +package net.sf.sensor.sample.springroller.service; + +import java.util.List; + +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; + + +/** + * Interface that defines the blogservice in this application + * @author Lonneke Dikmans + * + */ +public interface BlogService { + + /** + * Returns a list of all articles. + * @return List of {@link net.sf.sensor.sample.springroller.domain.Article} or an empty list if none are found. + */ + public List getAllArticles(); + + /** + * publishes the article + * @param articleToPublish the {@link net.sf.sensor.sample.springroller.domain.Article} to publish. + */ + public void publishArticle(Article articleToPublish); + + /** + * Removes an article + * @param articleToDelete the {@link Article} that needs to be deleted. + */ + public void deleteArticle(Article articleToDelete); + + /** + * Updates an already published article + * @param articleToUpdate the article that is update + */ + public void updateArticle(Article articleToUpdate); + + /** + * Finds an article by its id + * @param id the technical id of the article + * @return {@link Article} or <code>null</code> if none was found. + */ + public Article findArticle(int id); + + /** + * Finds all articles by a certain author + * @param author {@link User author} that published articles + * @return List with {@link Articles} or an empty list if none were published by this author. + */ + public List findArticles(User author); + + /** + * Finds the user by its name + * @param name Name of the user. + * @return {@link User user} with this name or <code>null</code> if none is found. + */ + public User findUser(String name); + +} \ No newline at end of file Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/service/impl) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl/BlogServiceImpl.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/service/impl/BlogServiceImpl.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/service/impl/BlogServiceImpl.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,14 +1,15 @@ -package com.xebia.springroller.service.impl; +package net.sf.sensor.sample.springroller.service.impl; import java.util.List; +import net.sf.sensor.sample.springroller.dao.ArticleDao; +import net.sf.sensor.sample.springroller.dao.UserDao; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; +import net.sf.sensor.sample.springroller.service.BlogService; + import org.springframework.beans.factory.InitializingBean; -import com.xebia.springroller.dao.ArticleDao; -import com.xebia.springroller.dao.UserDao; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.domain.User; -import com.xebia.springroller.service.BlogService; /** * Implementation of the BlogService. Also implements initializingbean. Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/util) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/ArticleValidator.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/util/ArticleValidator.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/ArticleValidator.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.util; +package net.sf.sensor.sample.springroller.util; import java.io.BufferedReader; import java.io.FileNotFoundException; @@ -8,6 +8,9 @@ import java.util.Iterator; import java.util.List; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.exception.WordListException; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.core.io.ClassPathResource; @@ -15,8 +18,6 @@ import org.springframework.validation.ValidationUtils; import org.springframework.validation.Validator; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.exception.WordListException; /** * This class validates the article by applying some rules. Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/InetAddressEditor.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/util/InetAddressEditor.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/util/InetAddressEditor.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.util; +package net.sf.sensor.sample.springroller.util; import java.beans.PropertyEditor; import java.beans.PropertyEditorSupport; Copied: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web (from rev 113, trunk/sensor-sample-app/src/java/com/xebia/springroller/web) Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/AddArticleController.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/AddArticleController.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/AddArticleController.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; import java.net.InetAddress; import java.text.SimpleDateFormat; @@ -6,14 +6,15 @@ import javax.servlet.http.HttpServletRequest; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; +import net.sf.sensor.sample.springroller.domain.UserPropertyEditor; +import net.sf.sensor.sample.springroller.service.BlogService; + import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.servlet.mvc.SimpleFormController; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.domain.User; -import com.xebia.springroller.domain.UserPropertyEditor; -import com.xebia.springroller.service.BlogService; public class AddArticleController extends SimpleFormController { Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ArticleCommand.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ArticleCommand.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ArticleCommand.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; public class ArticleCommand { Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/BlogWizard.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/BlogWizard.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/BlogWizard.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,4 +1,4 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; import java.net.InetAddress; import java.text.SimpleDateFormat; @@ -7,6 +7,12 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.domain.User; +import net.sf.sensor.sample.springroller.domain.UserPropertyEditor; +import net.sf.sensor.sample.springroller.service.BlogService; +import net.sf.sensor.sample.springroller.util.ArticleValidator; + import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.validation.BindException; import org.springframework.validation.Errors; @@ -15,11 +21,6 @@ import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractWizardFormController; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.domain.User; -import com.xebia.springroller.domain.UserPropertyEditor; -import com.xebia.springroller.service.BlogService; -import com.xebia.springroller.util.ArticleValidator; public class BlogWizard extends AbstractWizardFormController { Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/OverviewController.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/OverviewController.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/OverviewController.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,14 +1,15 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import net.sf.sensor.sample.springroller.service.BlogService; + import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController; -import com.xebia.springroller.service.BlogService; /** * Controller that generates an overview of all articles. Modified: trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ShowArticleController.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ShowArticleController.java 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-sample-app/src/java/net/sf/sensor/sample/springroller/web/ShowArticleController.java 2006-04-10 05:55:48 UTC (rev 116) @@ -1,14 +1,15 @@ -package com.xebia.springroller.web; +package net.sf.sensor.sample.springroller.web; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import net.sf.sensor.sample.springroller.domain.Article; +import net.sf.sensor.sample.springroller.service.BlogService; + import org.springframework.web.bind.RequestUtils; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController; -import com.xebia.springroller.domain.Article; -import com.xebia.springroller.service.BlogService; public class ShowArticleController extends AbstractController { Modified: trunk/sensor-sample-app/src/resource/applicationContext-jdbc-daos.xml =================================================================== --- trunk/sensor-sample-app/src/resource/applicationContext-jdbc-daos.xml 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/src/resource/applicationContext-jdbc-daos.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -14,8 +14,8 @@ </bean> - <bean name="userDao" class="com.xebia.springroller.dao.impl.jdbc.JdbcUserDao"/> + <bean name="userDao" class="net.sf.sensor.sample.springroller.dao.impl.jdbc.JdbcUserDao"/> - <bean name="articleDao" class="com.xebia.springroller.dao.impl.jdbc.JdbcArticleDao"/> + <bean name="articleDao" class="net.sf.sensor.sample.springroller.dao.impl.jdbc.JdbcArticleDao"/> </beans> \ No newline at end of file Modified: trunk/sensor-sample-app/src/resource/applicationContext-memory-daos.xml =================================================================== --- trunk/sensor-sample-app/src/resource/applicationContext-memory-daos.xml 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/src/resource/applicationContext-memory-daos.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -2,17 +2,17 @@ <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans default-autowire="byName"> - <bean name="user" class="com.xebia.springroller.domain.User"> + <bean name="user" class="net.sf.sensor.sample.springroller.domain.User"> <property name="name" value="user" /> <property name="password" value="password" /> </bean> - <bean name="admin" class="com.xebia.springroller.domain.User"> + <bean name="admin" class="net.sf.sensor.sample.springroller.domain.User"> <property name="name" value="admin" /> <property name="password" value="secret" /> </bean> - <bean name="memoryUserDao" class="com.xebia.springroller.dao.impl.memory.MemoryUserDao"> + <bean name="memoryUserDao" class="net.sf.sensor.sample.springroller.dao.impl.memory.MemoryUserDao"> <property name="users"> <list> <ref bean="user" /> @@ -21,24 +21,24 @@ </property> </bean> - <bean name="memoryArticleDao" class="com.xebia.springroller.dao.impl.memory.MemoryArticleDao"> + <bean name="memoryArticleDao" class="net.sf.sensor.sample.springroller.dao.impl.memory.MemoryArticleDao"> <property name="articles"> <list> - <bean class="com.xebia.springroller.domain.Article"> + <bean class="net.sf.sensor.sample.springroller.domain.Article"> <property name="title" value="The blog is alive" /> <property name="text" value="We've just created this blog. Post away!" /> <property name="publicationDate" value="2006-01-24 12:14:32" /> <property name="publicationIPAddress" value="192.168.1.23" /> <property name="author" ref="user" /> </bean> - <bean class="com.xebia.springroller.domain.Article"> + <bean class="net.sf.sensor.sample.springroller.domain.Article"> <property name="title" value="Quark" /> <property name="text" value="A treatise on ferengi and their earlobes." /> <property name="publicationDate" value="2006-01-24 14:54:00" /> <property name="publicationIPAddress" value="192.168.1.62" /> <property name="author" ref="user" /> </bean> - <bean class="com.xebia.springroller.domain.Article"> + <bean class="net.sf.sensor.sample.springroller.domain.Article"> <property name="title" value="A message from your friendly neighbourhood admin" /> <property name="text" value="No funny texts on this blog" /> <property name="publicationDate" value="2006-01-25 06:21:02" /> @@ -67,7 +67,7 @@ </bean> </entry> <entry key="java.net.InetAddress"> - <bean class="com.xebia.springroller.util.InetAddressEditor" /> + <bean class="net.sf.sensor.sample.springroller.util.InetAddressEditor" /> </entry> </map> </property> Modified: trunk/sensor-sample-app/src/resource/applicationContext-oracle-jdbc-daos.xml =================================================================== --- trunk/sensor-sample-app/src/resource/applicationContext-oracle-jdbc-daos.xml 2006-04-09 15:20:59 UTC (rev 115) +++ trunk/sensor-sample-app/src/resource/applicationContext-oracle-jdbc-daos.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -14,13 +14,13 @@ </bean> - <bean name="userDao" class="com.xebia.springroller.dao.impl.jdbc.JdbcUserDao"> + <bean name="userDao" class="net.sf.sensor.sample.springroller.dao.impl.jdbc.JdbcUserDao"> <property name="sessionFactory"> <ref bean="sessionFactory"/> </property> </bean> - <bean name="articleDao" class="com.xebia.springroller.dao.impl.jdbc.OracleJdbcArticleDao"> + <bean name="articleDao" class="net.sf.sensor.sample.springroller.dao.impl.jdbc.OracleJdbcArticleDao"> <property name="sessionFactory"> <ref bean="sessionFactory"/> </property> Added: trunk/sensor-sample-app/src/resource/log4j.dtd =================================================================== --- trunk/sensor-sample-app/src/resource/log4j.dtd (rev 0) +++ trunk/sensor-sample-app/src/resource/log4j.dtd 2006-04-10 05:55:48 UTC (rev 116) @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<!-- Authors: Chris Taylor, Ceki Gulcu. --> + +<!-- Version: 1.2 --> + +<!-- A configuration element consists of optional renderer +elements,appender elements, categories and an optional root +element. --> + +<!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?, + categoryFactory?)> + +<!-- The "threshold" attribute takes a level value such that all --> +<!-- logging statements with a level equal or below this value are --> +<!-- disabled. --> + +<!-- Setting the "debug" enable the printing of internal log4j logging --> +<!-- statements. --> + +<!-- By default, debug attribute is "null", meaning that we not do touch --> +<!-- internal log4j logging settings. The "null" value for the threshold --> +<!-- attribute can be misleading. The threshold field of a repository --> +<!-- cannot be set to null. The "null" value for the threshold attribute --> +<!-- simply means don't touch the threshold field, the threshold field --> +<!-- keeps its old value. --> + +<!ATTLIST log4j:configuration + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + threshold (all|debug|info|warn|error|fatal|off|null) "null" + debug (true|false|null) "null" +> + +<!-- renderer elements allow the user to customize the conversion of --> +<!-- message objects to String. --> + +<!ELEMENT renderer EMPTY> +<!ATTLIST renderer + renderedClass CDATA #REQUIRED + renderingClass CDATA #REQUIRED +> + +<!-- Appenders must have a name and a class. --> +<!-- Appenders may contain an error handler, a layout, optional parameters --> +<!-- and filters. They may also reference (or include) other appenders. --> +<!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)> +<!ATTLIST appender + name ID #REQUIRED + class CDATA #REQUIRED +> + +<!ELEMENT layout (param*)> +<!ATTLIST layout + class CDATA #REQUIRED +> + +<!ELEMENT filter (param*)> +<!ATTLIST filter + class CDATA #REQUIRED +> + +<!-- ErrorHandlers can be of any class. They can admit any number of --> +<!-- parameters. --> + +<!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)> +<!ATTLIST errorHandler + class CDATA #REQUIRED +> + +<!ELEMENT root-ref EMPTY> + +<!ELEMENT logger-ref EMPTY> +<!ATTLIST logger-ref + ref IDREF #REQUIRED +> + +<!ELEMENT param EMPTY> +<!ATTLIST param + name CDATA #REQUIRED + value CDATA #REQUIRED +> + + +<!-- The priority class is org.apache.log4j.Level by default --> +<!ELEMENT priority (param*)> +<!ATTLIST priority + class CDATA #IMPLIED + value CDATA #REQUIRED +> + +<!-- The level class is org.apache.log4j.Level by default --> +<!ELEMENT level (param*)> +<!ATTLIST level + class CDATA #IMPLIED + value CDATA #REQUIRED +> + + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named category. --> +<!ELEMENT category (param*,(priority|level)?,appender-ref*)> +<!ATTLIST category + class CDATA #IMPLIED + name CDATA #REQUIRED + additivity (true|false) "true" +> + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named logger. --> +<!ELEMENT logger (level?,appender-ref*)> +<!ATTLIST logger + name ID #REQUIRED + additivity (true|false) "true" +> + + +<!ELEMENT categoryFactory (param*)> +<!ATTLIST categoryFactory + class CDATA #REQUIRED> + +<!ELEMENT appender-ref EMPTY> +<!ATTLIST appender-ref + ref IDREF #REQUIRED +> + +<!-- If no priority element is specified, then the configurator MUST not --> +<!-- touch the priority of root. --> +<!-- The root category always exists and cannot be subclassed. --> +<!ELEMENT root (param*, (priority|level)?, appender-ref*)> + + +<!-- ==================================================================== --> +<!-- A logging event --> +<!-- ==================================================================== --> +<!ELEMENT log4j:eventSet (log4j:event*)> +<!ATTLIST log4j:eventSet + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + version (1.1|1.2) "1.2" + includesLocationInfo (true|false) "true" +> + + + +<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?, + log4j:locationInfo?) > + +<!-- The timestamp format is application dependent. --> +<!ATTLIST log4j:event + logger CDATA #REQUIRED + level CDATA #REQUIRED + thread CDATA #REQUIRED + timestamp CDATA #REQUIRED +> + +<!ELEMENT log4j:message (#PCDATA)> +<!ELEMENT log4j:NDC (#PCDATA)> + +<!ELEMENT log4j:throwable (#PCDATA)> + +<!ELEMENT log4j:locationInfo EMPTY> +<!ATTLIST log4j:locationInfo + class CDATA #REQUIRED + method CDATA #REQUIRED + file CDATA #REQUIRED + line CDATA #REQUIRED +> Added: trunk/sensor-sample-app/src/resource/log4j.xml =================================================================== --- trunk/sensor-sample-app/src/resource/log4j.xml (rev 0) +++ trunk/sensor-sample-app/src/resource/log4j.xml 2006-04-10 05:55:48 UTC (rev 116) @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> + +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> + + <appender name="logfile" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="sensor-sample-app.log"/> + <param name="MaxFileSize" value="5000KB"/> + <param name="MaxBackupIndex" value="5"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" + value="%d{yyyyMMdd;HH:mm:ss,SSS};%5p;%c{3};%m%n"/> + </layout> + </appender> + + <appender name="console" class="org.apache.log4j.ConsoleAppender"> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" + value="%d{yyyyMMdd;HH:mm:ss,SSS};%5p;%c{3};%m%n"/> + </layout> + </appender> + + <logger name="org.hibernate" additivity="false"> + <level value="warn"/> + <appender-ref ref="logfile"/> + <appender-ref ref="console"/> + </logger> + + <logger name="org.springframework" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + <appender-ref ref="logfile"/> + </lo... [truncated message content] |
From: <am...@us...> - 2006-04-09 15:21:08
|
Revision: 115 Author: amooy Date: 2006-04-09 08:20:59 -0700 (Sun, 09 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=115&view=rev Log Message: ----------- removed wtp stuff from sensor-support module Modified Paths: -------------- trunk/sensor-support/.classpath trunk/sensor-support/.project trunk/sensor-support/project.xml Modified: trunk/sensor-support/.classpath =================================================================== --- trunk/sensor-support/.classpath 2006-04-09 15:19:47 UTC (rev 114) +++ trunk/sensor-support/.classpath 2006-04-09 15:20:59 UTC (rev 115) @@ -15,11 +15,12 @@ <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/> <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/com.agical.rmock/jars/rmock-2.0.0-rc-5.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/mx4j/jars/mx4j-3.0.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/mx4j/jars/mx4j-remote-3.0.1.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="src" path="src/java"/> <classpathentry output="target/test-classes" kind="src" path="test/java"/> - <classpathentry including="**/*.xml|**/*.dtd|**/*.properties|**/*.xsd" output="target/classes" kind="src" path="src/resources"/> - <classpathentry kind="var" path="MAVEN_REPO/mx4j/jars/mx4j-3.0.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/mx4j/jars/mx4j-remote-3.0.1.jar"/> + <classpathentry including="**/*.xml|**/*.dtd|**/*.properties" output="target/classes" kind="src" path="src/resources"/> + <classpathentry including="**/*.xml|**/*.properties" output="target/test-classes" kind="src" path="test/resources"/> <classpathentry kind="output" path="target/classes"/> </classpath> Modified: trunk/sensor-support/.project =================================================================== --- trunk/sensor-support/.project 2006-04-09 15:19:47 UTC (rev 114) +++ trunk/sensor-support/.project 2006-04-09 15:20:59 UTC (rev 115) @@ -16,11 +16,6 @@ </arguments> </buildCommand> <buildCommand> - <name>org.eclipse.wst.validation.validationbuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> <name>org.springframework.ide.eclipse.core.springbuilder</name> <arguments> </arguments> @@ -30,8 +25,5 @@ <nature>nl.inspiring.maviclipse.core.maviclipseNature</nature> <nature>org.springframework.ide.eclipse.core.springnature</nature> <nature>org.eclipse.jdt.core.javanature</nature> - <nature>org.eclipse.wst.common.project.facet.core.nature</nature> - <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> - <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> </natures> </projectDescription> Modified: trunk/sensor-support/project.xml =================================================================== --- trunk/sensor-support/project.xml 2006-04-09 15:19:47 UTC (rev 114) +++ trunk/sensor-support/project.xml 2006-04-09 15:20:59 UTC (rev 115) @@ -256,15 +256,13 @@ <include>**/*.xml</include> </includes> </resource> - <resource> - <directory>${basedir}/test/resources</directory> - <includes> - <include>**/*.xml</include> - <include>**/*.dtd</include> - <include>**/*.properties</include> - <include>**/*.xsd</include> - </includes> - </resource> + <resource> + <directory>${basedir}/test/resources</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.properties</include> + </includes> + </resource> </resources> </unitTest> @@ -275,7 +273,6 @@ <include>**/*.xml</include> <include>**/*.dtd</include> <include>**/*.properties</include> - <include>**/*.xsd</include> </includes> </resource> </resources> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <am...@us...> - 2006-04-09 15:19:57
|
Revision: 114 Author: amooy Date: 2006-04-09 08:19:47 -0700 (Sun, 09 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=114&view=rev Log Message: ----------- removed wtp stuff from sensor-core module Modified Paths: -------------- trunk/sensor-core/.project trunk/sensor-core/project.xml Modified: trunk/sensor-core/.project =================================================================== --- trunk/sensor-core/.project 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-core/.project 2006-04-09 15:19:47 UTC (rev 114) @@ -15,17 +15,9 @@ <arguments> </arguments> </buildCommand> - <buildCommand> - <name>org.eclipse.wst.validation.validationbuilder</name> - <arguments> - </arguments> - </buildCommand> </buildSpec> <natures> <nature>nl.inspiring.maviclipse.core.maviclipseNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> - <nature>org.eclipse.wst.common.project.facet.core.nature</nature> - <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> - <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> </natures> </projectDescription> Modified: trunk/sensor-core/project.xml =================================================================== --- trunk/sensor-core/project.xml 2006-04-09 11:50:55 UTC (rev 113) +++ trunk/sensor-core/project.xml 2006-04-09 15:19:47 UTC (rev 114) @@ -168,6 +168,9 @@ <includes> <include>**/*Test.java</include> </includes> + <excludes> + <exclude>**/*PerformanceTest.java</exclude> + </excludes> </unitTest> <resources> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <am...@us...> - 2006-04-09 11:51:11
|
Revision: 113 Author: amooy Date: 2006-04-09 04:50:55 -0700 (Sun, 09 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=113&view=rev Log Message: ----------- Unified maven remote repositires needed for the projects in project.properties Modified Paths: -------------- trunk/sensor-console/project.properties trunk/sensor-core/project.properties trunk/sensor-site/project.properties trunk/sensor-support/project.properties Modified: trunk/sensor-console/project.properties =================================================================== --- trunk/sensor-console/project.properties 2006-04-09 11:45:37 UTC (rev 112) +++ trunk/sensor-console/project.properties 2006-04-09 11:50:55 UTC (rev 113) @@ -6,7 +6,8 @@ http://www.ibiblio.org/maven,\ http://dist.codehaus.org,\ http://www.codeczar.com/maven,\ - http://maven-plugins.sourceforge.net/maven + http://maven-plugins.sourceforge.net/maven,\ + http://sensor.sourceforge.net/maven/ # ------------------------------------------------------------------------ Modified: trunk/sensor-core/project.properties =================================================================== --- trunk/sensor-core/project.properties 2006-04-09 11:45:37 UTC (rev 112) +++ trunk/sensor-core/project.properties 2006-04-09 11:50:55 UTC (rev 113) @@ -2,13 +2,12 @@ # Maven runtime behaviour # ------------------------------------------------------------------------ -maven.repo.remote = http://www.ibiblio.org/maven,\ +maven.repo.remote = http://mirrors.sunsite.dk/maven/,\ + http://www.ibiblio.org/maven,\ http://dist.codehaus.org,\ http://www.codeczar.com/maven,\ - http://mirrors.sunsite.dk/maven/,\ http://maven-plugins.sourceforge.net/maven,\ - http://jibx.sourceforge.net/maven,\ - http://andreasbrenk.com/opensource/maven-jibx-plugin/maven + http://sensor.sourceforge.net/maven/ # ------------------------------------------------------------------------ Modified: trunk/sensor-site/project.properties =================================================================== --- trunk/sensor-site/project.properties 2006-04-09 11:45:37 UTC (rev 112) +++ trunk/sensor-site/project.properties 2006-04-09 11:50:55 UTC (rev 113) @@ -1,4 +1,11 @@ +maven.repo.remote = http://mirrors.sunsite.dk/maven/,\ + http://www.ibiblio.org/maven,\ + http://dist.codehaus.org,\ + http://www.codeczar.com/maven,\ + http://maven-plugins.sourceforge.net/maven,\ + http://sensor.sourceforge.net/maven/ + # ------------------------------------------------------------------------ # Multiproject Properties # ------------------------------------------------------------------------ Modified: trunk/sensor-support/project.properties =================================================================== --- trunk/sensor-support/project.properties 2006-04-09 11:45:37 UTC (rev 112) +++ trunk/sensor-support/project.properties 2006-04-09 11:50:55 UTC (rev 113) @@ -2,13 +2,12 @@ # Maven runtime behaviour # ------------------------------------------------------------------------ -maven.repo.remote = http://www.ibiblio.org/maven,\ +maven.repo.remote = http://mirrors.sunsite.dk/maven/,\ + http://www.ibiblio.org/maven,\ http://dist.codehaus.org,\ http://www.codeczar.com/maven,\ - http://mirrors.sunsite.dk/maven/,\ http://maven-plugins.sourceforge.net/maven,\ - http://jibx.sourceforge.net/maven,\ - http://andreasbrenk.com/opensource/maven-jibx-plugin/maven + http://sensor.sourceforge.net/maven/ # ------------------------------------------------------------------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <am...@us...> - 2006-04-09 11:45:41
|
Revision: 112 Author: amooy Date: 2006-04-09 04:45:37 -0700 (Sun, 09 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=112&view=rev Log Message: ----------- Disabled eclipse validationbuilder Modified Paths: -------------- trunk/sensor-console/.project Modified: trunk/sensor-console/.project =================================================================== --- trunk/sensor-console/.project 2006-04-09 11:31:37 UTC (rev 111) +++ trunk/sensor-console/.project 2006-04-09 11:45:37 UTC (rev 112) @@ -18,11 +18,6 @@ </arguments> </buildCommand> <buildCommand> - <name>org.eclipse.wst.validation.validationbuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> <name>org.springframework.ide.eclipse.core.springbuilder</name> <arguments> </arguments> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <am...@us...> - 2006-04-09 11:31:45
|
Revision: 111 Author: amooy Date: 2006-04-09 04:31:37 -0700 (Sun, 09 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=111&view=rev Log Message: ----------- Added svn ignore property on top-level project dir Property Changed: ---------------- trunk/sensor-sample-app/ Property changes on: trunk/sensor-sample-app ___________________________________________________________________ Name: svn:ignore + bin target *.log This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-04-06 18:44:12
|
Revision: 110 Author: ldikmans Date: 2006-04-06 11:44:00 -0700 (Thu, 06 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=110&view=rev Log Message: ----------- enabled maviclipse Modified Paths: -------------- trunk/sensor-sample-app/.classpath trunk/sensor-sample-app/.project trunk/sensor-sample-app/project.xml Modified: trunk/sensor-sample-app/.classpath =================================================================== --- trunk/sensor-sample-app/.classpath 2006-04-06 18:43:37 UTC (rev 109) +++ trunk/sensor-sample-app/.classpath 2006-04-06 18:44:00 UTC (rev 110) @@ -1,18 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src/java"/> - <classpathentry kind="src" path="test/java"/> - <classpathentry kind="src" path="test/resources"/> - <classpathentry kind="src" path="src/resource"/> - <classpathentry kind="src" path="src/web"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="src" path="/sensor-core"/> + <classpathentry kind="src" path="/sensor-support"/> + <classpathentry kind="src" path="/sensor-console"/> <classpathentry sourcepath="/MAVEN_REPO/springframework/zips/spring-src-1.2.6.zip" kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-1.2.6.jar"/> + <classpathentry kind="lib" path="lib/mysql-connector-java-3.1.12-bin.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-1.2.6.jar"/> - <classpathentry kind="var" path="JUNIT_HOME/junit.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"/> - <classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="src" path="src/java"/> + <classpathentry output="target/test-classes" kind="src" path="test/java"/> + <classpathentry including="**/*.xml|**/*.txt|**/*.properties" output="target/classes" kind="src" path="src/resource"/> + <classpathentry including="**/*.xml|**/*.sql" output="target/test-classes" kind="src" path="test/resources"/> <classpathentry kind="output" path="target/classes"/> </classpath> Modified: trunk/sensor-sample-app/.project =================================================================== --- trunk/sensor-sample-app/.project 2006-04-06 18:43:37 UTC (rev 109) +++ trunk/sensor-sample-app/.project 2006-04-06 18:44:00 UTC (rev 110) @@ -6,12 +6,31 @@ </projects> <buildSpec> <buildCommand> + <name>org.eclipse.wst.common.project.facet.core.builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>nl.inspiring.maviclipse.core.maviclipseBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> + <buildCommand> + <name>org.eclipse.wst.validation.validationbuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> + <nature>nl.inspiring.maviclipse.core.maviclipseNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.wst.common.project.facet.core.nature</nature> + <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> + <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> </natures> </projectDescription> Modified: trunk/sensor-sample-app/project.xml =================================================================== --- trunk/sensor-sample-app/project.xml 2006-04-06 18:43:37 UTC (rev 109) +++ trunk/sensor-sample-app/project.xml 2006-04-06 18:44:00 UTC (rev 110) @@ -1,351 +1,391 @@ <?xml version="1.0" encoding="UTF-8"?> <project> - <pomVersion>3</pomVersion> - - <artifactId>sensor-sample-app</artifactId> - <name>Sensor Sample Application</name> - <groupId>sensor</groupId> - - <currentVersion>0.1-dev</currentVersion> - <inceptionYear>2005</inceptionYear> - <package>com.xebia.springroller</package> - - <organization> - <name>Xebia</name> - <url>http://www.xebia.com/</url> - <logo></logo> - </organization> - - <logo></logo> - <url>http://sensor.sf.net/</url> - - <shortDescription> - Sample application for the sensor project. - This application shows howto configure sensor in a webproject. - </shortDescription> + <pomVersion>3</pomVersion> + <artifactId>sensor-sample-app</artifactId> + <name>Sensor Sample Application</name> + <groupId>sensor</groupId> + + <currentVersion>0.1-dev</currentVersion> + <inceptionYear>2005</inceptionYear> + <package>com.xebia.springroller</package> + + <organization> + <name>Xebia</name> + <url>http://www.xebia.com/</url> + <logo></logo> + </organization> + + <logo></logo> + <url>http://sensor.sf.net/</url> + + <shortDescription> + Sample application for the sensor project. This application + shows howto configure sensor in a webproject. + </shortDescription> + <repository> - <connection>scm:svn:anonymous@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app</connection> - <developerConnection>scm:svn:${maven.username}@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app</developerConnection> + <connection> + scm:svn:anonymous@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app + </connection> + <developerConnection> + scm:svn:${maven.username}@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app + </developerConnection> <url>https://svn.sourceforge.net/svnroot/sensor</url> </repository> - - <mailingLists> - <mailingList> - <name>Sensor Developers List (sen...@li...)</name> - <subscribe>https://lists.sourceforge.net/lists/listinfo/sensor-developer</subscribe> - <unsubscribe>https://lists.sourceforge.net/lists/listinfo/sensor-developer</unsubscribe> - <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=45376</archive> - </mailingList> - </mailingLists> - - <licenses> - <license> - <name>The Apache Software License, Version 2.0</name> - <url>/license.txt</url> - <distribution>repo</distribution> - </license> - </licenses> - - <developers> - <developer> - <name>Age Mooy</name> - <id>amooy</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Jurjan Woltman</name> - <id>jwoltman</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Richard Swart</name> - <id>rswart</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Lonneke Dikmans</name> - <id>ldikmans</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Silvester van der Bijl</name> - <id>silvester</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Jeroen Borgers</name> - <id>jborgers</id> - <timezone>CET</timezone> - </developer> - - <!-- original developers of the sample appliation --> - <developer> - <name>Vincent Partington</name> - <id>vpartington</id> - <timezone>CET</timezone> - </developer> - <developer> - <name>Michael Franken</name> - <id>mfranken</id> - <timezone>CET</timezone> - </developer> - </developers> - <dependencies> + <mailingLists> + <mailingList> + <name> + Sensor Developers List + (sen...@li...) + </name> + <subscribe> + https://lists.sourceforge.net/lists/listinfo/sensor-developer + </subscribe> + <unsubscribe> + https://lists.sourceforge.net/lists/listinfo/sensor-developer + </unsubscribe> + <archive> + http://sourceforge.net/mailarchive/forum.php?forum_id=45376 + </archive> + </mailingList> + </mailingLists> + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>/license.txt</url> + <distribution>repo</distribution> + </license> + </licenses> - <!-- Sensor dependencies --> - <dependency> - <groupId>sensor</groupId> - <artifactId>sensor-core</artifactId> - <version>0.1-dev</version> - <type>jar</type> - <properties> - <eclipse.dependency>false</eclipse.dependency> - <war.bundle>true</war.bundle> - </properties> - </dependency> - <dependency> - <groupId>sensor</groupId> - <artifactId>sensor-support</artifactId> - <version>0.1-dev</version> - <type>jar</type> - <properties> - <eclipse.dependency>false</eclipse.dependency> - <war.bundle>true</war.bundle> - </properties> - </dependency> - <dependency> - <groupId>sensor</groupId> - <artifactId>sensor-console</artifactId> - <version>0.1-dev</version> - <type>jar</type> - <properties> - <eclipse.dependency>false</eclipse.dependency> - <war.bundle>true</war.bundle> - </properties> - </dependency> - - <!-- Spring --> - <dependency> - <groupId>springframework</groupId> - <artifactId>spring</artifactId> - <version>1.2.6</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> - <dependency> - <groupId>aopalliance</groupId> - <artifactId>aopalliance</artifactId> - <version>1.0</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> - <dependency> - <groupId>springframework</groupId> - <artifactId>spring-mock</artifactId> - <version>1.2.6</version> - <type>jar</type> - </dependency> - - <!-- use an oracle database driver if you run on an Oracle database --> - - <!-- somehow this does not work in Tomcat, so put the jar in the common/lib file of the TOMCAT_HOME directory --> - <dependency> - <groupId>mysql</groupId> - <artifactId>mysql</artifactId> - <version>3.1.12</version> - <jar>lib/mysql-connector-java-3.1.12-bin.jar</jar> - <type>jar</type> - <properties> - <war.bundle>true</war.bundle> - </properties> - </dependency> - + <developers> + <developer> + <name>Age Mooy</name> + <id>amooy</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Jurjan Woltman</name> + <id>jwoltman</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Richard Swart</name> + <id>rswart</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Lonneke Dikmans</name> + <id>ldikmans</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Silvester van der Bijl</name> + <id>silvester</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Jeroen Borgers</name> + <id>jborgers</id> + <timezone>CET</timezone> + </developer> - <!-- Web application support --> - <dependency> - <groupId>jstl</groupId> - <artifactId>jstl</artifactId> - <version>1.0.6</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> - <dependency> - <groupId>taglibs</groupId> - <artifactId>standard</artifactId> - <version>1.0.6</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> + <!-- original developers of the sample appliation --> + <developer> + <name>Vincent Partington</name> + <id>vpartington</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Michael Franken</name> + <id>mfranken</id> + <timezone>CET</timezone> + </developer> + </developers> - <!-- Velocity --> - <dependency> - <groupId>velocity</groupId> - <artifactId>velocity</artifactId> - <version>1.4</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> - <dependency> - <groupId>velocity-tools</groupId> - <artifactId>velocity-tools</artifactId> - <version>1.2</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> - - <!-- commons --> - <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <version>3.1</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> - - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>1.1</version> - <type>jar</type> - </dependency> - - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.0.4</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.12</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency> - + <dependencies> - <!--dependency> - <groupId>cglib</groupId> - <artifactId>cglib-full</artifactId> - <version>2.0.2</version> - <type>jar</type> - <properties><war.bundle>true</war.bundle></properties> - </dependency--> - - <!-- unittest dependencies --> - <dependency> - <groupId>dbunit</groupId> - <artifactId>dbunit</artifactId> - <version>2.1</version> - <type>jar</type> - </dependency> - - <dependency> - <groupId>hsqldb</groupId> - <artifactId>hsqldb</artifactId> - <version>1.8.0.1</version> - <type>jar</type> - </dependency> - - - - <!-- Compile time libs always avaliable at runtime (on all j2ee app servers) --> - <dependency> - <groupId>servletapi</groupId> - <artifactId>servletapi</artifactId> - <version>2.3</version> - <type>jar</type> - </dependency> - - <!-- Maven Plugins Used by this Project --> - <dependency> - <groupId>maven</groupId> - <artifactId>maven-pmd-plugin</artifactId> - <version>1.7</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven-plugins</groupId> - <artifactId>maven-findbugs-plugin</artifactId> - <version>1.0</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven</groupId> - <artifactId>maven-clover-plugin</artifactId> - <version>1.10</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven-plugins</groupId> - <artifactId>maven-findbugs-plugin</artifactId> - <version>1.0</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven</groupId> - <artifactId>maven-dashboard-plugin</artifactId> - <version>1.7</version> - <type>plugin</type> - </dependency> - <dependency> - <groupId>maven</groupId> - <artifactId>maven-xdoc-plugin</artifactId> - <version>1.9</version> - <type>plugin</type> - </dependency> - </dependencies> - - <build> - <sourceDirectory>${basedir}/src/java</sourceDirectory> - <unitTestSourceDirectory>${basedir}/test/java</unitTestSourceDirectory> - - <unitTest> - <includes> - <include>**/*Test.java</include> - </includes> - <excludes> - <exclude>**/Abstract*.java</exclude> - </excludes> - <resources> - <resource> - <directory>${basedir}/test/resources</directory> - <includes> - <include>**/*.xml</include> - <include>**/*.sql</include> - </includes> - </resource> - </resources> - </unitTest> - - <resources> - <resource> - <directory>${basedir}/src/resource</directory> - <includes> - <include>**/*.xml</include> - <include>**/*.txt</include> - <include>**/*.properties</include> - </includes> - </resource> - </resources> - </build> - - <reports> - <report>maven-license-plugin</report> - <report>maven-javadoc-plugin</report> - <report>maven-jxr-plugin</report> - <report>maven-junit-report-plugin</report> - <report>maven-clover-plugin</report> - <report>maven-checkstyle-plugin</report> - <report>maven-pmd-plugin</report> - <report>maven-findbugs-plugin</report> - <report>maven-simian-plugin</report> - - <report>maven-dashboard-plugin</report> - </reports> + + <!-- Sensor dependencies --> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-core</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>true</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-support</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>true</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-console</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>true</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <!-- Spring --> + <dependency> + <groupId>springframework</groupId> + <artifactId>spring</artifactId> + <version>1.2.6</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>aopalliance</groupId> + <artifactId>aopalliance</artifactId> + <version>1.0</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>springframework</groupId> + <artifactId>spring-mock</artifactId> + <version>1.2.6</version> + <type>jar</type> + </dependency> + + <!-- use an oracle database driver if you run on an Oracle database --> + + <!-- somehow this does not work in Tomcat, so put the jar in the common/lib file of the TOMCAT_HOME directory --> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql</artifactId> + <version>3.1.12</version> + <jar>lib/mysql-connector-java-3.1.12-bin.jar</jar> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + + <!-- Web application support --> + <dependency> + <groupId>jstl</groupId> + <artifactId>jstl</artifactId> + <version>1.0.6</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <version>1.0.6</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <!-- Velocity --> + <dependency> + <groupId>velocity</groupId> + <artifactId>velocity</artifactId> + <version>1.4</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>velocity-tools</groupId> + <artifactId>velocity-tools</artifactId> + <version>1.2</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <!-- commons --> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>3.1</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>1.1</version> + <type>jar</type> + </dependency> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.12</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + + <!--dependency> + <groupId>cglib</groupId> + <artifactId>cglib-full</artifactId> + <version>2.0.2</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency--> + + <!-- unittest dependencies --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <type>jar</type> + </dependency> + + + <dependency> + <groupId>dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.1</version> + <type>jar</type> + </dependency> + + <dependency> + <groupId>hsqldb</groupId> + <artifactId>hsqldb</artifactId> + <version>1.8.0.1</version> + <type>jar</type> + </dependency> + + + <!-- Compile time libs always avaliable at runtime (on all j2ee app servers) --> + <dependency> + <groupId>servletapi</groupId> + <artifactId>servletapi</artifactId> + <version>2.3</version> + <type>jar</type> + </dependency> + + <!-- Maven Plugins Used by this Project --> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <version>1.7</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven-plugins</groupId> + <artifactId>maven-findbugs-plugin</artifactId> + <version>1.0</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-clover-plugin</artifactId> + <version>1.10</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven-plugins</groupId> + <artifactId>maven-findbugs-plugin</artifactId> + <version>1.0</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-dashboard-plugin</artifactId> + <version>1.7</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-xdoc-plugin</artifactId> + <version>1.9</version> + <type>plugin</type> + </dependency> + </dependencies> + + <build> + <sourceDirectory>${basedir}/src/java</sourceDirectory> + <unitTestSourceDirectory> + ${basedir}/test/java + </unitTestSourceDirectory> + + <unitTest> + <includes> + <include>**/*Test.java</include> + </includes> + <excludes> + <exclude>**/Abstract*.java</exclude> + </excludes> + <resources> + <resource> + <directory>${basedir}/test/resources</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.sql</include> + </includes> + </resource> + </resources> + </unitTest> + + <resources> + <resource> + <directory>${basedir}/src/resource</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.txt</include> + <include>**/*.properties</include> + </includes> + </resource> + </resources> + </build> + + <reports> + <report>maven-license-plugin</report> + <report>maven-javadoc-plugin</report> + <report>maven-jxr-plugin</report> + <report>maven-junit-report-plugin</report> + <report>maven-clover-plugin</report> + <report>maven-checkstyle-plugin</report> + <report>maven-pmd-plugin</report> + <report>maven-findbugs-plugin</report> + <report>maven-simian-plugin</report> + + <report>maven-dashboard-plugin</report> + </reports> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-04-06 18:43:44
|
Revision: 109 Author: ldikmans Date: 2006-04-06 11:43:37 -0700 (Thu, 06 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=109&view=rev Log Message: ----------- Modified Paths: -------------- trunk/sensor-sample-app/src/web/WEB-INF/classes/views.properties trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml Modified: trunk/sensor-sample-app/src/web/WEB-INF/classes/views.properties =================================================================== --- trunk/sensor-sample-app/src/web/WEB-INF/classes/views.properties 2006-04-06 18:43:18 UTC (rev 108) +++ trunk/sensor-sample-app/src/web/WEB-INF/classes/views.properties 2006-04-06 18:43:37 UTC (rev 109) @@ -19,5 +19,5 @@ start.class=org.springframework.web.servlet.view.JstlView start.url=/WEB-INF/jsp/start.jsp -statistics.class=org.springframework.web.servlet.view.velocity.VelocityView -statistics.url=/net/sf/sensor/console/views/TimerStatistics.vm \ No newline at end of file +TimerStatistics.class=org.springframework.web.servlet.view.velocity.VelocityView +TimerStatistics.url=TimerStatistics.vm \ No newline at end of file Modified: trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml =================================================================== --- trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml 2006-04-06 18:43:18 UTC (rev 108) +++ trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml 2006-04-06 18:43:37 UTC (rev 109) @@ -43,7 +43,7 @@ <!-- View resolvers --> <bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver"> - <property name="basename"><value>views</value></property> + <property name="basename"><value>views</value></property> </bean> @@ -84,9 +84,9 @@ <!-- Velocity config --> <!-- ==================================================================== --> - <bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> + <!--bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> <property name="resourceLoaderPath" value="classpath:net/sf/sensor/console/views/"/> - </bean> + </bean--> <!--bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.velocity.VelocityView"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-04-06 18:43:27
|
Revision: 108 Author: ldikmans Date: 2006-04-06 11:43:18 -0700 (Thu, 06 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=108&view=rev Log Message: ----------- made blogservice private Modified Paths: -------------- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/AddArticleController.java Modified: trunk/sensor-sample-app/src/java/com/xebia/springroller/web/AddArticleController.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/web/AddArticleController.java 2006-04-06 18:42:54 UTC (rev 107) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/web/AddArticleController.java 2006-04-06 18:43:18 UTC (rev 108) @@ -17,7 +17,7 @@ public class AddArticleController extends SimpleFormController { - BlogService blogService; + private BlogService blogService; protected Object formBackingObject(HttpServletRequest request) throws Exception { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-04-06 18:43:06
|
Revision: 107 Author: ldikmans Date: 2006-04-06 11:42:54 -0700 (Thu, 06 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=107&view=rev Log Message: ----------- enabled maviclipse Added Paths: ----------- trunk/sensor-sample-app/.settings/ trunk/sensor-sample-app/.settings/.component trunk/sensor-sample-app/.settings/org.eclipse.jdt.core.prefs trunk/sensor-sample-app/.settings/org.eclipse.wst.common.project.facet.core.xml Added: trunk/sensor-sample-app/.settings/.component =================================================================== --- trunk/sensor-sample-app/.settings/.component (rev 0) +++ trunk/sensor-sample-app/.settings/.component 2006-04-06 18:42:54 UTC (rev 107) @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-modules id="moduleCoreId"> + <wb-module deploy-name="sensor-sample-app"> + <wb-resource source-path="/src/web" deploy-path="/"/> + <wb-resource source-path="/src/java" deploy-path="/WEB-INF/classes"/> + <wb-resource source-path="/test/java" deploy-path="/WEB-INF/classes"/> + <wb-resource source-path="/src/resource" deploy-path="/WEB-INF/classes"/> + <wb-resource source-path="/test/resources" deploy-path="/WEB-INF/classes"/> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-core/sensor-core"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-support/sensor-support"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/sensor-console/sensor-console"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/springframework/jars/spring-1.2.6.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/aopalliance/jars/aopalliance-1.0.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib//sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity/jars/velocity-1.4.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/velocity-tools/jars/velocity-tools-1.2.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-collections/jars/commons-collections-3.1.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/MAVEN_REPO/log4j/jars/log4j-1.2.12.jar"> + <dependency-type>uses</dependency-type> + </dependent-module> + <property name="context-root" value="sensor-sample-app"/> + <property name="java-output-path" value="/build/classes/"/> + </wb-module> +</project-modules> + Added: trunk/sensor-sample-app/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/sensor-sample-app/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/sensor-sample-app/.settings/org.eclipse.jdt.core.prefs 2006-04-06 18:42:54 UTC (rev 107) @@ -0,0 +1,7 @@ +#Thu Apr 06 18:57:37 CEST 2006 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.3 Added: trunk/sensor-sample-app/.settings/org.eclipse.wst.common.project.facet.core.xml =================================================================== --- trunk/sensor-sample-app/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0) +++ trunk/sensor-sample-app/.settings/org.eclipse.wst.common.project.facet.core.xml 2006-04-06 18:42:54 UTC (rev 107) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<faceted-project> + <fixed facet="jst.web"/> + <fixed facet="jst.java"/> + <installed facet="jst.web" version="2.4"/> + <installed facet="jst.java" version="1.4"/> +</faceted-project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-04-03 20:06:57
|
Revision: 106 Author: ldikmans Date: 2006-04-03 13:06:46 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=106&view=rev Log Message: ----------- added jmx classes to classpath, to make junit classes run Modified Paths: -------------- trunk/sensor-support/.classpath Modified: trunk/sensor-support/.classpath =================================================================== --- trunk/sensor-support/.classpath 2006-04-03 20:03:07 UTC (rev 105) +++ trunk/sensor-support/.classpath 2006-04-03 20:06:46 UTC (rev 106) @@ -19,5 +19,7 @@ <classpathentry kind="src" path="src/java"/> <classpathentry output="target/test-classes" kind="src" path="test/java"/> <classpathentry including="**/*.xml|**/*.dtd|**/*.properties|**/*.xsd" output="target/classes" kind="src" path="src/resources"/> + <classpathentry kind="var" path="MAVEN_REPO/mx4j/jars/mx4j-3.0.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/mx4j/jars/mx4j-remote-3.0.1.jar"/> <classpathentry kind="output" path="target/classes"/> </classpath> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-04-03 20:03:15
|
Revision: 105 Author: ldikmans Date: 2006-04-03 13:03:07 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=105&view=rev Log Message: ----------- work in progress, to use jsp's and velocity in one application Added Paths: ----------- trunk/sensor-sample-app/src/web/WEB-INF/classes/ trunk/sensor-sample-app/src/web/WEB-INF/classes/views.properties Added: trunk/sensor-sample-app/src/web/WEB-INF/classes/views.properties =================================================================== --- trunk/sensor-sample-app/src/web/WEB-INF/classes/views.properties (rev 0) +++ trunk/sensor-sample-app/src/web/WEB-INF/classes/views.properties 2006-04-03 20:03:07 UTC (rev 105) @@ -0,0 +1,23 @@ +add.class=org.springframework.web.servlet.view.JstlView +add.url=/WEB-INF/jsp/add.jsp + +overview.class=org.springframework.web.servlet.view.JstlView +overview.url=/WEB-INF/jsp/overview.jsp + +confirm.class=org.springframework.web.servlet.view.JstlView +confirm.url=/WEB-INF/jsp/confirm.jsp + +author.class=org.springframework.web.servlet.view.JstlView +author.url=/WEB-INF/jsp/author.jsp + +preamble.class=org.springframework.web.servlet.view.JstlView +preamble.url=/WEB-INF/jsp/preamble.jsp + +show.class=org.springframework.web.servlet.view.JstlView +show.url=/WEB-INF/jsp/show.jsp + +start.class=org.springframework.web.servlet.view.JstlView +start.url=/WEB-INF/jsp/start.jsp + +statistics.class=org.springframework.web.servlet.view.velocity.VelocityView +statistics.url=/net/sf/sensor/console/views/TimerStatistics.vm \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-04-03 20:02:52
|
Revision: 104 Author: ldikmans Date: 2006-04-03 13:02:43 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=104&view=rev Log Message: ----------- work in progress, to use jsp's and velocity in one application Modified Paths: -------------- trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml Modified: trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml =================================================================== --- trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml 2006-04-03 19:58:32 UTC (rev 103) +++ trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml 2006-04-03 20:02:43 UTC (rev 104) @@ -42,21 +42,11 @@ </bean> <!-- View resolvers --> - <bean class="org.springframework.web.servlet.view.BeanNameViewResolver"> - <property name="order" value="1" /> + <bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver"> + <property name="basename"><value>views</value></property> </bean> - - <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> - <property name="prefix" value="/WEB-INF/jsp/" /> - <property name="suffix" value=".jsp" /> - </bean> -<!--=========================================================================================== --> -<!-- SENSOR RELATED STUFF --> -<!-- --> -<!--===========================================================================================--> - - + <!--==================================================================== --> <!-- HandlerMapping --> <!-- ==================================================================== --> @@ -69,12 +59,18 @@ <entry key="/add.htm" value-ref="addArticleController"/> <entry key="/show.htm" value-ref="showArticleController"/> <entry key="/addDummy.htm" value-ref="blogWizard"/> - <entry key="/xfire/timerRuntime.xfire" value-ref="sensor.timerRuntime.xfire"/> </map> </property> </bean> + + +<!--=========================================================================================== --> +<!-- SENSOR RELATED STUFF --> +<!-- --> +<!--===========================================================================================--> + <!-- ==================================================================== --> <!-- Controllers --> <!-- ==================================================================== --> @@ -92,7 +88,7 @@ <property name="resourceLoaderPath" value="classpath:net/sf/sensor/console/views/"/> </bean> - <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> + <!--bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.velocity.VelocityView"/> <property name="exposeSpringMacroHelpers" value="true"/> <property name="dateToolAttribute" value="date"/> @@ -106,7 +102,7 @@ <property name="cache" value="true"/> <property name="prefix" value=""/> <property name="suffix" value=".vm"/> - </bean> + </bean--> </beans> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2006-04-03 19:58:42
|
Revision: 103 Author: rswart Date: 2006-04-03 12:58:32 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=103&view=rev Log Message: ----------- Added Paths: ----------- trunk/sensor-support/src/resources/net/sf/sensor/support/spring/sensor-jmx-test.xml Copied: trunk/sensor-support/src/resources/net/sf/sensor/support/spring/sensor-jmx-test.xml (from rev 86, trunk/sensor-support/src/resources/net/sf/sensor/support/spring/sensor-jmx.xml) =================================================================== --- trunk/sensor-support/src/resources/net/sf/sensor/support/spring/sensor-jmx-test.xml (rev 0) +++ trunk/sensor-support/src/resources/net/sf/sensor/support/spring/sensor-jmx-test.xml 2006-04-03 19:58:32 UTC (rev 103) @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> + +<!-- + + + +--> + +<beans> + + <bean id="sensor.timerRuntime.mbeanProxy" + class="org.springframework.jmx.access.MBeanProxyFactoryBean"> + <property name="objectName" value="sensor:name=TimerRuntime" /> + <property name="proxyInterface" + value="net.sf.sensor.timer.TimerRuntime" /> + </bean> + + <bean id="sensor.jmx.clientConnector" + class="org.springframework.jmx.support.MBeanServerConnectionFactoryBean"> + <property name="serviceUrl" + value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/myconnector" /> + </bean> + + <bean id="sensor.timerRuntime.remoteMbeanProxy" + class="org.springframework.jmx.access.MBeanProxyFactoryBean"> + <property name="objectName" value="sensor:name=TimerRuntime" /> + <property name="proxyInterface" + value="net.sf.sensor.timer.TimerRuntime" /> + <property name="server" ref="sensor.jmx.clientConnector" /> + </bean> +<!-- + <bean id="registerStatistics" + class="net.sf.sensor.support.spring.MBeanRegistrar" /> + + <bean id="scheduledTask" + class="org.springframework.scheduling.timer.ScheduledTimerTask"> + <property name="delay" value="1000" /> + <property name="period" value="1000" /> + <property name="timerTask" ref="registerStatistics" /> + </bean> +--> + +</beans> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-04-02 21:32:26
|
Revision: 102 Author: ldikmans Date: 2006-04-02 14:31:21 -0700 (Sun, 02 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=102&view=rev Log Message: ----------- First version of the sample app, work in progress.... Added Paths: ----------- trunk/sensor-sample-app/.classpath trunk/sensor-sample-app/.project trunk/sensor-sample-app/conf/ trunk/sensor-sample-app/conf/checkstyle.xml trunk/sensor-sample-app/conf/clover.license trunk/sensor-sample-app/conf/findbugs-excludes.xml trunk/sensor-sample-app/lib/ trunk/sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar trunk/sensor-sample-app/maven.xml trunk/sensor-sample-app/project.properties trunk/sensor-sample-app/project.xml trunk/sensor-sample-app/src/ trunk/sensor-sample-app/src/java/ trunk/sensor-sample-app/src/java/META-INF/ trunk/sensor-sample-app/src/java/META-INF/MANIFEST.MF trunk/sensor-sample-app/src/java/com/ trunk/sensor-sample-app/src/java/com/xebia/ trunk/sensor-sample-app/src/java/com/xebia/springroller/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/ trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/User.java trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/UserPropertyEditor.java trunk/sensor-sample-app/src/java/com/xebia/springroller/exception/ trunk/sensor-sample-app/src/java/com/xebia/springroller/exception/WordListException.java trunk/sensor-sample-app/src/java/com/xebia/springroller/service/ trunk/sensor-sample-app/src/java/com/xebia/springroller/service/BlogService.java trunk/sensor-sample-app/src/java/com/xebia/springroller/service/impl/ trunk/sensor-sample-app/src/java/com/xebia/springroller/service/impl/BlogServiceImpl.java trunk/sensor-sample-app/src/java/com/xebia/springroller/util/ trunk/sensor-sample-app/src/java/com/xebia/springroller/util/ArticleValidator.java trunk/sensor-sample-app/src/java/com/xebia/springroller/util/InetAddressEditor.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ trunk/sensor-sample-app/src/java/com/xebia/springroller/web/AddArticleController.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ArticleCommand.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/BlogWizard.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/OverviewController.java trunk/sensor-sample-app/src/java/com/xebia/springroller/web/ShowArticleController.java trunk/sensor-sample-app/src/log4j.properties trunk/sensor-sample-app/src/resource/ trunk/sensor-sample-app/src/resource/applicationContext-jdbc-daos.xml trunk/sensor-sample-app/src/resource/applicationContext-memory-daos.xml trunk/sensor-sample-app/src/resource/applicationContext-oracle-jdbc-daos.xml trunk/sensor-sample-app/src/resource/db/ trunk/sensor-sample-app/src/resource/db/mysql/ trunk/sensor-sample-app/src/resource/db/mysql/create_database.sql trunk/sensor-sample-app/src/resource/db/mysql/create_tables.sql trunk/sensor-sample-app/src/resource/db/mysql/insert_test_data.sql trunk/sensor-sample-app/src/resource/db/oracle/ trunk/sensor-sample-app/src/resource/db/oracle/create_sequence.sql trunk/sensor-sample-app/src/resource/db/oracle/create_tables.sql trunk/sensor-sample-app/src/resource/db/oracle/insert_test_data.sql trunk/sensor-sample-app/src/resource/trekwords.txt trunk/sensor-sample-app/src/trekwords.txt trunk/sensor-sample-app/src/web/ trunk/sensor-sample-app/src/web/WEB-INF/ trunk/sensor-sample-app/src/web/WEB-INF/applicationContext.xml trunk/sensor-sample-app/src/web/WEB-INF/jdbc.properties trunk/sensor-sample-app/src/web/WEB-INF/jsp/ trunk/sensor-sample-app/src/web/WEB-INF/jsp/add.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/author.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/confirm.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/overview.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/preamble.jspf trunk/sensor-sample-app/src/web/WEB-INF/jsp/show.jsp trunk/sensor-sample-app/src/web/WEB-INF/jsp/start.jsp trunk/sensor-sample-app/src/web/WEB-INF/springroller-servlet.xml trunk/sensor-sample-app/src/web/WEB-INF/web.xml trunk/sensor-sample-app/src/web/index.jsp trunk/sensor-sample-app/src/web/main.css trunk/sensor-sample-app/test/ trunk/sensor-sample-app/test/java/ trunk/sensor-sample-app/test/java/com/ trunk/sensor-sample-app/test/java/com/xebia/ trunk/sensor-sample-app/test/java/com/xebia/springroller/ trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/ trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/impl/ trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/impl/jdbc/ trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/impl/jdbc/AbstractDAOTest.java trunk/sensor-sample-app/test/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDaoTest.java trunk/sensor-sample-app/test/resources/ trunk/sensor-sample-app/test/resources/database/ trunk/sensor-sample-app/test/resources/database/jdbc-tables.sql trunk/sensor-sample-app/test/resources/database/springroller-dump.xml trunk/sensor-sample-app/test/resources/test-context-dao.xml Added: trunk/sensor-sample-app/.classpath =================================================================== --- trunk/sensor-sample-app/.classpath (rev 0) +++ trunk/sensor-sample-app/.classpath 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/java"/> + <classpathentry kind="src" path="test/java"/> + <classpathentry kind="src" path="test/resources"/> + <classpathentry kind="src" path="src/resource"/> + <classpathentry kind="src" path="src/web"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry sourcepath="/MAVEN_REPO/springframework/zips/spring-src-1.2.6.zip" kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-1.2.6.jar"/> + <classpathentry kind="var" path="JUNIT_HOME/junit.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.8.0.1.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> Added: trunk/sensor-sample-app/.project =================================================================== --- trunk/sensor-sample-app/.project (rev 0) +++ trunk/sensor-sample-app/.project 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>sensor-sample-app</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: trunk/sensor-sample-app/conf/checkstyle.xml =================================================================== --- trunk/sensor-sample-app/conf/checkstyle.xml (rev 0) +++ trunk/sensor-sample-app/conf/checkstyle.xml 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<module name="Checker"> + <property name="severity" value="warning" /> + <module name="TreeWalker"> + <module name="JavadocMethod"></module> + <module name="JavadocType"></module> + <module name="JavadocVariable"></module> + <module name="JavadocStyle"></module> + <module name="ConstantName"></module> + <module name="LocalFinalVariableName"></module> + <module name="LocalVariableName"></module> + <module name="MemberName"></module> + <module name="MethodName"></module> + <module name="PackageName"></module> + <module name="ParameterName"></module> + <module name="StaticVariableName"></module> + <module name="TypeName"></module> + <module name="AvoidStarImport"></module> + <module name="IllegalImport"></module> + <module name="RedundantImport"></module> + <module name="UnusedImports"></module> + <module name="FileLength"></module> + <module name="LineLength"> + <property name="max" value="150"/> + </module> + <module name="MethodLength"></module> + <module name="ParameterNumber"></module> + <module name="EmptyForIteratorPad"></module> + <module name="MethodParamPad"></module> + <module name="NoWhitespaceAfter"></module> + <module name="NoWhitespaceBefore"></module> + <module name="OperatorWrap"></module> + <module name="ParenPad"></module> + <module name="TypecastParenPad"></module> + <module name="TabCharacter"></module> + <module name="WhitespaceAfter"></module> + <module name="WhitespaceAround"></module> + <module name="ModifierOrder"></module> + <module name="RedundantModifier"> + <property name="severity" value="ignore" /> + </module> + <module name="AvoidNestedBlocks"></module> + <module name="EmptyBlock"></module> + <module name="LeftCurly"></module> + <module name="NeedBraces"></module> + <module name="RightCurly"></module> + <!--<module name="AvoidInlineConditionals"></module>--> + <module name="DoubleCheckedLocking"></module> + <module name="EmptyStatement"></module> + <module name="EqualsHashCode"></module> + <module name="HiddenField"> + <property name="severity" value="ignore" /> + </module> + <module name="IllegalInstantiation"></module> + <module name="InnerAssignment"></module> + <module name="MagicNumber"></module> + <module name="MissingSwitchDefault"></module> + <module name="RedundantThrows"> + <property name="severity" value="ignore" /> + </module> + <module name="SimplifyBooleanExpression"></module> + <module name="SimplifyBooleanReturn"></module> + <module name="DesignForExtension"> + <property name="severity" value="ignore" /> + </module> + <module name="FinalClass"></module> + <module name="HideUtilityClassConstructor"></module> + <module name="InterfaceIsType"></module> + <module name="VisibilityModifier"></module> + <module name="ArrayTypeStyle"></module> + <module name="FinalParameters"> + <property name="severity" value="ignore" /> + </module> + <module name="TodoComment"></module> + <module name="UpperEll"></module> + </module> + <module name="PackageHtml"></module> + <module name="NewlineAtEndOfFile"></module> + <module name="Translation"></module> +</module> Added: trunk/sensor-sample-app/conf/clover.license =================================================================== --- trunk/sensor-sample-app/conf/clover.license (rev 0) +++ trunk/sensor-sample-app/conf/clover.license 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,165 @@ +Product: Clover +License: Open Source License, 0.x, 1.x +Issued: Mon Jan 16 2006 13:46:56 CST +Expiry: Never +Key: ea17f2aa023b03e442fff82b3 +Name: Age Mooy +Org: Sensor +Certificate: AAABym+Ow8B7/zEbxOMqqKwwrdpP+a1COmJGHco7sCNLjHkHnajPF+dQW +Ct12PMy0uml0s9xuus5wKngJ9OFk5PFeh01dzQF66bhXH1bvegLfvja3Kle6BYtDv4LZgE +gk3E0aJN4IbgTn+TgUckSevXDR4KzK77NWJfrVzkxV3/Jeo81QPUmW8XUnUmjTTEQK53Je +uj18MzFd//JI8bs4TKWzM7JuW8dcHs/VfKm9xceT7zqFn7lj8rWQe8XOgjjMH4BbtdHLXi +NdDT1OpjzpVDcVwniyFOEsn+00VGK5Sk8d0Aq2CipNSTwLFuH65xD9FwgEWC38Xvi477Ty +Trzw22Q/7hshIXSybx+CihiJQf76ZIVElm051hr/sbWzQyVEDwRr3liFjvWKCNwjSYw6iq +Tje1WyQMq48Adn7IqvrVRmqhGOGJGOcUpryVL4nQY1LfYEv0YalUziqgmi+W/zth1+dNt8 +6DrNcXqgtCmeQYkMiQB9qSiTlhcrvkYae/ByNZQsRsnEeMieRZu3k0peMFyKv4whOrkS9M +YNKfHQoS1K/v8UZy9RiQ/KXvFObk+XeNnWZDmg0+qQTZZPfH6GOnvo9TEYPfLbde++zG8g +O0a07OKUwwfqg+J+wafxO+phLu3nI6WvYDz7mttP0tWzo3bSHtlJLIkPsxcwX+uuE5185b +VgJ8zU3ZtLhxe/YmznhanP39hPPhyqyvSL3wz/lPv9Hotd4mxxHY36KCDrhNT6BgEm3j7b +eQP3sXMqOwIzHVlkcH6pKZ09sNdH4Y= +License Agreement: CLOVER VERSION 1 (ONE) SOFTWARE LICENSE AGREEMENT + +1. Licenses and Software + +Cortex eBusiness Pty Ltd, an Australian Proprietary Limited Company +("CENQUA") hereby grants to the purchaser (the "LICENSEE") a limited, +revocable, worldwide, non-exclusive, non-transferable, +non-sublicensable license to use the Clover version 1 (one) software +(the "Software"), including any minor upgrades thereof during the Term +(hereinafter defined) up to, but not including the next major version +of the Software. The licensee shall not, or knowingly allow others to, +reverse engineer, decompile, disassemble, modify, adapt, create +derivative works from or otherwise attempt to derive source code from +the Software provided. And, in accordance with the terms and +conditions of this Software License Agreement (the "Agreement"), the +Software shall be used solely by the licensed users in accordance with +the following edition specific conditions: + +a) Server Edition + +A Server Edition license entitles the Licensee to execute one instance +of Clover Server Edition on one (1) machine for the purposes of +instrumenting source code and generating reports. There are no +limitations on the use of the instrumented source code or generated +reports produced by Server Edition. + +b) Workstation Edition + +A Workstation Edition license entitles the licensee to use Clover +Workstation Edition on one (1) machine by one (1) individual end +user. Workstation Edition does not permit the generation of reports +for distribution. + +c) Team Edition + +A Team Edition license entitles the licensee to use Clover Team +edition on any number of machines solely by the licensed number of +users. Reports generated by Clover Team Edition are strictly for use +only by the licensed number of individual end users. + +2. License Fee + +In exchange for the License(s), the Licensee shall pay to Cenqua a +one-time, up front, non-refundable license fee. At the sole discretion +of Cenqua this fee will be waived for non-commercial +projects. Notwithstanding the Licensee's payment of the License Fee, +Cenqua reserves the right to terminate the License if Cenqua discovers +that the Licensee and/or the Licensee's use of the Software is in +breach of this Agreement. + +3. Proprietary Rights + +Cenqua will retain all right, title and interest in and to the +Software, all copies thereof, and Cenqua website(s), software, and +other intellectual property, including, but not limited to, ownership +of all copyrights, look and feel, trademark rights, design rights, +trade secret rights and any and all other intellectual property and +other proprietary rights therein. The Licensee will not directly or +indirectly obtain or attempt to obtain at any time, any right, title +or interest by registration or otherwise in or to the trademarks, +service marks, copyrights, trade names, symbols, logos or designations +or other intellectual property rights owned or used by Cenqua. All +technical manuals or other information provided by Cenqua to the +Licensee shall be the sole property of Cenqua. + +4. Term and Termination + +Subject to the other provisions hereof, this Agreement shall commence +upon the Licensee's opting into this Agreement and continue until the +Licensee discontinues use of the Software or the Agreement terminates +automatically upon the Licensee's breach of any term or condition of +this Agreement (the "Term"). Upon any such termination, the Licensee +will delete the Software immediately. + +5. Copying & Transfer + +The Licensee may copy the Software for back-up purposes only. The +Licensee may not assign or otherwise transfer the Software to any +third party. + +6. Specific Disclaimer of Warranty and Limitation of Liability + +THE SOFTWARE IS PROVIDED WITHOUT WARRANTY OF ANY KIND. CENQUA +DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. CENQUA WILL NOT BE LIABLE FOR ANY DAMAGES +ASSOCIATED WITH THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ORDINARY, +INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING +BUT NOT LIMITED TO DAMAGES RELATING TO LOST DATA OR LOST PROFITS, EVEN +IF CENQUA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Warranties and Representations + +Licensee Indemnification. CENQUA agrees to indemnify, defend and hold +the Licensee harmless from and against any and all liabilities, +damages, losses, claims, costs, and expenses (including reasonable +legal fees) arising out of or resulting from the Software or the use +thereof infringing upon, misappropriating or violating any patents, +copyrights, trademarks, or trade secret rights or other proprietary +rights of persons, firms or entities who are not parties to this +Agreement. + +CENQUA Indemnification. The Licensee warrants and represents that the +Licensee's actions with regard to the Software will be in compliance +with all applicable laws; and the Licensee agrees to indemnify, +defend, and hold CENQUA harmless from and against any and all +liabilities, damages, losses, claims, costs, and expenses (including +reasonable legal fees) arising out of or resulting from the +Licensee's failure to observe the use restrictions set forth herein. + +8. Publicity + +The Licensee grants permission for CENQUA to use Licensee's name +solely in customer lists. CENQUA shall not, without prior consent in +writing, use the Licensee's name, or that of its affiliates, in any +form with the specific exception of customer lists. CENQUA agrees to +remove Licensee's name from any and all materials within 7 days if +notified by the Licensee in writing. + +9. Governing Law + +This Agreement shall be governed by the laws of New South Wales, +Australia. + +10. Independent Contractors + +The parties are independent contractors with respect to each other, +and nothing in this Agreement shall be construed as creating an +employer-employee relationship, a partnership, agency relationship or +a joint venture between the parties. + +11. Assignment + +This Agreement is not assignable or transferable by the Licensee. +CENQUA in its sole discretion may transfer a license to a third party +at the written request of the Licensee. + +12. Entire Agreement + +This Agreement constitutes the entire agreement between the parties +concerning the Licensee's use of the Software. This Agreement +supersedes any prior verbal understanding between the parties and any +Licensee purchase order or other ordering document, regardless of +whether such document is received by CENQUA before or after execution +of this Agreement. This Agreement may be amended only in writing by +CENQUA. Added: trunk/sensor-sample-app/conf/findbugs-excludes.xml =================================================================== --- trunk/sensor-sample-app/conf/findbugs-excludes.xml (rev 0) +++ trunk/sensor-sample-app/conf/findbugs-excludes.xml 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,5 @@ +<FindBugsFilter> + <Match classregex=".*" > + <BugCode name="EI, EI2, UwF" /> + </Match> +</FindBugsFilter> Added: trunk/sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar =================================================================== (Binary files differ) Property changes on: trunk/sensor-sample-app/lib/mysql-connector-java-3.1.12-bin.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/sensor-sample-app/maven.xml =================================================================== --- trunk/sensor-sample-app/maven.xml (rev 0) +++ trunk/sensor-sample-app/maven.xml 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,33 @@ +<project xmlns:j="jelly:core" + xmlns:maven="jelly:maven" + xmlns:ant="jelly:ant" + > + + <!-- =============================================================== --> + <!-- Pre/post goals --> + <!-- =============================================================== --> + + <!-- + | Make JUNIT tests run with clover instrumentation, + | so we don't have to run unit tests again + | see: maven.clover.execute.during.report=false + --> + <preGoal name="junit-report:report"> + <attainGoal name="clover:on"/> + </preGoal> + + <postGoal name="clover:report"> + <attainGoal name="clover:off"/> + </postGoal> + + <!-- =============================================================== --> + <!-- Shortcuts. --> + <!-- =============================================================== --> + + <!-- Shortcut for running the unit tests and generating the html report for it. --> + <goal name="test-report" description="" prereqs="junit-report:report, xdoc"/> + + <!-- Shortcut for generating the clover html report for it. --> + <goal name="clover-report" description="" prereqs="clover, xdoc"/> + +</project> \ No newline at end of file Added: trunk/sensor-sample-app/project.properties =================================================================== --- trunk/sensor-sample-app/project.properties (rev 0) +++ trunk/sensor-sample-app/project.properties 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,117 @@ +# ------------------------------------------------------------------------ +# Maven runtime behaviour +# ------------------------------------------------------------------------ + +maven.repo.remote = http://www.ibiblio.org/maven,\ + http://dist.codehaus.org,\ + http://www.codeczar.com/maven,\ + http://mirrors.sunsite.dk/maven/,\ + http://maven-plugins.sourceforge.net/maven + + +# ------------------------------------------------------------------------ +# Java Properties +# ------------------------------------------------------------------------ + +debug = off +maven.compile.target=1.4 +maven.compile.source=1.4 + +maven.javadoc.overview = ${basedir}/src/java/overview.html +maven.javadoc.links = http://java.sun.com/j2se/1.4.2/docs/api/ +maven.javadoc.private = false + +maven.war.src = src/web + +# ------------------------------------------------------------------------ +# M A V E N J A R O V E R R I D E +# ------------------------------------------------------------------------ +maven.jar.override = on +maven.jar.mysql=${basedir}/lib/mysql-connector-java-3.1.12-bin.jar + +# ------------------------------------------------------------------------ +# Licenses +# ------------------------------------------------------------------------ + +maven.license.licenseFile=${basedir}/conf/license.txt + + +# ------------------------------------------------------------------------ +# Site look and feel +# ------------------------------------------------------------------------ + +maven.xdoc.date=left +maven.xdoc.date.format=dd MMMM yyyy HH:mm +maven.xdoc.poweredby.image=maven-feather.png + + +# ------------------------------------------------------------------------ +# Unit tests and coverage +# ------------------------------------------------------------------------ + +maven.junit.fork=true +maven.test.skip=false + +maven.clover.execute.during.report=false +maven.clover.report.xml=true + +# The clover license +maven.clover.license.path=${basedir}/conf/clover.license + + +# ------------------------------------------------------------------------ +# Misc plugin settings +# ------------------------------------------------------------------------ +maven.pmd.enable=true +maven.pmd.check.tests=false +maven.findbugs.enable=true +maven.tasklist.taskTag=TODO +maven.simian.includetests=false +maven.checkstyle.properties=${basedir}/conf/checkstyle.xml +maven.findbugs.excludeFilter=${basedir}/conf/findbugs-excludes.xml + + +# ------------------------------------------------------------------------ +# Properties for the dashboard reactor +# ------------------------------------------------------------------------ + +maven.dashboard.basedir=${basedir} +maven.dashboard.includes=project.xml +maven.dashboard.ignoreFailures=true + +# Generated dashboard xml data file +maven.dashboard.report.xml=${maven.build.dir}/dashboard-data.xml + +# Generated dashboard main report xdoc file name (without the extension). +# Note: The value must not include any path as the xdoc will be +# generated in ${maven.gen.docs}. +maven.dashboard.report.xdoc=dashboard-report + +# Generated dashboard legend xdoc file name (without the extension). +# Note: The value must not include any path as the xdoc will be +# generated in ${maven.gen.docs}. +maven.dashboard.report.legend.xdoc=dashboard-report-legend + +# Location of JSL template to generate the main report xdoc file +maven.dashboard.template=${basedir}/conf/vertical-dashboard.jsl + +# Location of JSL template to generate the legend report xdoc file +maven.dashboard.template.legend=${plugin.resources}/templates/legend.jsl + +# If true, do not show projects for which gathered data is empty for all +# aggregators. +maven.dashboard.report.showempty=true + +# ------------------------------------------------------------------------ +# Properties for gathering dashboard data for a single project +# ------------------------------------------------------------------------ + +# Location of default dashboard aggregators +maven.dashboard.aggregators.dir=${plugin.resources}/aggregators + +# Comma-separated list of aggregators to use +maven.dashboard.aggregators=junitpassrate,clovertpc,juniterrors,junitfailures,cloverloc,cloverncloc,cserrors,cswarnings,fbviolations,pmdviolations,simiantdl,scmchangedfiles + +# Generated dashboard data for a single project +maven.dashboard.report.single=${maven.build.dir}/dashboard-single.xml +maven.dashboard.rungoals=false Added: trunk/sensor-sample-app/project.xml =================================================================== --- trunk/sensor-sample-app/project.xml (rev 0) +++ trunk/sensor-sample-app/project.xml 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,351 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <pomVersion>3</pomVersion> + + <artifactId>sensor-sample-app</artifactId> + <name>Sensor Sample Application</name> + <groupId>sensor</groupId> + + <currentVersion>0.1-dev</currentVersion> + <inceptionYear>2005</inceptionYear> + <package>com.xebia.springroller</package> + + <organization> + <name>Xebia</name> + <url>http://www.xebia.com/</url> + <logo></logo> + </organization> + + <logo></logo> + <url>http://sensor.sf.net/</url> + + <shortDescription> + Sample application for the sensor project. + This application shows howto configure sensor in a webproject. + </shortDescription> + + <repository> + <connection>scm:svn:anonymous@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app</connection> + <developerConnection>scm:svn:${maven.username}@https://svn.sourceforge.net/svnroot/sensor/trunk/sensor-sample-app</developerConnection> + <url>https://svn.sourceforge.net/svnroot/sensor</url> + </repository> + + <mailingLists> + <mailingList> + <name>Sensor Developers List (sen...@li...)</name> + <subscribe>https://lists.sourceforge.net/lists/listinfo/sensor-developer</subscribe> + <unsubscribe>https://lists.sourceforge.net/lists/listinfo/sensor-developer</unsubscribe> + <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=45376</archive> + </mailingList> + </mailingLists> + + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>/license.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + + <developers> + <developer> + <name>Age Mooy</name> + <id>amooy</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Jurjan Woltman</name> + <id>jwoltman</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Richard Swart</name> + <id>rswart</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Lonneke Dikmans</name> + <id>ldikmans</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Silvester van der Bijl</name> + <id>silvester</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Jeroen Borgers</name> + <id>jborgers</id> + <timezone>CET</timezone> + </developer> + + <!-- original developers of the sample appliation --> + <developer> + <name>Vincent Partington</name> + <id>vpartington</id> + <timezone>CET</timezone> + </developer> + <developer> + <name>Michael Franken</name> + <id>mfranken</id> + <timezone>CET</timezone> + </developer> + </developers> + + <dependencies> + + + <!-- Sensor dependencies --> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-core</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>false</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-support</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>false</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>sensor</groupId> + <artifactId>sensor-console</artifactId> + <version>0.1-dev</version> + <type>jar</type> + <properties> + <eclipse.dependency>false</eclipse.dependency> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <!-- Spring --> + <dependency> + <groupId>springframework</groupId> + <artifactId>spring</artifactId> + <version>1.2.6</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <dependency> + <groupId>aopalliance</groupId> + <artifactId>aopalliance</artifactId> + <version>1.0</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <dependency> + <groupId>springframework</groupId> + <artifactId>spring-mock</artifactId> + <version>1.2.6</version> + <type>jar</type> + </dependency> + + <!-- use an oracle database driver if you run on an Oracle database --> + + <!-- somehow this does not work in Tomcat, so put the jar in the common/lib file of the TOMCAT_HOME directory --> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql</artifactId> + <version>3.1.12</version> + <jar>lib/mysql-connector-java-3.1.12-bin.jar</jar> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + + <!-- Web application support --> + <dependency> + <groupId>jstl</groupId> + <artifactId>jstl</artifactId> + <version>1.0.6</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <dependency> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <version>1.0.6</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + + <!-- Velocity --> + <dependency> + <groupId>velocity</groupId> + <artifactId>velocity</artifactId> + <version>1.4</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + <dependency> + <groupId>velocity-tools</groupId> + <artifactId>velocity-tools</artifactId> + <version>1.2</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + + <!-- commons --> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>3.1</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>1.1</version> + <type>jar</type> + </dependency> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.12</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency> + + + <!--dependency> + <groupId>cglib</groupId> + <artifactId>cglib-full</artifactId> + <version>2.0.2</version> + <type>jar</type> + <properties><war.bundle>true</war.bundle></properties> + </dependency--> + + <!-- unittest dependencies --> + <dependency> + <groupId>dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.1</version> + <type>jar</type> + </dependency> + + <dependency> + <groupId>hsqldb</groupId> + <artifactId>hsqldb</artifactId> + <version>1.8.0.1</version> + <type>jar</type> + </dependency> + + + + <!-- Compile time libs always avaliable at runtime (on all j2ee app servers) --> + <dependency> + <groupId>servletapi</groupId> + <artifactId>servletapi</artifactId> + <version>2.3</version> + <type>jar</type> + </dependency> + + <!-- Maven Plugins Used by this Project --> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <version>1.7</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven-plugins</groupId> + <artifactId>maven-findbugs-plugin</artifactId> + <version>1.0</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-clover-plugin</artifactId> + <version>1.10</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven-plugins</groupId> + <artifactId>maven-findbugs-plugin</artifactId> + <version>1.0</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-dashboard-plugin</artifactId> + <version>1.7</version> + <type>plugin</type> + </dependency> + <dependency> + <groupId>maven</groupId> + <artifactId>maven-xdoc-plugin</artifactId> + <version>1.9</version> + <type>plugin</type> + </dependency> + </dependencies> + + <build> + <sourceDirectory>${basedir}/src/java</sourceDirectory> + <unitTestSourceDirectory>${basedir}/test/java</unitTestSourceDirectory> + + <unitTest> + <includes> + <include>**/*Test.java</include> + </includes> + <excludes> + <exclude>**/Abstract*.java</exclude> + </excludes> + <resources> + <resource> + <directory>${basedir}/test/resources</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.sql</include> + </includes> + </resource> + </resources> + </unitTest> + + <resources> + <resource> + <directory>${basedir}/src/resource</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.txt</include> + <include>**/*.properties</include> + </includes> + </resource> + </resources> + </build> + + <reports> + <report>maven-license-plugin</report> + <report>maven-javadoc-plugin</report> + <report>maven-jxr-plugin</report> + <report>maven-junit-report-plugin</report> + <report>maven-clover-plugin</report> + <report>maven-checkstyle-plugin</report> + <report>maven-pmd-plugin</report> + <report>maven-findbugs-plugin</report> + <report>maven-simian-plugin</report> + + <report>maven-dashboard-plugin</report> + </reports> +</project> Added: trunk/sensor-sample-app/src/java/META-INF/MANIFEST.MF =================================================================== --- trunk/sensor-sample-app/src/java/META-INF/MANIFEST.MF (rev 0) +++ trunk/sensor-sample-app/src/java/META-INF/MANIFEST.MF 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,37 @@ +Manifest-Version: 1.0 +Class-Path: META-INF/antlr-2.7.5H3.jar + META-INF/axis.jar + META-INF/burlap-2.1.12.jar + META-INF/cglib-nodep-2.1_3.jar + META-INF/commons-collections.jar + META-INF/commons-dbcp.jar + META-INF/commons-discovery-0.2.jar + META-INF/commons-logging.jar + META-INF/commons-pool.jar + META-INF/dom4j-1.6.jar + META-INF/ehcache-1.1.jar + META-INF/hessian-2.1.12.jar + META-INF/hibernate3.jar + META-INF/ibatis-common-2.jar + META-INF/ibatis-sqlmap-2.jar + META-INF/itext-1.3.jar + META-INF/jaxrpc.jar + META-INF/jta.jar + META-INF/log4j-1.2.9.jar + META-INF/mysql-connector-java-3.1.11-bin.jar + META-INF/saaj.jar + META-INF/spring-mock.jar + META-INF/wsdl4j.jar + META-INF/spring-aop.jar + META-INF/spring-beans.jar + META-INF/spring-context.jar + META-INF/spring-core.jar + META-INF/spring-dao.jar + META-INF/spring-hibernate.jar + META-INF/spring-jdbc.jar + META-INF/spring-orm.jar + META-INF/spring-remoting.jar + META-INF/spring-support.jar + META-INF/spring-web.jar + META-INF/spring-webmvc.jar + Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/ArticleDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,64 @@ +package com.xebia.springroller.dao; + +import java.util.List; + +import com.xebia.springroller.domain.Article; + +/** + * Interface implements by DAO's for {@link Article} objects. + * + * @author Vincent Partington + */ +public interface ArticleDao { + + /** + * Returns the article with the specified ID. + * + * @param id + * the ID of the article. + * @return the article or <code>null</code> if the article could not be found. + */ + Article getArticle(int articleId); + + /** + * Returns a list of all articles, sorted by publication date. + * + * @return a read-only list containing all articles. + */ + List getAllArticles(); + + /** + * Returns a list of all articles authored by a specific user, sorted by publication date. + * + * @param authorName + * the name of the author of the articles to find. + * @return a read-only list of all articles authored by a specific user. + */ + List getArticlesByAuthor(String authorName); + + /** + * Adds an article. + * + * @param newArticle + * the article to add. The ID of the article is set. + */ + void addArticle(Article newArticle); + + /** + * Updates an article. + * + * @param updatedArticle + * the article to update. The ID of the article is used to determine which article to + * update. + */ + void updateArticle(Article updatedArticle); + + /** + * Deletes an article. + * + * @param articleId + * the ID of the article to delete. + */ + void deleteArticle(int articleId); + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/UserDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,54 @@ +package com.xebia.springroller.dao; + +import java.util.List; + +import com.xebia.springroller.domain.User; + +/** + * Interface implements by DAO's for {@link User} objects. + * + * @author Vincent Partington + */ +public interface UserDao { + + /** + * Returns the user with the specified username. + * + * @param username + * the username. + * @return the user or <code>null</code> if the user could not be found. + */ + User getUser(String username); + + /** + * Returns a list of all users, sorted by username, + * + * @return a read-only list containing all users. + */ + List getAllUsers(); + + /** + * Adds a user. + * + * @param newUser + * the user to add. The username should already have been set. + */ + void addUser(User newUser); + + /** + * Updates a user. + * + * @param updatedUser + * the user to update. The username is used to determine which user to update. + */ + void updateUser(User updatedUser); + + /** + * Deletes a user. + * + * @param username + * the username. + */ + void deleteUser(String username); + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcArticleDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,165 @@ +package com.xebia.springroller.dao.impl.jdbc; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +import org.springframework.jdbc.core.RowMapper; +import org.springframework.jdbc.core.support.JdbcDaoSupport; + +import com.xebia.springroller.dao.ArticleDao; +import com.xebia.springroller.domain.Article; +import com.xebia.springroller.domain.User; + +/** + * + * Class that implements {@link com.xebia.springroller.dao.ArticleDao} by using + * {@link org.springframework.jdbc.core.JdbcTemplate}. + * + * This class uses a private RowMapper to map the columns from the resultset to + * the {@link com.xebia.springroller.domain.Article article}. + * + * Ids are either generated using a sequence or the auto increment. The id + * generator is injected by spring. + * + * @author Vincent Partington + * @author Lonneke Dikmans + * + */ +public class JdbcArticleDao extends JdbcDaoSupport implements ArticleDao { + + /** Query that retrieves all articles. */ + private static final String ALL_ARTICLES_QUERY = "SELECT ID ,TITLE, TEXT, PUBLICATION_DATE, PUBLICATION_IP_ADDRESS, AUTHOR FROM articles"; + + /** Query that updates all the columns of the article. */ + private static final String UPDATE_ARTICLE_QUERY = "UPDATE articles set TITLE=?, TEXT=?, PUBLICATION_DATE=?, PUBLICATION_IP_ADDRESS = ?, author = ? where id = ?"; + + /** Query that inserts the article. */ + private static final String INSERT_ARTICLE_QUERY = "INSERT INTO articles(id, title, text, publication_date, publication_ip_address, author) VALUES(?, ?, ?, ?, ?, ?) "; + + /** Query that retrieves all articles by a particular author. */ + private static final String ARTICLE_BY_AUTHOR_QUERY = ALL_ARTICLES_QUERY + + " WHERE author = ?"; + + /** query that retreives an article by its id. */ + private static final String ARTICLE_BY_ID_QUERY = ALL_ARTICLES_QUERY + + " WHERE id = ?"; + + /** + * @see ArticleDao#getArticle(int) + */ + public Article getArticle(int articleId) { + + Article article = null; + + List results = getJdbcTemplate().query(ARTICLE_BY_ID_QUERY, + new Object[] { new Integer(articleId) }, new ArticleMapper()); + if (results != null && results.size() == 1) { + article = (Article) results.get(0); + } + + return article; + } + + /** + * @see ArticleDao#getAllArticles() + */ + public List getAllArticles() { + + return getJdbcTemplate().query(ALL_ARTICLES_QUERY, + new ArticleMapper()); + } + + /** + * @see ArticleDao#getArticlesByAuthor(String) + */ + public List getArticlesByAuthor(String authorName) { + return getJdbcTemplate().query(ARTICLE_BY_AUTHOR_QUERY, + new Object[] { authorName }, new ArticleMapper()); + } + + /** + * The article that is passed in does not have an Id yet. This is generated + * by fetching a number from the sequence table. + * + * @see ArticleDao#add + */ + public void addArticle(Article newArticle) { + Integer id = getId(newArticle.getId()); + getJdbcTemplate().update( + INSERT_ARTICLE_QUERY, + new Object[] { id, newArticle.getTitle(), newArticle.getText(), + newArticle.getPublicationDate(), + newArticle.getPublicationIPAddressHome(), + newArticle.getAuthor().getName() }); + + } + + /** + * @see ArticleDao#updateArticle(Article) + */ + public void updateArticle(Article updatedArticle) { + getJdbcTemplate().update( + UPDATE_ARTICLE_QUERY, + new Object[] { updatedArticle.getTitle(), + updatedArticle.getText(), + updatedArticle.getPublicationDate(), + updatedArticle.getPublicationIPAddressHome(), + updatedArticle.getAuthor().getName(), + new Integer(updatedArticle.getId()) }); + + } + + public void deleteArticle(int articleId) { + getJdbcTemplate().update("DELETE from articles where id = ?", + new Object[] { new Integer(articleId) }); + + } + + /** + * returns a unique id for this object from the database. This class should + * be overridden if the underlying database has no 'autoincrement' + * functionality. + * + * @return the unique identifier of <code>null</code> if the underlying + * database has an autoincrement functionality and the id passed in + * is 0; + */ + protected Integer getId(int id) { + Integer uniqueId = null; + if (id != 0) { + uniqueId = new Integer(id); + } + return uniqueId; + } + + /** + * private class that mapps the rows in a resultset to the {@link Article} + * article. + * + * + */ + private final class ArticleMapper implements RowMapper { + + /** + * @see RowMapper#mapRow(java.sql.ResultSet, int) + */ + public Object mapRow(ResultSet rs, int rowNr) throws SQLException { + + Article article = new Article(); + + article.setId(rs.getInt("id")); + article.setTitle(rs.getString("title")); + article.setText(rs.getString("text")); + article.setPublicationDate(rs.getDate("publication_date")); + article.setPublicationIPAddress((rs + .getString("publication_ip_address"))); + User author = new User(); + author.setName(rs.getString("author")); + article.setAuthor(author); + + return article; + } + } + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/JdbcUserDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,69 @@ +package com.xebia.springroller.dao.impl.jdbc; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +import org.springframework.jdbc.core.PreparedStatementSetter; +import org.springframework.jdbc.core.RowMapper; +import org.springframework.jdbc.core.support.JdbcDaoSupport; + +import com.xebia.springroller.dao.UserDao; +import com.xebia.springroller.domain.User; + +public class JdbcUserDao extends JdbcDaoSupport implements UserDao { + + private final class UserSetter implements PreparedStatementSetter { + private final User user; + + private UserSetter(User user) { + super(); + this.user = user; + } + + public void setValues(PreparedStatement stm) throws SQLException { + stm.setString(1, user.getName()); + stm.setString(2, user.getPassword()); + } + } + + private final class UserMapper implements RowMapper { + public Object mapRow(ResultSet rs, int rowNr) throws SQLException { + User user = new User(); + user.setName(rs.getString("name")); + user.setPassword(rs.getString("password")); + return user; + } + } + + public User getUser(String username) { + + return (User) getJdbcTemplate().query( + "SELECT name, password FROM users WHERE name = ?", + new Object[] { username }, new UserMapper()).get(0); + } + + public List getAllUsers() { + return getJdbcTemplate().query("SELECT * FROM users", new UserMapper()); + } + + public void addUser(final User newUser) { + getJdbcTemplate().update( + "INSERT INTO users (name, password) VALUES (?, ?)", + new UserSetter(newUser)); + } + + public void updateUser(final User updatedUser) { + getJdbcTemplate().update( + "UPDATE users SET name = ?, password = ? WHERE name = ?", + new Object[] { updatedUser.getName(), + updatedUser.getPassword(), updatedUser.getName() }); + + } + + public void deleteUser(String username) { + getJdbcTemplate().update("DELETE FROM users WHERE name = ?", + new Object[] { username }); + } +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/jdbc/OracleJdbcArticleDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,27 @@ +/** + * + */ +package com.xebia.springroller.dao.impl.jdbc; + +/** + * Implements Oracle specific constructs. + * @author Lonneke Dikmans + * + */ +public class OracleJdbcArticleDao extends JdbcArticleDao { + + /** query that retrieves the next value from the article sequence. */ + private static final String NEXT_VAL_QUERY = "select ARTICLE_SEQ.nextval from DUAL"; + + /** + * Returns an Id from the article sequence. + * @see JdbcArticleDao#getId(). + */ + protected Integer getId() { + int id = getJdbcTemplate().queryForInt(NEXT_VAL_QUERY); + return new Integer(id); + } + + + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryArticleDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,133 @@ +package com.xebia.springroller.dao.impl.memory; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import com.xebia.springroller.dao.ArticleDao; +import com.xebia.springroller.domain.Article; + +/** + * Implementation of the {@link com.xebia.springroller.dao.ArticleDao} that keeps the articles in memory. + * + * @author Vincent Partington + * + */ +public class MemoryArticleDao implements ArticleDao { + + /** + * map for articles. Key is the id of the article. Value is of type + * {@link Article}. + */ + private Map articles = new HashMap(); + + /** counter that keeps track of the last id.*/ + private int nextArticleId = 1; + + /** + * @see ArticleDao#getArticle(int) + */ + public Article getArticle(int articleId) { + return (Article) articles.get(new Integer(articleId)); + } + + /** + * @see ArticleDao#getAllArticles(). + */ + public List getAllArticles() { + List articlesToReturn = new ArrayList(articles.values()); + Collections.sort(articlesToReturn, new ArticleComparator()); + return articlesToReturn; + } + + /** + * @see ArticleDao#getArticlesByAuthor(String) + */ + public List getArticlesByAuthor(String authorName) { + List articlesToReturn = new ArrayList(); + for (Iterator i = articles.values().iterator(); i.hasNext();) { + Article article = (Article) i.next(); + if (authorName.equals(article.getAuthor().getName())) { + articlesToReturn.add(article); + } + } + Collections.sort(articlesToReturn, new ArticleComparator()); + return articlesToReturn; + } + + /** + * @see ArticleDao#addArticle(Article). + */ + public void addArticle(Article newArticle) { + newArticle.setId(nextArticleId++); + articles.put(new Integer(newArticle.getId()), newArticle); + } + + /** + * @see ArticleDao#updateArticle(Article) + */ + public void updateArticle(Article updatedArticle) { + articles.put(new Integer(updatedArticle.getId()), updatedArticle); + } + + /** + * @see ArticleDao#deleteArticle(int) + */ + public void deleteArticle(int articleId) { + articles.remove(new Integer(articleId)); + } + + /** + * Sets all article in the dao's memory. To be used for initializion. + */ + public void setArticles(List articlesToAdd) { + articles.clear(); + for (Iterator i = articlesToAdd.iterator(); i.hasNext();) { + Article articleToAdd = (Article) i.next(); + addArticle(articleToAdd); + } + } + + /** + * Comparator for the map. + * @author Vincent Partington + * + */ + public static class ArticleComparator implements Comparator { + + /** + * @see Comparator#compare(java.lang.Object, java.lang.Object) + */ + public int compare(Object leftObject, Object rightObject) { + + if (leftObject instanceof Article && rightObject instanceof Article) { + Article leftArticle = (Article) leftObject; + Article rightArticle = (Article) rightObject; + int order = leftArticle.getPublicationDate().compareTo( + rightArticle.getPublicationDate()); + if (order != 0) { + return -order; // we want the reverse order: newest + // articles first! + } else { + if (leftArticle.getId() < rightArticle.getId()) { + return 1; + } else if (leftArticle.getId() > rightArticle.getId()) { + return -1; + } else { + return 0; + } + } + } + // the objects were not articles + else { + return 0; + } + } + + } + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/dao/impl/memory/MemoryUserDao.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,94 @@ +package com.xebia.springroller.dao.impl.memory; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import com.xebia.springroller.dao.UserDao; +import com.xebia.springroller.domain.User; + +/** + * Implementation of the {@link com.xebia.springroller.dao.UserDao} that keeps the users in memory. + * @author Vincent Partington + * + */ +public class MemoryUserDao implements UserDao { + + /** map with key the name of the user, value a {@link User}.*/ + private Map users = new HashMap(); + + /** + * @see UserDao#getUser(String) + */ + public User getUser(String username) { + return (User) users.get(username); + } + + /** + * @see UserDao#getAllUsers() + */ + public List getAllUsers() { + List usersToReturn = new ArrayList(users.values()); + Collections.sort(usersToReturn, new UserComparator()); + return usersToReturn; + } + + /** + * @see UserDao#addUser(User) + */ + public void addUser(User newUser) { + users.put(newUser.getName(), newUser); + } + + /** + * @see UserDao#updateUser(User) + */ + public void updateUser(User updatedUser) { + users.put(updatedUser.getName(), updatedUser); + } + + /** + * @see UserDao#deleteUser(String) + */ + public void deleteUser(String username) { + users.remove(username); + } + + /** + * Sets all users in the dao's memory. To be used for initializion. + */ + public void setUsers(List usersToAdd) { + users.clear(); + for (Iterator i = usersToAdd.iterator(); i.hasNext();){ + User userToAdd = (User) i.next(); + addUser(userToAdd); + } + } + + /** + * Comparotor for user map. + * @author Vincent Partington + * + */ + private static class UserComparator implements Comparator { + + /** + * @see Comparator#compare(java.lang.Object, java.lang.Object) + */ + public int compare(Object leftObject, Object rightObject) { + if (leftObject instanceof User && rightObject instanceof User){ + User leftUser = (User) leftObject; + User rightUser = (User) rightObject; + return leftUser.getName().compareTo(rightUser.getName()); + } else{ + return 0; + } + } + + } + +} Added: trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java =================================================================== --- trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java (rev 0) +++ trunk/sensor-sample-app/src/java/com/xebia/springroller/domain/Article.java 2006-04-02 21:31:21 UTC (rev 102) @@ -0,0 +1,142 @@ +package com.xebia.springroller.domain; + +import java.io.Serializable; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Date; + +/** + * An article in the blog. + * + * @author Vincent Partington + */ +public class Article implements Serializable { + + /** + * generated serialVersionUID. + */ + private static final long serialVersionUID = -1988560852374861470L; + + /** technical id of the article. */ + private int id; + + /** title of the article. */ + private String title; + + /** actual body of the article. */ + private String text; + + /** date this article was published on the internet. */ + private Date publicationDate; + + /** {@link InetAddress Address} it is submitted from. */ + private InetAddress publicationIPAddress; + + /** {@link User author} of the article.*/ + private User author; + + /** + * Returns the ID of the article. + */ + public int getId() { + return id; + } + + /** + * Sets the ID of the article. + */ + public void setId(int id) { + this.id = id; + } + + /** + * Returns the title. + */ + public String getTitle() { + return title; + } + + /** + * Sets the title. + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * Returns the text. + */ + public String getText() { + return text; + } + + /** + * Sets the text. + */ + public void setText(String text) { + this.text = text; + } + + /** + * Returns the date and time of publication. + */ + public Date getPublicationDate() { + return publicationDate; + } + + /** + * Sets the date and time of publication. + */ + public void setPublicationDate(Date publicationDate) { + this.publicationDate = publicationDate; + } + + /** + * Sets the IP address. If an UnknownHostException is thrown, the publication address is <code>null</code>. + * @param address that is converted to a {@link InetAddress address}. + */ + public void setPublicationIPAddress(String address){ + try { + this.publicationIPAddress = InetAddress.getByName(address); + } catch (UnknownHostException e) { + publicationIPAddress = null; + e.printStackTrace(); + } + } + + /** + * R... [truncated message content] |
From: <ldi...@us...> - 2006-04-02 21:29:15
|
Revision: 101 Author: ldikmans Date: 2006-04-02 14:29:04 -0700 (Sun, 02 Apr 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=101&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/sensor-sample-app/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2006-03-28 20:38:14
|
Revision: 100 Author: rswart Date: 2006-03-28 12:38:02 -0800 (Tue, 28 Mar 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=100&view=rev Log Message: ----------- added serializable impl for JMX Modified Paths: -------------- trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerStatistics.java trunk/sensor-core/src/java/net/sf/sensor/timer/FilteredTimerStatistics.java trunk/sensor-core/src/java/net/sf/sensor/timer/TimerData.java Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerStatistics.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerStatistics.java 2006-03-28 20:36:22 UTC (rev 99) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerStatistics.java 2006-03-28 20:38:02 UTC (rev 100) @@ -20,6 +20,7 @@ import java.util.Date; import java.util.List; import java.util.Set; +import java.io.Serializable; /** * Thread-safe, refreshable snapshot view to the internally managed TimerData @@ -29,7 +30,7 @@ * @see TimerStatistics * @author Age Mooy */ -public class DefaultTimerStatistics implements TimerStatistics { +public class DefaultTimerStatistics implements TimerStatistics, Serializable { // ========================================================================== // The nested TimerData Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/FilteredTimerStatistics.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/FilteredTimerStatistics.java 2006-03-28 20:36:22 UTC (rev 99) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/FilteredTimerStatistics.java 2006-03-28 20:38:02 UTC (rev 100) @@ -16,6 +16,8 @@ package net.sf.sensor.timer; +import java.io.Serializable; + import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -27,7 +29,7 @@ * * @author Age Mooy */ -public class FilteredTimerStatistics implements TimerStatistics { +public class FilteredTimerStatistics implements TimerStatistics, Serializable { /** The {@link TimerStatistics} to delegate to. */ private TimerStatistics delegate = null; Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/TimerData.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/TimerData.java 2006-03-28 20:36:22 UTC (rev 99) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/TimerData.java 2006-03-28 20:38:02 UTC (rev 100) @@ -16,6 +16,8 @@ package net.sf.sensor.timer; +import java.io.Serializable; + import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; @@ -40,7 +42,7 @@ * * @author Age Mooy */ -class TimerData { +class TimerData implements Serializable{ // ========================================================================== // Fields This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2006-03-28 20:36:47
|
Revision: 99 Author: rswart Date: 2006-03-28 12:36:22 -0800 (Tue, 28 Mar 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=99&view=rev Log Message: ----------- Modified Paths: -------------- trunk/sensor-support/.settings/.component trunk/sensor-support/project.xml trunk/sensor-support/src/java/net/sf/sensor/support/spring/SpringBeanNameConstants.java trunk/sensor-support/src/resources/net/sf/sensor/support/spring/sensor-jmx.xml trunk/sensor-support/test/java/net/sf/sensor/support/spring/SensorSpringConfigurationsTest.java Added Paths: ----------- trunk/sensor-support/test/java/net/sf/sensor/support/spring/SensorJMXTest.java trunk/sensor-support/test/resources/ Modified: trunk/sensor-support/.settings/.component =================================================================== --- trunk/sensor-support/.settings/.component 2006-03-25 21:31:23 UTC (rev 98) +++ trunk/sensor-support/.settings/.component 2006-03-28 20:36:22 UTC (rev 99) @@ -4,5 +4,6 @@ <wb-resource deploy-path="/" source-path="/src/java"/> <wb-resource deploy-path="/" source-path="/src/resources"/> <wb-resource deploy-path="/" source-path="/test/java"/> +<wb-resource deploy-path="/" source-path="/test/resources"/> </wb-module> </project-modules> Modified: trunk/sensor-support/project.xml =================================================================== --- trunk/sensor-support/project.xml 2006-03-25 21:31:23 UTC (rev 98) +++ trunk/sensor-support/project.xml 2006-03-28 20:36:22 UTC (rev 99) @@ -188,7 +188,19 @@ <version>2.0.0-rc-5</version> <type>jar</type> </dependency> - + <dependency> + <groupId>mx4j</groupId> + <artifactId>mx4j</artifactId> + <version>3.0.1</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>mx4j</groupId> + <artifactId>mx4j-remote</artifactId> + <version>3.0.1</version> + <type>jar</type> + </dependency> + <!-- Maven Plugins Used by this Project --> <dependency> <groupId>maven</groupId> @@ -244,6 +256,15 @@ <include>**/*.xml</include> </includes> </resource> + <resource> + <directory>${basedir}/test/resources</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.dtd</include> + <include>**/*.properties</include> + <include>**/*.xsd</include> + </includes> + </resource> </resources> </unitTest> Modified: trunk/sensor-support/src/java/net/sf/sensor/support/spring/SpringBeanNameConstants.java =================================================================== --- trunk/sensor-support/src/java/net/sf/sensor/support/spring/SpringBeanNameConstants.java 2006-03-25 21:31:23 UTC (rev 98) +++ trunk/sensor-support/src/java/net/sf/sensor/support/spring/SpringBeanNameConstants.java 2006-03-28 20:36:22 UTC (rev 99) @@ -90,5 +90,35 @@ // ========================================================================== + /** + * The bean name of the MbeanServer bean as defined in the jmx sensor + * Spring configuration file, which is available on the classpath as + * <code>/sf/sensor/support/spring/sensor-jmx.xml</code>. + */ + public static final String MBEAN_SERVER_BEAN_NAME = "sensor.mbeanServer"; + + /** + * The bean name of the JMX exporter bean as defined in the jmx sensor + * Spring configuration file, which is available on the classpath as + * <code>/sf/sensor/support/spring/sensor-jmx.xml</code>. + */ + public static final String JMX_EXPORTER_BEAN_NAME = "sensor.jmxExporter"; + + + /** + * The bean name of the RMI registry bean as defined in the jmx sensor + * Spring configuration file, which is available on the classpath as + * <code>/sf/sensor/support/spring/sensor-jmx.xml</code>. + */ + public static final String JMX_RMI_REGISTRY_BEAN_NAME = "sensor.rmiRegistry"; + + + /** + * The bean name of the JMX server connector bean as defined in the jmx sensor + * Spring configuration file, which is available on the classpath as + * <code>/sf/sensor/support/spring/sensor-jmx.xml</code>. + */ + public static final String JMX_SERVER_CONNECTOR_BEAN_NAME = "sensor.jmxServerConnector"; + } Modified: trunk/sensor-support/src/resources/net/sf/sensor/support/spring/sensor-jmx.xml =================================================================== --- trunk/sensor-support/src/resources/net/sf/sensor/support/spring/sensor-jmx.xml 2006-03-25 21:31:23 UTC (rev 98) +++ trunk/sensor-support/src/resources/net/sf/sensor/support/spring/sensor-jmx.xml 2006-03-28 20:36:22 UTC (rev 99) @@ -2,29 +2,47 @@ <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <!-- - - - - --> + + + +--> <beans> - - <!-- JMX MBeans for the Sensor Runtimes --> - -<!-- <bean id="sensor.mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"> - <property name="locateExistingServerIfPossible" value="true"/> - </bean> - - <bean id="sensor.jmxExporter" class="org.springframework.jmx.export.MBeanExporter"> - <property name="beans"> - <map> - <entry key="sensor:name=TimerRuntime" value-ref="sensor.TimerRuntime"/> - <entry key="sensor:name=MeterRuntime" value-ref="sensor.MeterRuntime"/> - <entry key="sensor:name=CounterRuntime" value-ref="sensor.CounterRuntime"/> - <entry key="sensor:name=GaugeRuntime" value-ref="sensor.GaugeRuntime"/> - </map> - </property> - <property name="server" ref="sensor.mbeanServer"/> - </bean>--> - + + <!-- JMX MBeans for the Sensor Runtimes --> + + <bean id="sensor.mbeanServer" + class="org.springframework.jmx.support.MBeanServerFactoryBean"> + <property name="locateExistingServerIfPossible" value="true" /> + </bean> + + <bean id="sensor.jmxExporter" + class="org.springframework.jmx.export.MBeanExporter"> + <property name="beans"> + <map> + <entry key="sensor:name=TimerRuntime" + value-ref="sensor.timerRuntime" /> + <entry key="sensor:name=MeterRuntime" + value-ref="sensor.meterRuntime" /> + <entry key="sensor:name=CounterRuntime" + value-ref="sensor.counterRuntime" /> + <entry key="sensor:name=GaugeRuntime" + value-ref="sensor.gaugeRuntime" /> + </map> + </property> + <property name="server" ref="sensor.mbeanServer" /> + </bean> + + <bean id="sensor.rmiRegistry" + class="org.springframework.remoting.rmi.RmiRegistryFactoryBean"> + <property name="port" value="1099" /> + </bean> + + <bean id="sensor.jmxServerConnector" + class="org.springframework.jmx.support.ConnectorServerFactoryBean"> + <property name="objectName" value="connector:sensor=rmi" /> + <property name="serviceUrl" + value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/myconnector" /> + </bean> + </beans> \ No newline at end of file Added: trunk/sensor-support/test/java/net/sf/sensor/support/spring/SensorJMXTest.java =================================================================== --- trunk/sensor-support/test/java/net/sf/sensor/support/spring/SensorJMXTest.java (rev 0) +++ trunk/sensor-support/test/java/net/sf/sensor/support/spring/SensorJMXTest.java 2006-03-28 20:36:22 UTC (rev 99) @@ -0,0 +1,123 @@ +/* + * Copyright 2005 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sf.sensor.support.spring; + +import java.util.List; + +import junit.framework.TestCase; + +import net.sf.sensor.timer.DefaultTimerRuntime; +import net.sf.sensor.timer.Timer; +import net.sf.sensor.timer.TimerRuntime; +import net.sf.sensor.timer.TimerStatistics; +import net.sf.sensor.timer.TimerStatisticsFilter; +import net.sf.sensor.util.conditions.Conditions; + +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + + +/** + * @author Richard Swart + * + */ +public class SensorJMXTest extends TestCase { + + private static ApplicationContext applicationContext; + + private static boolean setUpDone = false; + + protected void setUp() throws Exception { + + if (!setUpDone) { + + applicationContext = new ClassPathXmlApplicationContext(new String[] {"/net/sf/sensor/support/spring/sensor.xml", + "/net/sf/sensor/support/spring/sensor-jmx.xml", "/net/sf/sensor/support/spring/sensor-jmx-test.xml"}); + + TimerRuntime runtime = (TimerRuntime) applicationContext.getBean(SpringBeanNameConstants.TIMER_RUNTIME_BEAN_NAME); + Timer timerA = runtime.getTimer("A", "label"); + Timer timerB = runtime.getTimer("B", "label"); + + timerA.start(); + long minimumTimeTaken = 25L; + Thread.sleep(minimumTimeTaken); + timerB.start(); + Thread.sleep(minimumTimeTaken); + timerB.stop(); + timerA.stop(); + List timerStatistics = runtime.getTimerStatistics(); + + assertNotNull(timerStatistics); + assertEquals(1, timerStatistics.size()); + + setUpDone = true; + } + } + + public void testLocalMbeanTimerRuntimeInvocation() { + + String[] myArr = applicationContext.getBeanDefinitionNames(); + for (int i = 0; i < myArr.length; i++) { + System.out.println(myArr[i]); + } + + TimerRuntime mbeanTimerRuntime = (TimerRuntime) applicationContext.getBean("sensor.timerRuntime.mbeanProxy"); + + assertNotNull(mbeanTimerRuntime); + + List timerStatistics = mbeanTimerRuntime.getTimerStatistics(); + + assertNotNull(timerStatistics); + assertEquals(1, timerStatistics.size()); + + TimerStatistics statisticsA = (TimerStatistics) timerStatistics.get(0); + System.out.println(statisticsA.getAverageTime()); + System.out.println(statisticsA.getMaximumTime()); + assertEquals(1, statisticsA.getNumberOfHits()); + + TimerStatistics statisticsB = (TimerStatistics) statisticsA.getChildren().get(0); + System.out.println(statisticsB.getId()); + assertEquals("B",statisticsB.getId()); + } + + public void testRemoteMbeanTimerRuntimeInvocation() { + TimerRuntime mbeanTimerRuntime = (TimerRuntime) applicationContext.getBean("sensor.timerRuntime.remoteMbeanProxy"); + + assertNotNull(mbeanTimerRuntime); + + List timerStatistics = mbeanTimerRuntime.getTimerStatistics(); + + assertNotNull(timerStatistics); + assertEquals(1, timerStatistics.size()); + + TimerStatistics statisticsA = (TimerStatistics) timerStatistics.get(0); + System.out.println(statisticsA.getAverageTime()); + System.out.println(statisticsA.getMaximumTime()); + assertEquals(1, statisticsA.getNumberOfHits()); + + TimerStatistics statisticsB = (TimerStatistics) statisticsA.getChildren().get(0); + System.out.println(statisticsB.getId()); + assertEquals("B",statisticsB.getId()); + try { + // uncomment to pause the test and connect to the mbean server using MC4J + //System.in.read(); + } + catch (Exception e) {}; + + } + +} Modified: trunk/sensor-support/test/java/net/sf/sensor/support/spring/SensorSpringConfigurationsTest.java =================================================================== --- trunk/sensor-support/test/java/net/sf/sensor/support/spring/SensorSpringConfigurationsTest.java 2006-03-25 21:31:23 UTC (rev 98) +++ trunk/sensor-support/test/java/net/sf/sensor/support/spring/SensorSpringConfigurationsTest.java 2006-03-28 20:36:22 UTC (rev 99) @@ -53,5 +53,21 @@ assertTrue(applicationContext.containsBean(SpringBeanNameConstants.XFIRE_TIMER_RUNTIME_BEAN_NAME)); } - + + /** + * Test method for the JMX sensor configuration + */ + public void testJMXConfiguration() { + // if the default spring config loads without throwing exceptions, we are already almost there... + ApplicationContext applicationContext = new ClassPathXmlApplicationContext( + new String[] {"/net/sf/sensor/support/spring/sensor.xml", + "/net/sf/sensor/support/spring/sensor-jmx.xml"}); + + assertTrue(applicationContext.containsBean(SpringBeanNameConstants.JMX_EXPORTER_BEAN_NAME)); + assertTrue(applicationContext.containsBean(SpringBeanNameConstants.MBEAN_SERVER_BEAN_NAME)); + assertTrue(applicationContext.containsBean(SpringBeanNameConstants.JMX_RMI_REGISTRY_BEAN_NAME)); + assertTrue(applicationContext.containsBean(SpringBeanNameConstants.JMX_SERVER_CONNECTOR_BEAN_NAME)); + + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-25 21:31:50
|
Revision: 98 Author: jurjanw Date: 2006-03-25 13:31:23 -0800 (Sat, 25 Mar 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=98&view=rev Log Message: ----------- Added Wrapper class for rendering a lsitg which Velocity can process. Modified Paths: -------------- trunk/sensor-console/src/java/net/sf/sensor/console/views/TimerStatistics.vm trunk/sensor-console/src/web/WEB-INF/sensor-servlet.xml Added Paths: ----------- trunk/sensor-console/src/java/net/sf/sensor/console/support/TimerStatisticsVelocitySupport.java trunk/sensor-console/test/java/net/sf/sensor/console/support/TimerStatisticsVelocitySupportTest.java Added: trunk/sensor-console/src/java/net/sf/sensor/console/support/TimerStatisticsVelocitySupport.java =================================================================== --- trunk/sensor-console/src/java/net/sf/sensor/console/support/TimerStatisticsVelocitySupport.java (rev 0) +++ trunk/sensor-console/src/java/net/sf/sensor/console/support/TimerStatisticsVelocitySupport.java 2006-03-25 21:31:23 UTC (rev 98) @@ -0,0 +1,130 @@ +/* + * Copyright 2005 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sf.sensor.console.support; + +import java.util.ArrayList; +import java.util.List; + +import net.sf.sensor.timer.TimerStatistics; + +/** + * Support class to convert a nested statistics object to easy viewable list. + * + * @author Jurjan Woltman + */ +public class TimerStatisticsVelocitySupport { + + /** + * Recursive method to build a tree, which can be easily displayed. + * @param timerStatisticsList the list of statistics to build a tree of. + * @return a list of a tree which can be easily displayed. + */ + public List getTimerStatisticsDiplayTree(List timerStatisticsList) { + return buildTimerStatisticsDiplayTree(timerStatisticsList, null, 0); + } + + /** + * Recursive convenience method to build a tree, which can be easily displayed. + * @param timerStatisticsList the list of statistics to build a tree of. + * @param rootId the id of the parent node, where this tree belongs to. + * @param depth of the start of this tree. + * @return a tree with statistics. + */ + protected List buildTimerStatisticsDiplayTree(List timerStatisticsList, String rootId, int depth) { + List statisticsDisplayList = new ArrayList(); + + for (int i = 0; i < timerStatisticsList.size(); i++) { + TimerStatistics statistics = (TimerStatistics) timerStatisticsList.get(i); + + String nodeId = rootId; + + if (nodeId != null && nodeId.length() > 0) { + nodeId = nodeId + "-"; + } else { + nodeId = ""; + } + + nodeId = nodeId + i; + + statisticsDisplayList.add(new StatisticsTreeNode(nodeId, depth, statistics)); + + depth++; + statisticsDisplayList.addAll(buildTimerStatisticsDiplayTree(statistics.getChildren(), nodeId, depth)); + depth--; + } + + return statisticsDisplayList; + } + + /** + * Node in the displayTree, wrapper class to of the statistics. + * Besides the statistics it holds an unique id of the node in the tree + * and the node it's depth. + * + * @author Jurjan Woltman + */ + public class StatisticsTreeNode { + private String id; + private int depth; + private TimerStatistics statistics; + + /** + * Create a new node. + * + * @param id unique id of the node + * @param depth the depth of the node in the tree. + * @param statistics the statistics. + */ + public StatisticsTreeNode(String id, int depth, TimerStatistics statistics) { + this.id = id; + this.depth = depth; + this.statistics = statistics; + } + + /** + * Returns the depth. + * @return Returns the depth. + */ + public int getDepth() { + return depth; + } + + /** + * Returns the id. + * @return Returns the id. + */ + public String getId() { + return id; + } + + /** + * Returns the statistics. + * @return Returns the statistics. + */ + public TimerStatistics getStatistics() { + return statistics; + } + + /** + * @see java.lang.Object#toString() + */ + public String toString() { + return "StatisticsNode [id = '"+getId()+"' , depth = '"+getDepth()+"']"; + } + } + +} Modified: trunk/sensor-console/src/java/net/sf/sensor/console/views/TimerStatistics.vm =================================================================== --- trunk/sensor-console/src/java/net/sf/sensor/console/views/TimerStatistics.vm 2006-03-25 21:31:07 UTC (rev 97) +++ trunk/sensor-console/src/java/net/sf/sensor/console/views/TimerStatistics.vm 2006-03-25 21:31:23 UTC (rev 98) @@ -26,36 +26,50 @@ <script language="javascript"> - function toggleShowChildren(rowid) { + function showChildren(id) { trs = document.getElementsByTagName('tr'); + + for (i = 0; i < trs.length; i++) { + if(trs[i].id.indexOf('row-' + id + '-') >= 0 ) { + trs[i].style.display = ''; + } + } + //change event handler + document.getElementById('trigger-' + id).onclick = function() { + hideChildren(id); + }; + } + + function hideChildren(id) { + trs = document.getElementsByTagName('tr'); + for (i = 0; i < trs.length; i++) { - if (trs[i].id.indexOf(rowid + '-') >= 0) { - if (trs[i].style.display == 'none') { - trs[i].style.display = ''; - } else { + if(trs[i].id.indexOf('row-' + id + '-') >= 0 ) { trs[i].style.display = 'none'; - } } } + + //change event handler + document.getElementById('trigger-' + id).onclick = function() { + showChildren(id) + }; } - - - </script> </head> <body> - #macro ( displayTimerStatistics $parentStatistics $margin $rowid) - #set($storedRowId = $rowid) - #foreach($statistics in $parentStatistics) - #set($rowid = "${rowid}-${velocityCount}") - <tr id="${rowid}"> + #macro (displayTimerStatistics $timerStatistics) + #foreach($timerStatisticsNode in $statisticsVelocitySupport.getTimerStatisticsDiplayTree($timerStatistics)) + #set($margin = ($timerStatisticsNode.depth * 20)) + #set($statistics = $timerStatisticsNode.statistics) + + <tr id="row-${timerStatisticsNode.id}"> <td class="#if( $statistics.hasChildren()) sensor-node #else sensor-leaf #end" nowrap> <span style="margin:${margin}px;"> - <a href="#" onClick="toggleShowChildren('$rowid');">${statistics.id}</a> + <a href="#" onClick="hideChildren('${timerStatisticsNode.id}');" id="trigger-${timerStatisticsNode.id}">${statistics.id}</a> </span> </td> <td nowrap>${statistics.numberOfHits}</td> @@ -67,16 +81,12 @@ <td nowrap>$date.format('yyyy-MM-dd HH:mm:ss:S', $statistics.timeOfFirstUpdate)</td> <td nowrap>$date.format('yyyy-MM-dd HH:mm:ss:S', $statistics.timeOfLastUpdate)</td> </tr> - #set($margin = $margin + 20) - #displayTimerStatistics($statistics.children $margin $rowid) - #set($rowid = $storedRowId) - #set($margin = $margin - 20) #end #end <form action="statistics.htm" method="post"> <div id="sensor-container"> - <table cellspacing="0" cellpadding="0"> + <table id="statisticsData" cellspacing="0" cellpadding="0"> <thead> <th>Id</th> <th>Hits</th> @@ -89,9 +99,7 @@ <th>Last Access</th> </thead> <tbody id="statisticsTable"> - #set($margin = 0) - #set($rowid = "row") - #displayTimerStatistics($timerStatistics $margin $rowid) + #displayTimerStatistics($timerStatistics) </tbody> </table> </div> Modified: trunk/sensor-console/src/web/WEB-INF/sensor-servlet.xml =================================================================== --- trunk/sensor-console/src/web/WEB-INF/sensor-servlet.xml 2006-03-25 21:31:07 UTC (rev 97) +++ trunk/sensor-console/src/web/WEB-INF/sensor-servlet.xml 2006-03-25 21:31:23 UTC (rev 98) @@ -40,6 +40,13 @@ <property name="viewClass" value="org.springframework.web.servlet.view.velocity.VelocityView"/> <property name="exposeSpringMacroHelpers" value="true"/> <property name="dateToolAttribute" value="date"/> + <property name="attributesMap"> + <map> + <entry key="statisticsVelocitySupport"> + <bean class="net.sf.sensor.console.support.TimerStatisticsVelocitySupport"/> + </entry> + </map> + </property> <property name="cache" value="true"/> <property name="prefix" value=""/> <property name="suffix" value=".vm"/> Added: trunk/sensor-console/test/java/net/sf/sensor/console/support/TimerStatisticsVelocitySupportTest.java =================================================================== --- trunk/sensor-console/test/java/net/sf/sensor/console/support/TimerStatisticsVelocitySupportTest.java (rev 0) +++ trunk/sensor-console/test/java/net/sf/sensor/console/support/TimerStatisticsVelocitySupportTest.java 2006-03-25 21:31:23 UTC (rev 98) @@ -0,0 +1,73 @@ +/* + * Copyright 2005 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sf.sensor.console.support; + +import java.util.List; + +import junit.framework.TestCase; + +import net.sf.sensor.timer.DefaultTimerRuntime; +import net.sf.sensor.timer.Timer; +import net.sf.sensor.timer.TimerRuntime; + +/** + * @author Jurjan Woltman + * + */ +public class TimerStatisticsVelocitySupportTest extends TestCase { + + /* + * Test method for 'net.sf.sensor.console.support.TimerStatisticsVelocitySupport.buildTimerStatisticsDiplayList(List, String, int)' + */ + public void testBuildTimerStatisticsDiplayList() { + + TimerRuntime timerRuntime = new DefaultTimerRuntime(); + + // timers purely for testing the display of nested timers + Timer timer1 = timerRuntime.getTimer("test timer 1"); + Timer timer2 = timerRuntime.getTimer("test timer 2"); + Timer timer3 = timerRuntime.getTimer("test timer 3"); + Timer timer4 = timerRuntime.getTimer("test timer 4"); + Timer timer5 = timerRuntime.getTimer("test timer 5"); + Timer timer6 = timerRuntime.getTimer("test timer 6"); + + timer1.start(); + timer2.start(); + timer3.start(); + timer3.stop(); + timer2.stop(); + timer4.start(); + timer5.start(); + timer6.start(); + timer6.stop(); + timer5.stop(); + timer4.stop(); + timer1.stop(); + timer2.start(); + timer2.stop(); + + TimerStatisticsVelocitySupport statisticsViewSupport = new TimerStatisticsVelocitySupport(); + List displayList = statisticsViewSupport.buildTimerStatisticsDiplayTree(timerRuntime.getTimerStatistics(), null, 0); + + assertNotNull(displayList); + assertEquals(7, displayList.size()); + TimerStatisticsVelocitySupport.StatisticsTreeNode node = (TimerStatisticsVelocitySupport.StatisticsTreeNode)displayList.get(6); + + assertEquals(0, node.getDepth()); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-25 21:31:22
|
Revision: 97 Author: jurjanw Date: 2006-03-25 13:31:07 -0800 (Sat, 25 Mar 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=97&view=rev Log Message: ----------- Added Wrapper class for rendering a lsitg which Velocity can process. Added Paths: ----------- trunk/sensor-console/src/java/net/sf/sensor/console/support/ trunk/sensor-console/test/java/net/ trunk/sensor-console/test/java/net/sf/ trunk/sensor-console/test/java/net/sf/sensor/ trunk/sensor-console/test/java/net/sf/sensor/console/ trunk/sensor-console/test/java/net/sf/sensor/console/support/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <am...@us...> - 2006-03-19 23:14:12
|
Revision: 96 Author: amooy Date: 2006-03-19 15:14:00 -0800 (Sun, 19 Mar 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=96&view=rev Log Message: ----------- Reimplemented the reset() functionality. The runtime now has a reset() method and statistics do not. Resetting a TimerData now gets rid of all child instances. Performance improvements to TimerData implementation by moving calculation of standard deviation and average to the refreshStatistics method. Renamed test classes to be consistent with the classes they test Misc cleanups Added Paths: ----------- trunk/sensor-core/test/java/net/sf/sensor/timer/DefaultTimerStatisticsTest.java Removed Paths: ------------- trunk/sensor-core/test/java/net/sf/sensor/timer/TimerStatisticsTest.java Added: trunk/sensor-core/test/java/net/sf/sensor/timer/DefaultTimerStatisticsTest.java =================================================================== --- trunk/sensor-core/test/java/net/sf/sensor/timer/DefaultTimerStatisticsTest.java (rev 0) +++ trunk/sensor-core/test/java/net/sf/sensor/timer/DefaultTimerStatisticsTest.java 2006-03-19 23:14:00 UTC (rev 96) @@ -0,0 +1,203 @@ +/* + * Copyright 2005 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sf.sensor.timer; + +import java.util.Collections; + +import junit.framework.TestCase; + +/** + * + * + * @author Age Mooy + */ +public class DefaultTimerStatisticsTest extends TestCase { + + /** + * Test method for 'net.sf.sensor.TimerStatistics.BasicTimerStatistics(TimerData)' + */ + public void testConstructionBasicPropertiesAndRefresh() { + TimerData timerData = new TimerData("A"); + TimerStatistics statistics = timerData.getStatistics(); + + assertNotNull(statistics); + assertFalse(statistics.hasChildren()); + assertEquals(0, statistics.getChildren().size()); + assertEquals(timerData.toString(), statistics.toString()); + + assertEquals(0L, statistics.getNumberOfHits()); + assertEquals(0L, statistics.getTotalTime()); + assertEquals(0L, statistics.getAverageTime()); + assertEquals(0L, statistics.getMinimumTime()); + assertEquals(0L, statistics.getMaximumTime()); + assertEquals(0L, statistics.getStandardDeviation()); + assertEquals(0L, statistics.getSumOfSquaresOfTimes()); + assertEquals(0L, statistics.getTimeOfFirstUpdate().getTime()); + assertEquals(0L, statistics.getTimeOfLastUpdate().getTime()); + + long timestampBeforeUpdate = System.currentTimeMillis(); + + timerData.updateFromTimer(10L); + + long timestampAfterUpdate = System.currentTimeMillis(); + + assertEquals(0L, statistics.getNumberOfHits()); + assertEquals(0L, statistics.getTotalTime()); + assertEquals(0L, statistics.getAverageTime()); + assertEquals(0L, statistics.getMinimumTime()); + assertEquals(0L, statistics.getMaximumTime()); + assertEquals(0L, statistics.getStandardDeviation()); + assertEquals(0L, statistics.getSumOfSquaresOfTimes()); + assertEquals(0L, statistics.getTimeOfFirstUpdate().getTime()); + assertEquals(0L, statistics.getTimeOfLastUpdate().getTime()); + + statistics.refresh(); + + assertEquals(1L, statistics.getNumberOfHits()); + assertEquals(10L, statistics.getTotalTime()); + assertEquals(10L, statistics.getAverageTime()); + assertEquals(10L, statistics.getMinimumTime()); + assertEquals(10L, statistics.getMaximumTime()); + assertEquals(0L, statistics.getStandardDeviation()); + assertEquals(100L, statistics.getSumOfSquaresOfTimes()); + + assertEquals(statistics.getTimeOfFirstUpdate(), statistics.getTimeOfLastUpdate()); + assertTrue(statistics.getTimeOfFirstUpdate().getTime() >= timestampBeforeUpdate); + assertTrue(statistics.getTimeOfFirstUpdate().getTime() <= timestampAfterUpdate); + +// statistics.reset(); +// +// assertEquals(0L, statistics.getNumberOfHits()); +// assertEquals(0L, statistics.getTotalTime()); +// assertEquals(0L, statistics.getAverageTime()); +// assertEquals(0L, statistics.getMinimumTime()); +// assertEquals(0L, statistics.getMaximumTime()); +// assertEquals(0L, statistics.getStandardDeviation()); +// assertEquals(0L, statistics.getSumOfSquaresOfTimes()); +// assertEquals(0L, statistics.getTimeOfFirstUpdate().getTime()); +// assertEquals(0L, statistics.getTimeOfLastUpdate().getTime()); + } + + /** + * Test method for 'net.sf.sensor.TimerStatistics.BasicTimerStatistics(TimerData)' + */ + public void testBasicHierarchy() { + TimerData timerDataA = new TimerData("A"); + TimerData timerDataB = timerDataA.getOrCreateChild("B"); + TimerData timerDataC = timerDataB.getOrCreateChild("C"); + TimerData timerDataD = timerDataB.getOrCreateChild("D"); + + DefaultTimerStatistics statisticsA = (DefaultTimerStatistics) timerDataA.getStatistics(); + + assertTrue(statisticsA.hasChildren()); + assertNotNull(statisticsA.getChildren()); + assertEquals(1, statisticsA.getChildren().size()); + + TimerStatistics statisticsB = (TimerStatistics) statisticsA.getChildren().get(0); + + assertSame(timerDataB.getStatistics(), statisticsB); + assertEquals("B", statisticsB.getId()); + + assertTrue(statisticsB.hasChildren()); + assertNotNull(statisticsB.getChildren()); + assertEquals(2, statisticsB.getChildren().size()); + + TimerStatistics statisticsC = (TimerStatistics) statisticsB.getChildren().get(0); + TimerStatistics statisticsD = (TimerStatistics) statisticsB.getChildren().get(1); + + assertFalse(statisticsC.hasChildren()); + assertFalse(statisticsD.hasChildren()); + + statisticsA.refreshFromData(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, null); + + assertNotNull(statisticsA); + assertFalse(statisticsA.hasChildren()); + assertEquals(0, statisticsA.getChildren().size()); + assertEquals(Collections.EMPTY_LIST, statisticsA.getChildren()); + } + + /** + * + */ + public void testHierarchicalRefresh() { + TimerData timerDataA = new TimerData("A"); + TimerData timerDataB = timerDataA.getOrCreateChild("B"); + + TimerStatistics statisticsA = timerDataA.getStatistics(); + TimerStatistics statisticsB = timerDataB.getStatistics(); + + timerDataA.updateFromTimer(1000L); + timerDataB.updateFromTimer(1000L); + + assertEquals(0L, statisticsA.getNumberOfHits()); + assertEquals(0L, statisticsA.getTotalTime()); + assertEquals(0L, statisticsA.getAverageTime()); + assertEquals(0L, statisticsA.getMinimumTime()); + assertEquals(0L, statisticsA.getMaximumTime()); + + assertEquals(0L, statisticsB.getNumberOfHits()); + assertEquals(0L, statisticsB.getTotalTime()); + assertEquals(0L, statisticsB.getAverageTime()); + assertEquals(0L, statisticsB.getMinimumTime()); + assertEquals(0L, statisticsB.getMaximumTime()); + + statisticsA.refresh(); + + assertEquals(1L, statisticsA.getNumberOfHits()); + assertEquals(1000L, statisticsA.getTotalTime()); + assertEquals(1000L, statisticsA.getAverageTime()); + assertEquals(1000L, statisticsA.getMinimumTime()); + assertEquals(1000L, statisticsA.getMaximumTime()); + + assertEquals(1L, statisticsB.getNumberOfHits()); + assertEquals(1000L, statisticsB.getTotalTime()); + assertEquals(1000L, statisticsB.getAverageTime()); + assertEquals(1000L, statisticsB.getMinimumTime()); + assertEquals(1000L, statisticsB.getMaximumTime()); + +// statisticsA.reset(); +// +// assertEquals(0L, statisticsA.getNumberOfHits()); +// assertEquals(0L, statisticsA.getTotalTime()); +// assertEquals(0L, statisticsA.getAverageTime()); +// assertEquals(0L, statisticsA.getMinimumTime()); +// assertEquals(0L, statisticsA.getMaximumTime()); +// +// assertEquals(0L, statisticsB.getNumberOfHits()); +// assertEquals(0L, statisticsB.getTotalTime()); +// assertEquals(0L, statisticsB.getAverageTime()); +// assertEquals(0L, statisticsB.getMinimumTime()); +// assertEquals(0L, statisticsB.getMaximumTime()); + } + + /** + * Test method for {@link TimerData#getTreePath()} + */ + public final void testGetTreePath() { + TimerData a = new TimerData("A"); + TimerData b = a.getOrCreateChild("B"); + TimerData c = b.getOrCreateChild("C"); + + DefaultTimerStatistics statisticsA = (DefaultTimerStatistics) a.getStatistics(); + DefaultTimerStatistics statisticsB = (DefaultTimerStatistics) b.getStatistics(); + DefaultTimerStatistics statisticsC = (DefaultTimerStatistics) c.getStatistics(); + + assertEquals("/A", statisticsA.getTreePath()); + assertEquals("/A/B", statisticsB.getTreePath()); + assertEquals("/A/B/C", statisticsC.getTreePath()); + } +} Deleted: trunk/sensor-core/test/java/net/sf/sensor/timer/TimerStatisticsTest.java =================================================================== --- trunk/sensor-core/test/java/net/sf/sensor/timer/TimerStatisticsTest.java 2006-03-19 23:08:44 UTC (rev 95) +++ trunk/sensor-core/test/java/net/sf/sensor/timer/TimerStatisticsTest.java 2006-03-19 23:14:00 UTC (rev 96) @@ -1,203 +0,0 @@ -/* - * Copyright 2005 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.sensor.timer; - -import java.util.Collections; - -import junit.framework.TestCase; - -/** - * - * - * @author Age Mooy - */ -public class TimerStatisticsTest extends TestCase { - - /** - * Test method for 'net.sf.sensor.TimerStatistics.BasicTimerStatistics(TimerData)' - */ - public void testConstructionBasicPropertiesAndRefresh() { - TimerData timerData = new TimerData("A"); - TimerStatistics statistics = timerData.getStatistics(); - - assertNotNull(statistics); - assertFalse(statistics.hasChildren()); - assertEquals(0, statistics.getChildren().size()); - assertEquals(timerData.toString(), statistics.toString()); - - assertEquals(0L, statistics.getNumberOfHits()); - assertEquals(0L, statistics.getTotalTime()); - assertEquals(0L, statistics.getAverageTime()); - assertEquals(0L, statistics.getMinimumTime()); - assertEquals(0L, statistics.getMaximumTime()); - assertEquals(0L, statistics.getStandardDeviation()); - assertEquals(0L, statistics.getSumOfSquaresOfTimes()); - assertEquals(0L, statistics.getTimeOfFirstUpdate().getTime()); - assertEquals(0L, statistics.getTimeOfLastUpdate().getTime()); - - long timestampBeforeUpdate = System.currentTimeMillis(); - - timerData.updateFromTimer(10L); - - long timestampAfterUpdate = System.currentTimeMillis(); - - assertEquals(0L, statistics.getNumberOfHits()); - assertEquals(0L, statistics.getTotalTime()); - assertEquals(0L, statistics.getAverageTime()); - assertEquals(0L, statistics.getMinimumTime()); - assertEquals(0L, statistics.getMaximumTime()); - assertEquals(0L, statistics.getStandardDeviation()); - assertEquals(0L, statistics.getSumOfSquaresOfTimes()); - assertEquals(0L, statistics.getTimeOfFirstUpdate().getTime()); - assertEquals(0L, statistics.getTimeOfLastUpdate().getTime()); - - statistics.refresh(); - - assertEquals(1L, statistics.getNumberOfHits()); - assertEquals(10L, statistics.getTotalTime()); - assertEquals(10L, statistics.getAverageTime()); - assertEquals(10L, statistics.getMinimumTime()); - assertEquals(10L, statistics.getMaximumTime()); - assertEquals(0L, statistics.getStandardDeviation()); - assertEquals(100L, statistics.getSumOfSquaresOfTimes()); - - assertEquals(statistics.getTimeOfFirstUpdate(), statistics.getTimeOfLastUpdate()); - assertTrue(statistics.getTimeOfFirstUpdate().getTime() >= timestampBeforeUpdate); - assertTrue(statistics.getTimeOfFirstUpdate().getTime() <= timestampAfterUpdate); - - statistics.reset(); - - assertEquals(0L, statistics.getNumberOfHits()); - assertEquals(0L, statistics.getTotalTime()); - assertEquals(0L, statistics.getAverageTime()); - assertEquals(0L, statistics.getMinimumTime()); - assertEquals(0L, statistics.getMaximumTime()); - assertEquals(0L, statistics.getStandardDeviation()); - assertEquals(0L, statistics.getSumOfSquaresOfTimes()); - assertEquals(0L, statistics.getTimeOfFirstUpdate().getTime()); - assertEquals(0L, statistics.getTimeOfLastUpdate().getTime()); - } - - /** - * Test method for 'net.sf.sensor.TimerStatistics.BasicTimerStatistics(TimerData)' - */ - public void testBasicHierarchy() { - TimerData timerDataA = new TimerData("A"); - TimerData timerDataB = timerDataA.getOrCreateChild("B"); - TimerData timerDataC = timerDataB.getOrCreateChild("C"); - TimerData timerDataD = timerDataB.getOrCreateChild("D"); - - DefaultTimerStatistics statisticsA = (DefaultTimerStatistics) timerDataA.getStatistics(); - - assertTrue(statisticsA.hasChildren()); - assertNotNull(statisticsA.getChildren()); - assertEquals(1, statisticsA.getChildren().size()); - - TimerStatistics statisticsB = (TimerStatistics) statisticsA.getChildren().get(0); - - assertSame(timerDataB.getStatistics(), statisticsB); - assertEquals("B", statisticsB.getId()); - - assertTrue(statisticsB.hasChildren()); - assertNotNull(statisticsB.getChildren()); - assertEquals(2, statisticsB.getChildren().size()); - - TimerStatistics statisticsC = (TimerStatistics) statisticsB.getChildren().get(0); - TimerStatistics statisticsD = (TimerStatistics) statisticsB.getChildren().get(1); - - assertFalse(statisticsC.hasChildren()); - assertFalse(statisticsD.hasChildren()); - - statisticsA.refreshFromData(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, null); - - assertNotNull(statisticsA); - assertFalse(statisticsA.hasChildren()); - assertEquals(0, statisticsA.getChildren().size()); - assertEquals(Collections.EMPTY_LIST, statisticsA.getChildren()); - } - - /** - * - */ - public void testHierarchicalRefresh() { - TimerData timerDataA = new TimerData("A"); - TimerData timerDataB = timerDataA.getOrCreateChild("B"); - - TimerStatistics statisticsA = timerDataA.getStatistics(); - TimerStatistics statisticsB = timerDataB.getStatistics(); - - timerDataA.updateFromTimer(1000L); - timerDataB.updateFromTimer(1000L); - - assertEquals(0L, statisticsA.getNumberOfHits()); - assertEquals(0L, statisticsA.getTotalTime()); - assertEquals(0L, statisticsA.getAverageTime()); - assertEquals(0L, statisticsA.getMinimumTime()); - assertEquals(0L, statisticsA.getMaximumTime()); - - assertEquals(0L, statisticsB.getNumberOfHits()); - assertEquals(0L, statisticsB.getTotalTime()); - assertEquals(0L, statisticsB.getAverageTime()); - assertEquals(0L, statisticsB.getMinimumTime()); - assertEquals(0L, statisticsB.getMaximumTime()); - - statisticsA.refresh(); - - assertEquals(1L, statisticsA.getNumberOfHits()); - assertEquals(1000L, statisticsA.getTotalTime()); - assertEquals(1000L, statisticsA.getAverageTime()); - assertEquals(1000L, statisticsA.getMinimumTime()); - assertEquals(1000L, statisticsA.getMaximumTime()); - - assertEquals(1L, statisticsB.getNumberOfHits()); - assertEquals(1000L, statisticsB.getTotalTime()); - assertEquals(1000L, statisticsB.getAverageTime()); - assertEquals(1000L, statisticsB.getMinimumTime()); - assertEquals(1000L, statisticsB.getMaximumTime()); - - statisticsA.reset(); - - assertEquals(0L, statisticsA.getNumberOfHits()); - assertEquals(0L, statisticsA.getTotalTime()); - assertEquals(0L, statisticsA.getAverageTime()); - assertEquals(0L, statisticsA.getMinimumTime()); - assertEquals(0L, statisticsA.getMaximumTime()); - - assertEquals(0L, statisticsB.getNumberOfHits()); - assertEquals(0L, statisticsB.getTotalTime()); - assertEquals(0L, statisticsB.getAverageTime()); - assertEquals(0L, statisticsB.getMinimumTime()); - assertEquals(0L, statisticsB.getMaximumTime()); - } - - /** - * Test method for {@link TimerData#getTreePath()} - */ - public final void testGetTreePath() { - TimerData a = new TimerData("A"); - TimerData b = a.getOrCreateChild("B"); - TimerData c = b.getOrCreateChild("C"); - - DefaultTimerStatistics statisticsA = (DefaultTimerStatistics) a.getStatistics(); - DefaultTimerStatistics statisticsB = (DefaultTimerStatistics) b.getStatistics(); - DefaultTimerStatistics statisticsC = (DefaultTimerStatistics) c.getStatistics(); - - assertEquals("/A", statisticsA.getTreePath()); - assertEquals("/A/B", statisticsB.getTreePath()); - assertEquals("/A/B/C", statisticsC.getTreePath()); - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <am...@us...> - 2006-03-19 23:09:03
|
Revision: 95 Author: amooy Date: 2006-03-19 15:08:44 -0800 (Sun, 19 Mar 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=95&view=rev Log Message: ----------- Reimplemented the reset() functionality. The runtime now has a reset() method and statistics do not. Resetting a TimerData now gets rid of all child instances. Performance improvements to TimerData implementation by moving calculation of standard deviation and average to the refreshStatistics method. Renamed test classes to be consistent with the classes they test Misc cleanups Modified Paths: -------------- trunk/sensor-core/src/java/net/sf/sensor/SensorStatistics.java trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerRuntime.java trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerStatistics.java trunk/sensor-core/src/java/net/sf/sensor/timer/FilteredTimerStatistics.java trunk/sensor-core/src/java/net/sf/sensor/timer/TimerData.java trunk/sensor-core/src/java/net/sf/sensor/timer/TimerRuntime.java trunk/sensor-core/src/java/net/sf/sensor/timer/TimerService.java trunk/sensor-core/src/java/net/sf/sensor/timer/TimerStatistics.java trunk/sensor-core/src/java/net/sf/sensor/timer/TimerStatisticsFilter.java trunk/sensor-core/test/java/net/sf/sensor/timer/DefaultTimerRuntimeTest.java trunk/sensor-core/test/java/net/sf/sensor/timer/FilteredTimerStatisticsTest.java trunk/sensor-core/test/java/net/sf/sensor/timer/TimerDataTest.java Added Paths: ----------- trunk/sensor-core/test/java/net/sf/sensor/timer/SimplePerformanceTest.java Modified: trunk/sensor-core/src/java/net/sf/sensor/SensorStatistics.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/SensorStatistics.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/src/java/net/sf/sensor/SensorStatistics.java 2006-03-19 23:08:44 UTC (rev 95) @@ -18,7 +18,10 @@ import java.util.Set; + /** + * SensorStatistics unifies the read-only statistics views for all types of sensors. + * It contains the properties that are shared accross all types of sensors. * * @author Age Mooy */ @@ -41,9 +44,4 @@ */ public void refresh(); - /** - * Resets the statistics to their default values. - */ - public void reset(); - } Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerRuntime.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerRuntime.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerRuntime.java 2006-03-19 23:08:44 UTC (rev 95) @@ -63,10 +63,22 @@ rootTimerData = new TimerData(DEFAULT_ROOT_TIMER_LABEL); timerDataCallStack = new TimerDataCallStack(rootTimerData); } + + // ========================================================================== + // TimerService impementation + // ========================================================================== + /** + * @see net.sf.sensor.timer.TimerService#getTimerStatistics() + */ + public List getTimerStatistics() { + return rootTimerData.getStatistics().getChildren(); + } + + // ========================================================================== - // Timer API + // TimerRuntime implementation // ========================================================================== /** @@ -87,16 +99,19 @@ return timer; } - - // ========================================================================== - // TimerStatistics API - // ========================================================================== - /** - * @see net.sf.sensor.timer.TimerRuntime#getTimerStatistics() + * @see net.sf.sensor.timer.TimerRuntime#reset() */ - public List getTimerStatistics() { - return rootTimerData.getStatistics().getChildren(); + public synchronized void reset() { + // remove all children from the root timerdata + // NOTE: this decouples all existing and/or running Timer instances from the runtime... is this what we want ? + rootTimerData.reset(); + + // todo reinitialize the call stack ? + // since the above action decoupled all existing timers from this runtime, there are + // no side effects on the call stack. The running threads will finish their jobs and + // the leftover decoupled TimerDats will get their last updates but noone will see + // the results. New calls to start/stop on existing timer instances will work just fine. } Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerStatistics.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerStatistics.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/DefaultTimerStatistics.java 2006-03-19 23:08:44 UTC (rev 95) @@ -26,6 +26,7 @@ * representing the timing values as they were when the {@link #refresh()} * method was last called. * + * @see TimerStatistics * @author Age Mooy */ public class DefaultTimerStatistics implements TimerStatistics { @@ -118,16 +119,7 @@ timerData.refreshStatistics(); } - /** - * @see net.sf.sensor.timer.TimerStatistics#reset() - */ - public void reset() { - timerData.reset(); - // refresh ourselves - timerData.refreshStatistics(); - } - // ========================================================================== // Refreshing of statistics // ========================================================================== Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/FilteredTimerStatistics.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/FilteredTimerStatistics.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/FilteredTimerStatistics.java 2006-03-19 23:08:44 UTC (rev 95) @@ -66,15 +66,6 @@ filteredChildren = filter.filter(delegate.getChildren()); } - - /** - * @see TimerStatistics#reset() - */ - public void reset() { - delegate.reset(); - - filteredChildren = new ArrayList(); - } /** * @see TimerStatistics#hasChildren() Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/TimerData.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/TimerData.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/TimerData.java 2006-03-19 23:08:44 UTC (rev 95) @@ -58,8 +58,8 @@ /** A Set<String> of labels associated with this instance. */ private Set labels = new LinkedHashSet(); - /** Lazy-initialized read-only view on this instance. */ - private DefaultTimerStatistics timerStatistics; + /** Read-only view on this instance. */ + private DefaultTimerStatistics timerStatistics = new DefaultTimerStatistics(this);; // ========================================================================== @@ -154,8 +154,6 @@ /** * Resets all statistics data and all registered child instances. - * - * @todo should we remove the children or reset thier values ??? */ synchronized void reset() { numberOfHits = 0L; @@ -170,10 +168,19 @@ timeOfFirstUpdate = 0L; timeOfLastUpdate = 0L; - // reset all children + // reset all existing children so that any open direct references to child instances + // get reset before they are cut lose from their parent. for (Iterator i = children.values().iterator(); i.hasNext();) { ((TimerData) i.next()).reset(); } + + // now we get rid of our children and our collected labels. + children = new LinkedHashMap(); + labels = new LinkedHashSet(); + + // last, we make sure our view is updated. This is to make sure + // statelfull clients like a JMX console get notified of changes. + refreshStatistics(); } @@ -244,10 +251,11 @@ * @param timeTaken the time (in milliseconds) it took to execute the code that was being measured. */ synchronized void updateFromTimer(long timeTaken) { + // todo pass the start time from the Timer so we can use it to update the first/last time fields and save a call to System.currenttimemillis + // update the internal statistics numberOfHits++; totalTime = totalTime + timeTaken; - averageTime = totalTime / numberOfHits; sumOfSquaresOfTimes = sumOfSquaresOfTimes + (timeTaken * timeTaken); // the time of the last update is always the last call to this method. @@ -267,11 +275,8 @@ } } - // calculate the standard deviation - long nMinus1 = (numberOfHits <= 1) ? 1 : numberOfHits - 1; // avoid 0 divides - long numerator = sumOfSquaresOfTimes - ((totalTime * totalTime) / numberOfHits); - - standardDeviation = (long) java.lang.Math.sqrt(numerator / nMinus1); + // calculation of standard deviation was moved to the refreshStatistics method + // to optimize the performance of this method. } /** @@ -279,10 +284,6 @@ * @return a hierarchical statistical view of this instance of TimerData. */ TimerStatistics getStatistics() { - if (timerStatistics == null) { - timerStatistics = new DefaultTimerStatistics(this); - } - // refresh the statistics refreshStatistics(); @@ -299,6 +300,18 @@ * could lead to inconsistent data. */ synchronized void refreshStatistics() { + // calculate the standard deviation if necessary + if (numberOfHits > 0) { + // calculate the average time + averageTime = totalTime / numberOfHits; + + // calculate the standard deviation + long nMinus1 = (numberOfHits <= 1) ? 1 : numberOfHits - 1; // avoid 0 divides + long numerator = sumOfSquaresOfTimes - ((totalTime * totalTime) / numberOfHits); + + standardDeviation = (long) java.lang.Math.sqrt(numerator / nMinus1); + } + timerStatistics.refreshFromData( numberOfHits, totalTime, @@ -313,6 +326,14 @@ } /** + * Create a new List filled with the TimerStatistics views of all currently + * registered children. + * + * We can't use a simple List wrapper here because we really do want a snaphot + * (ie a view on the situation as it was when this method was called) as opposed + * to a wrapper list, which would reflect the contents of the list at the moment + * of iteration or item access. + * * @return a new List<TimerStatistics> containing an instance of * TimerStatistics for each currently registered child. */ Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/TimerRuntime.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/TimerRuntime.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/TimerRuntime.java 2006-03-19 23:08:44 UTC (rev 95) @@ -18,12 +18,15 @@ /** - * The entry point for all timer-related functionality. + * Main entry point to the timing runtime system that supports timer creation + * and resetting plus the read-only statistics functionality offered by the + * {@link TimerService super-interface}. + * <p> * An instance of TimerRuntime can produce {@link Timer Timers}, keeps track of * internal timer data and call stacks, and offers views on this data through * instances of {@link TimerStatistics}. * - * @see TimerService + * @see TimerService for read-only acces to the timer runtime system. * * @author Age Mooy */ @@ -47,5 +50,10 @@ * @return the started {@link Timer} instance. */ public Timer getTimer(String id, String label); + + /** + * Resets all timing data gathered by this instance and starts with a clean slate. + */ + public void reset(); } Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/TimerService.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/TimerService.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/TimerService.java 2006-03-19 23:08:44 UTC (rev 95) @@ -21,8 +21,10 @@ /** * This interface is meant to provide the most limited read-only view on the - * timer subsystem. + * timer runtime system by only allowing access to timer statistics. * + * @see TimerRuntime for full access to the timer runtime system. + * * @author Age Mooy */ public interface TimerService { Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/TimerStatistics.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/TimerStatistics.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/TimerStatistics.java 2006-03-19 23:08:44 UTC (rev 95) @@ -24,8 +24,14 @@ /** + * TimerStatistics is the refreshable read-only snapshot view on the TimerData + * internals. It is directly linked one-to-one with its source TimerData (an + * internal class that keeps track of the actual data associated with a Timer) + * and can be refreshed from that source by calling the {@link #refresh()} method. + * TimerStatistics is a hierarchical tree-like data structure that can contain + * child instances which reflect events that were timed within the scope of the + * parent timer. * - * * @author Age Mooy */ public interface TimerStatistics extends SensorStatistics { @@ -41,28 +47,29 @@ public Set getLabels(); /** - * Refreshes this instances and all its children. + * Refreshes this instance and all its children from the associated source TimerData. * * @see net.sf.sensor.SensorStatistics#refresh() */ public void refresh(); /** - * @see net.sf.sensor.SensorStatistics#reset() - */ - public void reset(); - - /** * Returns true if this instance has one or more child instances. * @return true if this instance has one or more child instances. */ public boolean hasChildren(); /** + * Returns a List<TimerStatistics> of all the child instances. * @return a List<TimerStatistics> of all the child instances. */ public List getChildren(); + + // ========================================================================== + // Statistical properties + // ========================================================================== + /** * Returns the number of hits counted until the last call to {@link #refresh()}. * @return the number of hits counted until the last call to {@link #refresh()}. @@ -117,6 +124,11 @@ */ public Date getTimeOfLastUpdate(); + + // ========================================================================== + // Developer-centric util methods + // ========================================================================== + /** * For testing correct tree-structure behaviour. * @return a String representing the tree path from the root node to this node, Modified: trunk/sensor-core/src/java/net/sf/sensor/timer/TimerStatisticsFilter.java =================================================================== --- trunk/sensor-core/src/java/net/sf/sensor/timer/TimerStatisticsFilter.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/src/java/net/sf/sensor/timer/TimerStatisticsFilter.java 2006-03-19 23:08:44 UTC (rev 95) @@ -33,7 +33,7 @@ * list. * <p> * The TimerStatisticsFilter will wrap each TimerStatistics in an instance of - * FilteredTimerStatistics which has a reference to the filter so it can call + * {@link FilteredTimerStatistics} which has a reference to the filter so it can call * the filter on its nested children list to create a filtered list. * * @author Age Mooy Modified: trunk/sensor-core/test/java/net/sf/sensor/timer/DefaultTimerRuntimeTest.java =================================================================== --- trunk/sensor-core/test/java/net/sf/sensor/timer/DefaultTimerRuntimeTest.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/test/java/net/sf/sensor/timer/DefaultTimerRuntimeTest.java 2006-03-19 23:08:44 UTC (rev 95) @@ -123,4 +123,43 @@ assertTrue(statisticsB.getTotalTime() > statisticsC.getTotalTime()); } + /** Tests a call to reset while a timer is still running. */ + public void testResetWithRunningTimer() { + TimerRuntime runtime = new DefaultTimerRuntime(); + Timer timerA = runtime.getTimer("A", "label"); + + // call the timer twice so we have a numberOfHits == 2 + timerA.start(); + timerA.stop(); + timerA.start(); + timerA.stop(); + + List statistics = runtime.getTimerStatistics(); + + assertEquals(1, statistics.size()); + assertEquals(2, ((TimerStatistics) statistics.get(0)).getNumberOfHits()); + + timerA.start(); + + runtime.reset(); + + statistics = runtime.getTimerStatistics(); + + assertEquals(0, statistics.size()); + + timerA.stop(); + + statistics = runtime.getTimerStatistics(); + + assertEquals(0, statistics.size()); + + timerA.start(); + timerA.stop(); + + statistics = runtime.getTimerStatistics(); + + assertEquals(1, statistics.size()); + assertEquals(1, ((TimerStatistics) statistics.get(0)).getNumberOfHits()); + } + } Modified: trunk/sensor-core/test/java/net/sf/sensor/timer/FilteredTimerStatisticsTest.java =================================================================== --- trunk/sensor-core/test/java/net/sf/sensor/timer/FilteredTimerStatisticsTest.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/test/java/net/sf/sensor/timer/FilteredTimerStatisticsTest.java 2006-03-19 23:08:44 UTC (rev 95) @@ -77,9 +77,6 @@ mockDelegate.getTreePath(); mockDelegate.toString(); - // calls made by the reset() method. - mockDelegate.reset(); - // calls made by the refresh method mockDelegate.refresh(); @@ -111,12 +108,6 @@ filtered.getTimeOfLastUpdate(); filtered.getTreePath(); filtered.toString(); - - filtered.reset(); - - assertFalse(filtered.hasChildren()); - assertEquals(0, filtered.getChildren().size()); - filtered.refresh(); } Added: trunk/sensor-core/test/java/net/sf/sensor/timer/SimplePerformanceTest.java =================================================================== --- trunk/sensor-core/test/java/net/sf/sensor/timer/SimplePerformanceTest.java (rev 0) +++ trunk/sensor-core/test/java/net/sf/sensor/timer/SimplePerformanceTest.java 2006-03-19 23:08:44 UTC (rev 95) @@ -0,0 +1,72 @@ +/* + * Copyright 2005 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package net.sf.sensor.timer; + +import java.util.List; + +import junit.framework.TestCase; + +/** + * + * + * @author Age Mooy + */ +public class SimplePerformanceTest extends TestCase { + private TimerRuntime runtime; + private Timer parentTimer; + private Timer timer; + + + /** + * @see junit.framework.TestCase#setUp() + */ + protected void setUp() throws Exception { + runtime = new DefaultTimerRuntime(); + parentTimer = runtime.getTimer("parent timer"); + timer = runtime.getTimer("test timer"); + } + + /** + * + */ + public void testStartStopPerformance() { + parentTimer.start(); + + for (int i = 0; i < 1000000; i++) { + timer.start(); + timer.stop(); + } + + parentTimer.stop(); + + List statistics = runtime.getTimerStatistics(); + + assertNotNull(statistics); + assertEquals(1, statistics.size()); + + TimerStatistics stats = (TimerStatistics) statistics.get(0); + + System.out.println("Total time (parent timer): " + stats.getTotalTime() + " ms."); + + stats = (TimerStatistics) stats.getChildren().get(0); + + System.out.println("Number of hits (test timer): " + stats.getNumberOfHits() + "."); + System.out.println("Total time (test timer) : " + stats.getTotalTime() + " ms."); + System.out.println("Average time (test timer) : " + stats.getAverageTime() + " ms."); + } + +} Modified: trunk/sensor-core/test/java/net/sf/sensor/timer/TimerDataTest.java =================================================================== --- trunk/sensor-core/test/java/net/sf/sensor/timer/TimerDataTest.java 2006-03-19 22:09:13 UTC (rev 94) +++ trunk/sensor-core/test/java/net/sf/sensor/timer/TimerDataTest.java 2006-03-19 23:08:44 UTC (rev 95) @@ -86,6 +86,15 @@ assertNotNull(children); assertFalse(children.hasNext()); + + timerData.reset(); + + assertFalse(timerData.hasChildren()); + + children = timerData.getChildren(); + + assertNotNull(children); + assertFalse(children.hasNext()); } /** @@ -139,6 +148,9 @@ long timestampAfterUpdate = System.currentTimeMillis(); + // call the refresh method to force the calculation of the average time and the standard deviation + timerData.refreshStatistics(); + assertEquals(1L, timerData.getNumberOfHits()); assertEquals(10L, timerData.getTotalTime()); assertEquals(10L, timerData.getAverageTime()); @@ -171,6 +183,9 @@ timestampAfterUpdate = System.currentTimeMillis(); + // call the refresh method to force the calculation of the average time and the standard deviation + timerData.refreshStatistics(); + assertEquals(2L, timerData.getNumberOfHits()); assertEquals(60L, timerData.getTotalTime()); assertEquals(30L, timerData.getAverageTime()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <am...@us...> - 2006-03-19 22:09:24
|
Revision: 94 Author: amooy Date: 2006-03-19 14:09:13 -0800 (Sun, 19 Mar 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=94&view=rev Log Message: ----------- Fixed incorrect xml and replaced it with correct resources section Modified Paths: -------------- trunk/sensor-console/project.xml Modified: trunk/sensor-console/project.xml =================================================================== --- trunk/sensor-console/project.xml 2006-03-19 17:56:20 UTC (rev 93) +++ trunk/sensor-console/project.xml 2006-03-19 22:09:13 UTC (rev 94) @@ -311,12 +311,17 @@ <build> <sourceDirectory>${basedir}/src/java</sourceDirectory> - <includes> - <include>**/.vm</include> - <include>**/.java</include> - </includes> <unitTestSourceDirectory>${basedir}/test/java</unitTestSourceDirectory> + <resources> + <resource> + <directory>${basedir}/src/java</directory> + <includes> + <include>**/*.vm</include> + </includes> + </resource> + </resources> + <unitTest> <includes> <include>**/*Test.java</include> @@ -331,16 +336,6 @@ </resource> </resources> </unitTest> - -<!-- <resources> - <resource> - <directory>${basedir}/src/resources</directory> - <includes> - <include>**/*.xml</include> - <include>**/*.properties</include> - </includes> - </resource> - </resources>--> </build> <reports> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-03-19 17:56:29
|
Revision: 93 Author: ldikmans Date: 2006-03-19 09:56:20 -0800 (Sun, 19 Mar 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=93&view=rev Log Message: ----------- Added documentation for developers Modified Paths: -------------- trunk/sensor-site/xdocs/navigation.xml Added Paths: ----------- trunk/sensor-site/xdocs/developersguide.xml trunk/sensor-site/xdocs/eclipsestart.xml trunk/sensor-site/xdocs/mavenbuild.xml Added: trunk/sensor-site/xdocs/developersguide.xml =================================================================== --- trunk/sensor-site/xdocs/developersguide.xml (rev 0) +++ trunk/sensor-site/xdocs/developersguide.xml 2006-03-19 17:56:20 UTC (rev 93) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> + +<document> + <properties> + <title> Developers Guide</title> + </properties> + + <body> + This guide is meant for developers who want to contribute to Sensor. + </body> +</document> \ No newline at end of file Added: trunk/sensor-site/xdocs/eclipsestart.xml =================================================================== --- trunk/sensor-site/xdocs/eclipsestart.xml (rev 0) +++ trunk/sensor-site/xdocs/eclipsestart.xml 2006-03-19 17:56:20 UTC (rev 93) @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> + +<document> + <properties> + <title> Quick start with eclipse </title> + </properties> + + <body> + <section>This quickstart describes the setup for eclipse + + <subsection name="Prerequisites"> + <li>eclipse version 3.1.x or higher</li> + <li>maven 1.0.2 or maven 1.1</li> + </subsection> + + <subsection name="Optional"> + <li>subclipse to download the sources from the subversion repository</li> + <li>WTP </li> + <li>Maviclipse </li> + </subsection> + + <subsection name="Installation in Eclipse"> + <ul> + <li>Create a workspace in eclipse (version 3.1.x or higher)</li> + <li>Preferences: + <ul> + <li>Installed JRE: 1.4.2 or higher.</li> + <li>Create a classpath variable (Java/Build path) in eclipse named: MAVEN_REPO that points to the maven repository.</li> + </ul> + </li> + <li>Use the SVN repository browser and point to https://svn.sourceforge.net/svnroot/sensor </li> + <li>Check out the four (or three) modules into workspace as projects:"</li> + <ul> + <li>sensor-console</li> + <li>sensor-core</li> + <li>sensor-site (if you plan to add documentation) </li> + <li>sensor-support</li> + </ul> + <li> + <links> + <item name="build sensor with maven" href="mavenbuild.html"/> + </links> + </li> + <li>refresh the projects in eclipse</li> + </ul> + Now all the projects should compile in eclipse and you are ready to go! + + </subsection> + </section> + </body> +</document> \ No newline at end of file Added: trunk/sensor-site/xdocs/mavenbuild.xml =================================================================== --- trunk/sensor-site/xdocs/mavenbuild.xml (rev 0) +++ trunk/sensor-site/xdocs/mavenbuild.xml 2006-03-19 17:56:20 UTC (rev 93) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> + +<document> + <properties> + <title> Installation with Maven</title> + </properties> + + <body> + <section> + This paragraph describes building sensor with Maven. + <subsection name="installing the jar files"> + <li>Navigate to the directory of sensor-core and run maven jar:install</li> + <li>Navigate to the directory of sensor-support and run maven jar:install</li> + </subsection> + <subsection name="installing the sensor console"> + Note: this is an unusual situation, usually you would configure the application to run with another application. + <li>Navigate to the directory of sensor-console and run maven war:war</li> + <li>Deploy the application to Tomcat or another J2EE server</li> + <li>Open a browser and point to “http://[host]:[port]/[context-root]/timing/statistics.htm“. For tomcat the URL could be: http://localhost:8080/sensor-console/timing/statistics.htm” </li> + </subsection> + </section> + </body> +</document> \ No newline at end of file Modified: trunk/sensor-site/xdocs/navigation.xml =================================================================== --- trunk/sensor-site/xdocs/navigation.xml 2006-03-19 17:55:54 UTC (rev 92) +++ trunk/sensor-site/xdocs/navigation.xml 2006-03-19 17:56:20 UTC (rev 93) @@ -24,6 +24,10 @@ <menu name="Documentation"> <item name="Getting Started" href="index.html"/> + <item name="Developers Guide" href="developersguide.html" collapse="false"> + <item name="Quick start for Eclipse" href="eclipsestart.html"/> + <item name="Quick start for Maven" href="mavenbuild.html"/> + </item> <item name="Working With Timers" href="index.html" collapse="true"> <item name="Basic API" href="index.html"/> <item name="Applying Timers" href="index.html"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ldi...@us...> - 2006-03-19 17:56:03
|
Revision: 92 Author: ldikmans Date: 2006-03-19 09:55:54 -0800 (Sun, 19 Mar 2006) ViewCVS: http://svn.sourceforge.net/sensor/?rev=92&view=rev Log Message: ----------- Made sure the *.vm are included in the war file Modified Paths: -------------- trunk/sensor-console/project.xml Modified: trunk/sensor-console/project.xml =================================================================== --- trunk/sensor-console/project.xml 2006-03-19 12:31:29 UTC (rev 91) +++ trunk/sensor-console/project.xml 2006-03-19 17:55:54 UTC (rev 92) @@ -311,6 +311,10 @@ <build> <sourceDirectory>${basedir}/src/java</sourceDirectory> + <includes> + <include>**/.vm</include> + <include>**/.java</include> + </includes> <unitTestSourceDirectory>${basedir}/test/java</unitTestSourceDirectory> <unitTest> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |