Author: hardy.ferentschik
Date: 2009-11-30 07:41:16 -0500 (Mon, 30 Nov 2009)
New Revision: 18093
Added:
search/trunk/hibernate-search-archetype/src/main/archetype/
search/trunk/hibernate-search-archetype/src/main/archetype/archetype.properties
search/trunk/hibernate-search-archetype/src/main/java/
search/trunk/hibernate-search-archetype/src/main/resources/META-INF/persistence.xml
search/trunk/hibernate-search-archetype/src/main/resources/log4j.properties
search/trunk/hibernate-search-archetype/src/test/
search/trunk/hibernate-search-archetype/src/test/java/example/
Removed:
search/trunk/hibernate-search-archetype/src/main/resources/META-INF/maven/
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/pom.xml
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/src/
search/trunk/hibernate-search-archetype/src/test/java/java/example/
Modified:
search/trunk/hibernate-search-archetype/pom.xml
search/trunk/hibernate-search-archetype/src/test/java/example/IndexAndSearchTest.java
Log:
HSEARCH-426
Modified: search/trunk/hibernate-search-archetype/pom.xml
===================================================================
--- search/trunk/hibernate-search-archetype/pom.xml 2009-11-30 11:26:55 UTC (rev 18092)
+++ search/trunk/hibernate-search-archetype/pom.xml 2009-11-30 12:41:16 UTC (rev 18093)
@@ -1,7 +1,104 @@
+<?xml version="1.0"?>
<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-search-quickstart</artifactId>
- <packaging>jar</packaging>
- <version>3.2.0.Beta1</version>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-search-quickstart</artifactId>
+ <packaging>jar</packaging>
+ <version>3.2.0-Beta1</version>
+ <name>A custom project</name>
+ <url>http://www.myorganization.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-search</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.5.0-Beta-2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-common</artifactId>
+ <version>1.3.0</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-core</artifactId>
+ <version>1.3.0</version>
+ <optional>true</optional>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-solrj</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.java.dev.stax-utils</groupId>
+ <artifactId>stax-utils</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-lucene-core</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-snowball</artifactId>
+ <version>2.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-analyzers</artifactId>
+ <version>2.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: search/trunk/hibernate-search-archetype/src/main/archetype/archetype.properties
===================================================================
--- search/trunk/hibernate-search-archetype/src/main/archetype/archetype.properties
(rev 0)
+++
search/trunk/hibernate-search-archetype/src/main/archetype/archetype.properties 2009-11-30
12:41:16 UTC (rev 18093)
@@ -0,0 +1,4 @@
+archetype.groupId=org.hibernate
+archetype.artifactId=hibernate-search-quickstart
+archetype.version=3.2.0-Beta1
+
Copied: search/trunk/hibernate-search-archetype/src/main/java (from rev 18090,
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/src/main/java)
Copied:
search/trunk/hibernate-search-archetype/src/main/resources/META-INF/persistence.xml (from
rev 18090,
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/persistence.xml)
===================================================================
--- search/trunk/hibernate-search-archetype/src/main/resources/META-INF/persistence.xml
(rev 0)
+++
search/trunk/hibernate-search-archetype/src/main/resources/META-INF/persistence.xml 2009-11-30
12:41:16 UTC (rev 18093)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence
xmlns="http://java.sun.com/xml/ns/persistence"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="hibernate-search-example">
+ <properties>
+
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.username"
value="sa"/>
+ <property name="hibernate.connection.password"
value=""/>
+ <property name="hibernate.connection.url"
value="jdbc:hsqldb:."/>
+
+ <property name="hibernate.hbm2ddl.auto"
value="create-drop"/>
+
+ <property name="hibernate.search.default.indexBase"
+ value="target"/>
+
+ <!-- optional -->
+ <property name="hibernate.search.default.directory_provider"
+
value="org.hibernate.search.store.FSDirectoryProvider"/>
+ </properties>
+ </persistence-unit>
+</persistence>
Deleted:
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/pom.xml
===================================================================
---
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/pom.xml 2009-11-30
11:26:55 UTC (rev 18092)
+++
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/pom.xml 2009-11-30
12:41:16 UTC (rev 18093)
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>${groupId}</groupId>
- <artifactId>${artifactId}</artifactId>
- <packaging>jar</packaging>
- <version>${version}</version>
- <name>A custom project</name>
- <url>http://www.myorganization.org</url>
- <dependencies>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-search</artifactId>
- <version>3.2.0.Beta1</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>3.5.0-Beta-2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.solr</groupId>
- <artifactId>solr-common</artifactId>
- <version>1.3.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.solr</groupId>
- <artifactId>solr-core</artifactId>
- <version>1.3.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.lucene</groupId>
- <artifactId>lucene-snowball</artifactId>
- <version>2.4.1</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.2</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
Copied: search/trunk/hibernate-search-archetype/src/main/resources/log4j.properties (from
rev 18090,
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/src/main/resources/log4j.properties)
===================================================================
--- search/trunk/hibernate-search-archetype/src/main/resources/log4j.properties
(rev 0)
+++ search/trunk/hibernate-search-archetype/src/main/resources/log4j.properties 2009-11-30
12:41:16 UTC (rev 18093)
@@ -0,0 +1,31 @@
+### direct log messages to stdout ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### direct messages to file hibernate.log ###
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.File=hibernate.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### direct messages to socket - chainsaw ###
+log4j.appender.socket=org.apache.log4j.net.SocketAppender
+log4j.appender.socket.remoteHost=localhost
+log4j.appender.socket.port=4560
+log4j.appender.socket.locationInfo=true
+
+### set log levels - for more verbose logging change 'info' to 'debug'
###
+
+log4j.rootLogger=info, stdout
+
+log4j.logger.org.hibernate=info
+
+### log just the SQL
+log4j.logger.org.hibernate.SQL=debug
+
+### log schema export/update ###
+log4j.logger.org.hibernate.tool.hbm2ddl=debug
+
+
Copied: search/trunk/hibernate-search-archetype/src/test (from rev 18090,
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/src/test)
Copied: search/trunk/hibernate-search-archetype/src/test/java/example (from rev 18090,
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/src/test/java/java/example)
Modified:
search/trunk/hibernate-search-archetype/src/test/java/example/IndexAndSearchTest.java
===================================================================
---
search/trunk/hibernate-search-archetype/src/main/resources/archetype-resources/src/test/java/java/example/IndexAndSearchTest.java 2009-11-28
01:12:19 UTC (rev 18090)
+++
search/trunk/hibernate-search-archetype/src/test/java/example/IndexAndSearchTest.java 2009-11-30
12:41:16 UTC (rev 18093)
@@ -117,6 +117,7 @@
for (Object obj : results) {
ftSession.index(obj);
}
+ ftSession.flushToIndexes();
}
private void purge() {