Author: bleny Date: 2010-08-18 15:46:07 +0200 (Wed, 18 Aug 2010) New Revision: 267 Url: http://nuiton.org/repositories/revision/wikitty/267 Log: merging into branch changes done in trunk Added: branches/wikitty-eugene-migration/src/site/presentation_Wikitty_2010-08-20.odp branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/ branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/ branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/deserializers branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/serializers branches/wikitty-eugene-migration/wikitty-hessian-server/src/test/java/HessianTest.java Removed: branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/ branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/deserializers branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/serializers Modified: branches/wikitty-eugene-migration/ branches/wikitty-eugene-migration/pom.xml branches/wikitty-eugene-migration/wikitty-api/pom.xml branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/BusinessEntityWikitty.java branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyCache.java branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyProxy.java branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyServiceCached.java branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyUtil.java branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/search/Search.java branches/wikitty-eugene-migration/wikitty-hbase-impl/ branches/wikitty-eugene-migration/wikitty-hbase-impl/pom.xml branches/wikitty-eugene-migration/wikitty-hessian-server/pom.xml branches/wikitty-eugene-migration/wikitty-jdbc-impl/pom.xml branches/wikitty-eugene-migration/wikitty-jms-impl/ branches/wikitty-eugene-migration/wikitty-jms-impl/pom.xml branches/wikitty-eugene-migration/wikitty-jpa-impl/ branches/wikitty-eugene-migration/wikitty-jpa-impl/pom.xml branches/wikitty-eugene-migration/wikitty-multistorage-impl/pom.xml branches/wikitty-eugene-migration/wikitty-solr-impl/pom.xml branches/wikitty-eugene-migration/wikitty-solr-impl/src/test/java/org/nuiton/wikitty/solr/test/SolrSearchTest.java branches/wikitty-eugene-migration/wikitty-ui-zk/pom.xml Property changes on: branches/wikitty-eugene-migration ___________________________________________________________________ Modified: svn:mergeinfo - /branches/2.0-eugene2:164-179 + /branches/2.0-eugene2:164-179 /trunk:239-266 Modified: branches/wikitty-eugene-migration/pom.xml =================================================================== --- branches/wikitty-eugene-migration/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -104,7 +106,7 @@ <dependency> <groupId>com.caucho</groupId> <artifactId>hessian</artifactId> - <version>3.1.5</version> + <version>4.0.6</version> <scope>compile</scope> </dependency> @@ -113,7 +115,7 @@ <artifactId>solr-core</artifactId> <version>1.4.1</version> </dependency> - + <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> @@ -192,7 +194,129 @@ <version>${zk.version}</version> </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase</artifactId> + <version>${hbase.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase</artifactId> + <classifier>tests</classifier> + <version>${hbase.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <!-- needed at runtime for tests --> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-test</artifactId> + <version>0.20.3-SNAPSHOT</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> + <version>1.1</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>${spring.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <version>${spring.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <version>${spring.version}</version> + </dependency> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${spring.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-orm</artifactId> + <version>${spring.version}</version> + </dependency> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + <version>${spring.version}</version> + </dependency> + + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-entitymanager</artifactId> + <version>3.5.1-Final</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-validator</artifactId> + <version>4.0.2.GA</version> + </dependency> + <dependency> + <groupId>jboss</groupId> + <artifactId>jboss-common-core</artifactId> + <version>2.2.0.GA</version> + </dependency> + <dependency> + <groupId>dom4j</groupId> + <artifactId>dom4j</artifactId> + <version>1.6.1</version> + </dependency> + <dependency> + <groupId>javassist</groupId> + <artifactId>javassist</artifactId> + <version>3.6.0.GA</version> + </dependency> + <dependency> + <groupId>antlr</groupId> + <artifactId>antlr</artifactId> + <version>2.7.7</version> + </dependency> + <dependency> + <groupId>cglib</groupId> + <artifactId>cglib</artifactId> + <version>2.1_3</version> + </dependency> + + <dependency> + <groupId>org.hibernate.javax.persistence</groupId> + <artifactId>hibernate-jpa-2.0-api</artifactId> + <version>1.0.0.Final</version> + </dependency> + + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>activemq-core</artifactId> + <version>5.3.1</version> + </dependency> + </dependencies> </dependencyManagement> @@ -200,7 +324,8 @@ <!-- Source control management. --> <scm> <connection>scm:svn:http://svn.nuiton.org/svn/wikitty/trunk</connection> - <developerConnection>scm:svn:http://svn.nuiton.org/svn/wikitty/trunk</developerConnection> + <developerConnection>scm:svn:http://svn.nuiton.org/svn/wikitty/trunk + </developerConnection> <url>http://www.nuiton.org/repositories/browse/wikitty/trunk</url> </scm> @@ -228,6 +353,8 @@ <jetty.version>6.1.22</jetty.version> <zk.version>5.0.2</zk.version> + + <hbase.version>0.89.0-SNAPSHOT</hbase.version> </properties> <!-- ************************************************************* --> @@ -262,7 +389,7 @@ <profiles> <profile> - <id>extra-modules</id> + <id>wikitty-extra-modules</id> <modules> <module>wikitty-hbase-impl</module> <module>wikitty-jpa-impl</module> @@ -271,5 +398,5 @@ </modules> </profile> </profiles> - + </project> Copied: branches/wikitty-eugene-migration/src/site/presentation_Wikitty_2010-08-20.odp (from rev 266, trunk/src/site/presentation_Wikitty_2010-08-20.odp) =================================================================== (Binary files differ) Modified: branches/wikitty-eugene-migration/wikitty-api/pom.xml =================================================================== --- branches/wikitty-eugene-migration/wikitty-api/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-api/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -25,21 +25,18 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> @@ -111,12 +108,6 @@ <!-- *** Build Settings ****************************************** --> <!-- ************************************************************* --> - <packaging>jar</packaging> - - <properties> - - </properties> - <build> <pluginManagement> @@ -200,8 +191,4 @@ </build> - <!-- ************************************************************* --> - <!-- *** Build Environment ************************************** --> - <!-- ************************************************************* --> - </project> Modified: branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/BusinessEntityWikitty.java =================================================================== --- branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/BusinessEntityWikitty.java 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/BusinessEntityWikitty.java 2010-08-18 13:46:07 UTC (rev 267) @@ -116,9 +116,26 @@ return Collections.emptyList(); } + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (!BusinessEntityWikitty.class.isAssignableFrom(obj.getClass())) { + return false; + } + BusinessEntityWikitty wikitty = (BusinessEntityWikitty) obj; + return getWikittyId().equals(wikitty.getWikittyId()); + } + + @Override + public int hashCode() { + return getWikittyId().hashCode(); + } + /* - * @see org.nuiton.wikitty.BusinessEntity#addPropertyChangeListener(java.beans.PropertyChangeListener) - */ + * @see org.nuiton.wikitty.BusinessEntity#addPropertyChangeListener(java.beans.PropertyChangeListener) + */ @Override public void addPropertyChangeListener(PropertyChangeListener listener) { getPropertyChangeSupport().addPropertyChangeListener(listener); Modified: branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyCache.java =================================================================== --- branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyCache.java 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyCache.java 2010-08-18 13:46:07 UTC (rev 267) @@ -87,6 +87,9 @@ * @param e */ public void putWikitty(Wikitty e) { + if (e == null) { + return; + } Wikitty old = getWikitty(e.getId()); if (old == null || WikittyUtil.versionGreaterThan(e.getVersion(), old.getVersion())) { Modified: branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyProxy.java =================================================================== --- branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyProxy.java 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyProxy.java 2010-08-18 13:46:07 UTC (rev 267) @@ -151,6 +151,17 @@ /** * Restore wikitty entity with specified id or {@code null} if entity can't be found. * + * @param id entity id + * @return wikitty entity with specified id or {@code null} if entity can't be found + */ + public Wikitty restore(String id) { + Wikitty wikitty = wikittyService.restore(securityToken, id); + return wikitty; + } + + /** + * Restore wikitty entity with specified id or {@code null} if entity can't be found. + * * @param <E> object type * @param clazz entity class * @param id entity id Modified: branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyServiceCached.java =================================================================== --- branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyServiceCached.java 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyServiceCached.java 2010-08-18 13:46:07 UTC (rev 267) @@ -101,6 +101,12 @@ /** wrap the wikitty or copy it according to allwaysRestoreCopies value */ protected Wikitty wrapWikitty(Wikitty wikitty) { + + // Restored wikitty can be null + if (wikitty == null) { + return null; + } + Wikitty result = null; if (allwaysRestoreCopies) { try { @@ -366,8 +372,10 @@ cache.putAllWikitty(missingInCache); for (Wikitty w : missingInCache) { - // add missing object - fromCache.put(w.getId(), w); + if (w != null) { + // add missing object + fromCache.put(w.getId(), w); + } } Collection<Wikitty> tmp = fromCache.values(); Modified: branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyUtil.java =================================================================== --- branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyUtil.java 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/WikittyUtil.java 2010-08-18 13:46:07 UTC (rev 267) @@ -52,7 +52,7 @@ public static final String DEFAULT_VERSION = "0.0"; - public static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'Z"; + public static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ'Z'"; public static final String[] DATE_FORMAT_ALLOWED = { DATE_FORMAT, new SimpleDateFormat().toPattern(), Modified: branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/search/Search.java =================================================================== --- branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/search/Search.java 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/java/org/nuiton/wikitty/search/Search.java 2010-08-18 13:46:07 UTC (rev 267) @@ -128,6 +128,19 @@ } /** + * Contains. + * + * @param element + * @param value + * @return + */ + public Search contains(String element, String value) { + restrictions.add(RestrictionHelper.contains(elt(element), + value)); + return this; + } + + /** * Equals. * * @param element Deleted: branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/deserializers =================================================================== --- trunk/wikitty-api/src/main/resources/META-INF/hessian/deserializers 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/deserializers 2010-08-18 13:46:07 UTC (rev 267) @@ -1 +0,0 @@ -java.math.BigDecimal=com.caucho.hessian.io.BigDecimalDeserializer \ No newline at end of file Copied: branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/deserializers (from rev 266, trunk/wikitty-api/src/main/resources/META-INF/hessian/deserializers) =================================================================== --- branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/deserializers (rev 0) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/deserializers 2010-08-18 13:46:07 UTC (rev 267) @@ -0,0 +1 @@ +java.math.BigDecimal=com.caucho.hessian.io.BigDecimalDeserializer \ No newline at end of file Deleted: branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/serializers =================================================================== --- trunk/wikitty-api/src/main/resources/META-INF/hessian/serializers 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/serializers 2010-08-18 13:46:07 UTC (rev 267) @@ -1 +0,0 @@ -java.math.BigDecimal=com.caucho.hessian.io.StringValueSerializer \ No newline at end of file Copied: branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/serializers (from rev 266, trunk/wikitty-api/src/main/resources/META-INF/hessian/serializers) =================================================================== --- branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/serializers (rev 0) +++ branches/wikitty-eugene-migration/wikitty-api/src/main/resources/META-INF/hessian/serializers 2010-08-18 13:46:07 UTC (rev 267) @@ -0,0 +1 @@ +java.math.BigDecimal=com.caucho.hessian.io.StringValueSerializer \ No newline at end of file Property changes on: branches/wikitty-eugene-migration/wikitty-hbase-impl ___________________________________________________________________ Modified: svn:ignore - .settings target .classpath .project build PutObjectStoreDirHere + .settings target .classpath .project build PutObjectStoreDirHere *.ipr *.iml *.iws Modified: branches/wikitty-eugene-migration/wikitty-hbase-impl/pom.xml =================================================================== --- branches/wikitty-eugene-migration/wikitty-hbase-impl/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-hbase-impl/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -17,69 +18,70 @@ <artifactId>wikitty-hbase-impl</artifactId> <dependencies> - <!-- TEST --> + + <!-- sibling depedencies --> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-api</artifactId> + <version>${project.version}</version> + <scope>compile</scope> </dependency> + <dependency> <groupId>${project.groupId}</groupId> + <artifactId>wikitty-solr-impl</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> <artifactId>wikitty-api</artifactId> <version>${project.version}</version> <classifier>tests</classifier> <scope>test</scope> </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + + <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> + <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> + <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> - <!-- COMPILE --> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-api</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-solr-impl</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> - <version>${jetty.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>xpp3</groupId> <artifactId>xpp3</artifactId> - <version>1.1.4c</version> </dependency> - <!-- HBASE --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </dependency> + <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> @@ -113,29 +115,28 @@ <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase</artifactId> - <version>0.89.0-SNAPSHOT</version> </dependency> + <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase</artifactId> - <version>0.89.0-SNAPSHOT</version> <classifier>tests</classifier> <scope>test</scope> </dependency> + <dependency> <!-- needed at runtime for tests --> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-test</artifactId> - <version>0.20.3-SNAPSHOT</version> <scope>test</scope> </dependency> <dependency> <groupId>commons-cli</groupId> <artifactId>commons-cli</artifactId> - <version>1.1</version> <scope>test</scope> </dependency> + </dependencies> <!-- ************************************************************* --> @@ -154,8 +155,10 @@ <packaging>jar</packaging> <properties> - <!-- Test don't run in hudson due to port restriction --> - <maven.test.skip>false</maven.test.skip> + <!-- FIXME tchemit 20010-08-12 : Find a nice way to do it in test : + Must brefore test to detect if test can be executed otherwise ignore it + --> + <maven.test.failure.ignore>true</maven.test.failure.ignore> </properties> <!-- ************************************************************* --> @@ -179,5 +182,21 @@ </plugins> </build> + <!-- FIXME tchemit 2010-08-12 Must be removed as soon as a stable version is available --> + <repositories> + <repository> + <id>apache-snapshots</id> + <url> + http://nexus.nuiton.org/nexus/content/repositories/apache-snapshots/ + </url> + <snapshots> + <enabled>true</enabled> + </snapshots> + <releases> + <enabled>false</enabled> + </releases> + </repository> + </repositories> + </project> Modified: branches/wikitty-eugene-migration/wikitty-hessian-server/pom.xml =================================================================== --- branches/wikitty-eugene-migration/wikitty-hessian-server/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-hessian-server/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -16,46 +18,47 @@ <artifactId>wikitty-hessian-server</artifactId> <dependencies> + + <!-- sibling dependencies --> + <dependency> <groupId>${project.groupId}</groupId> <artifactId>wikitty-api</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> - - <!-- webapp can manage every things --> <dependency> <groupId>${project.groupId}</groupId> <artifactId>wikitty-jdbc-impl</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> - <!--dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-multistorage-impl</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency--> <dependency> <groupId>${project.groupId}</groupId> <artifactId>wikitty-solr-impl</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> + <dependency> <groupId>com.caucho</groupId> <artifactId>hessian</artifactId> </dependency> <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <scope>runtime</scope> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>runtime</scope> </dependency> <dependency> - <groupId>postgresql</groupId> - <artifactId>postgresql</artifactId> - <scope>runtime</scope> + <groupId>postgresql</groupId> + <artifactId>postgresql</artifactId> + <scope>runtime</scope> </dependency> + <!-- TEST --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> </dependencies> <!-- ************************************************************* --> @@ -67,4 +70,38 @@ <description>Wikitty hessian server</description> <inceptionYear>2010</inceptionYear> + + <profiles> + <!-- use this profile to add all impl dependencies --> + <profile> + <id>wikitty-extra-modules</id> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-hbase-impl</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-jpa-impl</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-jms-impl</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-multistorage-impl</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> + </dependencies> + </profile> + </profiles> + </project> Copied: branches/wikitty-eugene-migration/wikitty-hessian-server/src/test/java/HessianTest.java (from rev 266, trunk/wikitty-hessian-server/src/test/java/HessianTest.java) =================================================================== --- branches/wikitty-eugene-migration/wikitty-hessian-server/src/test/java/HessianTest.java (rev 0) +++ branches/wikitty-eugene-migration/wikitty-hessian-server/src/test/java/HessianTest.java 2010-08-18 13:46:07 UTC (rev 267) @@ -0,0 +1,34 @@ +import com.caucho.hessian.io.Hessian2Input; +import com.caucho.hessian.io.Hessian2Output; +import com.caucho.hessian.io.SerializerFactory; +import org.junit.Assert; +import org.junit.Test; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.math.BigDecimal; + +/** + * @author sletellier <letellier@codelutin.com> + */ +public class HessianTest { + + @Test + public void testHessianBigDecimal() throws Exception { + BigDecimal object = new BigDecimal("12474639.945458954"); + Hessian2Output os = new Hessian2Output(null); + SerializerFactory factory = new SerializerFactory(); + os.setSerializerFactory(factory); + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + os.init(buffer); + os.writeObject(object); + os.close(); + byte[] bytes = buffer.toByteArray(); + + Hessian2Input is = new Hessian2Input(new ByteArrayInputStream(bytes)); + BigDecimal newObject = (BigDecimal) is.readObject(); + is.close(); + + Assert.assertEquals(object, newObject); + } +} Modified: branches/wikitty-eugene-migration/wikitty-jdbc-impl/pom.xml =================================================================== --- branches/wikitty-eugene-migration/wikitty-jdbc-impl/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-jdbc-impl/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -13,7 +13,29 @@ <artifactId>wikitty-jdbc-impl</artifactId> <dependencies> + + <!-- sibling dependencies --> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-api</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-solr-impl</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-api</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + <!-- TEST --> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> @@ -21,45 +43,22 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-api</artifactId> - <version>${project.version}</version> - <classifier>tests</classifier> - <scope>test</scope> - </dependency> - <!-- WIKITTY --> <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-api</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-solr-impl</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> - <version>${jetty.version}</version> <scope>provided</scope> </dependency> Property changes on: branches/wikitty-eugene-migration/wikitty-jms-impl ___________________________________________________________________ Modified: svn:ignore - .settings target .classpath .project PutObjectStoreDirHere + .settings target .classpath .project PutObjectStoreDirHere *.ipr *.iws *.iml Modified: branches/wikitty-eugene-migration/wikitty-jms-impl/pom.xml =================================================================== --- branches/wikitty-eugene-migration/wikitty-jms-impl/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-jms-impl/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -1,59 +1,56 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.nuiton</groupId> - <artifactId>wikitty</artifactId> - <version>2.1-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.nuiton</groupId> + <artifactId>wikitty</artifactId> + <version>2.1-SNAPSHOT</version> + </parent> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-jms-impl</artifactId> + <groupId>org.nuiton.wikitty</groupId> + <artifactId>wikitty-jms-impl</artifactId> - <dependencies> - <!-- WIKITTY --> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-api</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-solr-impl</artifactId> - <version>${project.version}</version> - </dependency> + <dependencies> - <!-- JMS --> - <dependency> - <groupId>org.apache.activemq</groupId> - <artifactId>activemq-core</artifactId> - <version>5.3.1</version> - </dependency> + <!-- sibling dependencies --> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-api</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-solr-impl</artifactId> + <version>${project.version}</version> + </dependency> - <!-- TEST --> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </dependency> + <!-- JMS --> + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>activemq-core</artifactId> + </dependency> - </dependencies> + <!-- TEST --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> - <!-- ************************************************************* --> - <!-- *** Project Information ************************************* --> - <!-- ************************************************************* --> + </dependencies> - <name>Wikitty :: wikitty-jms-impl</name> + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> - <description>jms storage implementation</description> - <inceptionYear>2010</inceptionYear> + <name>Wikitty :: wikitty-jms-impl</name> - <!-- ************************************************************* --> - <!-- *** Build Settings ****************************************** --> - <!-- ************************************************************* --> + <description>jms storage implementation</description> + <inceptionYear>2010</inceptionYear> - <packaging>jar</packaging> - </project> Property changes on: branches/wikitty-eugene-migration/wikitty-jpa-impl ___________________________________________________________________ Modified: svn:ignore - .settings target .classpath .project PutObjectStoreDirHere solr + .settings target .classpath .project PutObjectStoreDirHere solr *.ipr *.iws *.iml Modified: branches/wikitty-eugene-migration/wikitty-jpa-impl/pom.xml =================================================================== --- branches/wikitty-eugene-migration/wikitty-jpa-impl/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-jpa-impl/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -1,175 +1,170 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.nuiton</groupId> - <artifactId>wikitty</artifactId> - <version>2.1-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.nuiton</groupId> + <artifactId>wikitty</artifactId> + <version>2.1-SNAPSHOT</version> + </parent> - <!-- ************************************************************* --> - <!-- *** POM Relationships *************************************** --> - <!-- ************************************************************* --> + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-jpa-impl</artifactId> + <groupId>org.nuiton.wikitty</groupId> + <artifactId>wikitty-jpa-impl</artifactId> - <dependencies> - <!-- TEST --> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </dependency> + <dependencies> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-api</artifactId> - <version>${project.version}</version> - <classifier>tests</classifier> - <scope>test</scope> - </dependency> + <!-- sibling dependencies --> - <!-- LOG --> - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-api</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> - <!-- SPRING --> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - <version>${spring.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-aop</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-orm</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jdbc</artifactId> - <version>${spring.version}</version> - </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-solr-impl</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + </dependency> - <!-- COMPILE --> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-api</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-solr-impl</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-api</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> - <!-- Hibernate --> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-entitymanager</artifactId> - <version>3.5.1-Final</version> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-validator</artifactId> - <version>4.0.2.GA</version> - </dependency> - <dependency> - <groupId>jboss</groupId> - <artifactId>jboss-common-core</artifactId> - <version>2.2.0.GA</version> - </dependency> - <dependency> - <groupId>dom4j</groupId> - <artifactId>dom4j</artifactId> - <version>1.6.1</version> - </dependency> - <dependency> - <groupId>javassist</groupId> - <artifactId>javassist</artifactId> - <version>3.6.0.GA</version> - </dependency> - <dependency> - <groupId>antlr</groupId> - <artifactId>antlr</artifactId> - <version>2.7.7</version> - </dependency> - <dependency> - <groupId>cglib</groupId> - <artifactId>cglib</artifactId> - <version>2.1_3</version> - </dependency> - <dependency> - <groupId>com.experlog</groupId> - <artifactId>xapool</artifactId> - <version>1.5.0</version> - </dependency> - <dependency> - <groupId>javax.transaction</groupId> - <artifactId>jta</artifactId> - <version>1.1</version> - </dependency> - <dependency> - <groupId>org.hibernate.javax.persistence</groupId> - <artifactId>hibernate-jpa-2.0-api</artifactId> - <version>1.0.0.Final</version> - </dependency> + <!-- TEST --> - <!-- H2 --> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> - </dependencies> + <!-- LOG --> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </dependency> - <!-- ************************************************************* --> - <!-- *** Project Information ************************************* --> - <!-- ************************************************************* --> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> - <name>Wikitty :: wikitty-jpa-impl</name> + <!-- SPRING --> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <scope>test</scope> + </dependency> - <description>jpa impl of wikitty</description> - <inceptionYear>2009</inceptionYear> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <scope>test</scope> + </dependency> - <!-- ************************************************************* --> - <!-- *** Build Settings ****************************************** --> - <!-- ************************************************************* --> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <scope>compile</scope> + </dependency> - <packaging>jar</packaging> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <scope>test</scope> + </dependency> - <properties> - <maven.test.failure.ignore>false</maven.test.failure.ignore> - </properties> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-orm</artifactId> + <scope>compile</scope> + </dependency> - <!-- ************************************************************* --> - <!-- *** Build Environment ************************************** --> - <!-- ************************************************************* --> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + <scope>test</scope> + </dependency> + <!-- Hibernate --> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-entitymanager</artifactId> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-validator</artifactId> + </dependency> + <dependency> + <groupId>jboss</groupId> + <artifactId>jboss-common-core</artifactId> + </dependency> + <dependency> + <groupId>dom4j</groupId> + <artifactId>dom4j</artifactId> + </dependency> + <dependency> + <groupId>javassist</groupId> + <artifactId>javassist</artifactId> + </dependency> + <dependency> + <groupId>antlr</groupId> + <artifactId>antlr</artifactId> + </dependency> + <dependency> + <groupId>cglib</groupId> + <artifactId>cglib</artifactId> + </dependency> + <dependency> + <groupId>com.experlog</groupId> + <artifactId>xapool</artifactId> + </dependency> + <dependency> + <groupId>javax.transaction</groupId> + <artifactId>jta</artifactId> + </dependency> + <dependency> + <groupId>org.hibernate.javax.persistence</groupId> + <artifactId>hibernate-jpa-2.0-api</artifactId> + </dependency> + + <!-- H2 --> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + </dependency> + + </dependencies> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + + <name>Wikitty :: wikitty-jpa-impl</name> + <description>jpa impl of wikitty</description> + <inceptionYear>2009</inceptionYear> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <properties> + + <maven.test.failure.ignore>true</maven.test.failure.ignore> + </properties> + </project> Modified: branches/wikitty-eugene-migration/wikitty-multistorage-impl/pom.xml =================================================================== --- branches/wikitty-eugene-migration/wikitty-multistorage-impl/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-multistorage-impl/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -14,28 +14,15 @@ <artifactId>wikitty-multistorage-impl</artifactId> <dependencies> - <!-- WIKITTY --> + + <!-- sibling dependencies --> + <dependency> <groupId>${project.groupId}</groupId> <artifactId>wikitty-api</artifactId> <version>${project.version}</version> </dependency> - - <!-- TEST --> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </dependency> - - <dependency> <groupId>${project.groupId}</groupId> <artifactId>wikitty-jdbc-impl</artifactId> <version>${project.version}</version> @@ -53,6 +40,21 @@ <version>${project.version}</version> <scope>test</scope> </dependency> + + <!-- TEST --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </dependency> + </dependencies> <!-- ************************************************************* --> @@ -67,12 +69,10 @@ <!-- *** Build Settings ****************************************** --> <!-- ************************************************************* --> - <packaging>jar</packaging> - <properties> - <!-- maven conventionnal variables doesn't work ? - <maven.test.failure.ignore>true</maven.test.failure.ignore> --> - <maven.test.testFailureIgnore>true</maven.test.testFailureIgnore> + <!-- maven conventionnal variables doesn't work ? --> + <maven.test.failure.ignore>true</maven.test.failure.ignore> + <!--maven.test.testFailureIgnore>true</maven.test.testFailureIgnore--> </properties> <build> Modified: branches/wikitty-eugene-migration/wikitty-solr-impl/pom.xml =================================================================== --- branches/wikitty-eugene-migration/wikitty-solr-impl/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-solr-impl/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -17,13 +17,20 @@ <artifactId>wikitty-solr-impl</artifactId> <dependencies> - <!-- COMPILE --> + + <!-- sibling dependencies --> <dependency> <groupId>${project.groupId}</groupId> <artifactId>wikitty-api</artifactId> <version>${project.version}</version> - <scope>compile</scope> </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>wikitty-api</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> <!-- SOLR --> <dependency> @@ -56,28 +63,19 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>${spring.version}</version> <scope>test</scope> </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>wikitty-api</artifactId> - <version>${project.version}</version> - <classifier>tests</classifier> - <scope>test</scope> - </dependency> + </dependencies> <!-- ************************************************************* --> Modified: branches/wikitty-eugene-migration/wikitty-solr-impl/src/test/java/org/nuiton/wikitty/solr/test/SolrSearchTest.java =================================================================== --- branches/wikitty-eugene-migration/wikitty-solr-impl/src/test/java/org/nuiton/wikitty/solr/test/SolrSearchTest.java 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-solr-impl/src/test/java/org/nuiton/wikitty/solr/test/SolrSearchTest.java 2010-08-18 13:46:07 UTC (rev 267) @@ -4,6 +4,8 @@ import static junit.framework.Assert.assertTrue; import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; import java.util.List; import org.apache.commons.logging.Log; @@ -410,4 +412,31 @@ list = result.getAll(); assertEquals(0, list.size()); } + + /** test that doing a search with a date criteria is possible */ + @Test + public void testSearchByDate() throws Exception { + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.DAY_OF_MONTH, 20); + cal.set(Calendar.MONTH, 9); + cal.set(Calendar.YEAR, 2009); + + // this must return a date in a format understandable for solr + // pattern in WikittyUtil has to be compatible + String dateString = WikittyUtil.formatDate(cal.getTime()); + + Criteria criteria = Search.query() + .gt("Test.buildDate", dateString) + .criteria() + .setFirstIndex(0).setEndIndex(Criteria.ALL_ELEMENTS); + + // If an exception is thrown, check that the pattern in WikittyUtil + // is compatible with solr, in particular that the trailing Z + // is present and respect http://wiki.apache.org/solr/IndexingDates + PagedResult<String> result = ws.findAllByCriteria(null, criteria); + + + List<String> list = result.getAll(); + assertEquals(1, list.size()); + } } Modified: branches/wikitty-eugene-migration/wikitty-ui-zk/pom.xml =================================================================== --- branches/wikitty-eugene-migration/wikitty-ui-zk/pom.xml 2010-08-17 16:19:53 UTC (rev 266) +++ branches/wikitty-eugene-migration/wikitty-ui-zk/pom.xml 2010-08-18 13:46:07 UTC (rev 267) @@ -17,12 +17,13 @@ <dependencies> + <!-- sibling dependencies --> + <dependency> <groupId>${project.groupId}</groupId> <artifactId>wikitty-api</artifactId> <version>${project.version}</version> </dependency> - <dependency> <groupId>${project.groupId}</groupId> <artifactId>wikitty-jdbc-impl</artifactId>