[Tynstep-svn] r221 - in trunk/step: . step-core step-core/src/main/java/com/tyndalehouse/step/core/data/entities step-core/src/main/java/com/tyndalehouse/step/core/guice/providers step-core/src/main/java/com/tyndalehouse/step/core/service/impl step-core/src/main/resources step-parent

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Sat Mar 19 08:53:06 MST 2011


Author: ChrisBurrell
Date: 2011-03-19 08:53:06 -0700 (Sat, 19 Mar 2011)
New Revision: 221

Modified:
   trunk/step/pom.xml
   trunk/step/step-core/pom.xml
   trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/data/entities/User.java
   trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/guice/providers/DatabaseConfigProvider.java
   trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/service/impl/UserDataServiceImpl.java
   trunk/step/step-core/src/main/resources/ebean.properties
   trunk/step/step-parent/pom.xml
Log:
changes to ebean to prevent subclassing

Modified: trunk/step/pom.xml
===================================================================
--- trunk/step/pom.xml	2011-03-19 11:40:37 UTC (rev 220)
+++ trunk/step/pom.xml	2011-03-19 15:53:06 UTC (rev 221)
@@ -24,6 +24,14 @@
 	<organization>
 		<name>Tyndale House Cambridge & Crosswire</name>
 	</organization>
+
+	<distributionManagement>
+		<repository>
+			<id>crosswire.releases</id>
+			<name>Crosswire repository</name>
+			<url>http://crosswire.org/mvn/content/groups/public/</url>
+		</repository>
+	</distributionManagement>
 	
 	<modules>
 		<module>step-parent</module>

Modified: trunk/step/step-core/pom.xml
===================================================================
--- trunk/step/step-core/pom.xml	2011-03-19 11:40:37 UTC (rev 220)
+++ trunk/step/step-core/pom.xml	2011-03-19 15:53:06 UTC (rev 221)
@@ -17,6 +17,33 @@
 
 	<build>
 		<plugins>
+			<plugin>  
+				<groupId>org.apache.maven.plugins</groupId>  
+				<artifactId>maven-antrun-plugin</artifactId>  
+				<executions>  
+					<execution>  
+						<id>generating-ebean-classes</id>  
+						<phase>compile</phase>  
+						<configuration>  
+							<tasks>  
+								<property name="compile_classpath" refid="maven.compile.classpath" />  
+								<echo message="Ebean enhancing test classes debug level -----------------------------------" />  
+								<echo message="Classpath: ${compile_classpath}" />  
+								<taskdef name="ebeanEnhance"  
+									classname="com.avaje.ebean.enhance.ant.AntEnhanceTask"  
+									classpath="${compile_classpath}" />  
+								<ebeanEnhance 
+									classSource="${project.build.outputDirectory}"  
+									packages="com.tyndalehouse.step.core.data.entities.**" />  
+							</tasks>  
+							<encoding>UTF-8</encoding>  
+						</configuration>  
+						<goals>  
+							<goal>run</goal>  
+						</goals>
+					</execution>  
+				</executions>  
+			</plugin>  
 			<plugin>
 			    <groupId>org.apache.maven.plugins</groupId>
 		        <artifactId>maven-surefire-plugin</artifactId>

Modified: trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/data/entities/User.java
===================================================================
--- trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/data/entities/User.java	2011-03-19 11:40:37 UTC (rev 220)
+++ trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/data/entities/User.java	2011-03-19 15:53:06 UTC (rev 221)
@@ -4,6 +4,7 @@
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
+import javax.persistence.Table;
 
 /**
  * represents a user entity. A user contains a username and password.
@@ -12,6 +13,7 @@
  * 
  */
 @Entity
+ at Table(name = "users")
 public class User {
     @Id
     @GeneratedValue

Modified: trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/guice/providers/DatabaseConfigProvider.java
===================================================================
--- trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/guice/providers/DatabaseConfigProvider.java	2011-03-19 11:40:37 UTC (rev 220)
+++ trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/guice/providers/DatabaseConfigProvider.java	2011-03-19 15:53:06 UTC (rev 221)
@@ -90,6 +90,7 @@
 
         config.setDataSource(ds);
 
+        // config.addPackage("com.tyndalehouse.step.core.data.entities");
         addEntities(config);
 
         // set DDL options...

Modified: trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/service/impl/UserDataServiceImpl.java
===================================================================
--- trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/service/impl/UserDataServiceImpl.java	2011-03-19 11:40:37 UTC (rev 220)
+++ trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/service/impl/UserDataServiceImpl.java	2011-03-19 15:53:06 UTC (rev 221)
@@ -83,7 +83,8 @@
     @Override
     public Session createSession() {
         // TODO we can't use subclassing on Android so remove in preference to enhancements
-        final Session session = this.ebean.createEntityBean(Session.class);
+        // final Session session = this.ebean.createEntityBean(Session.class);
+        final Session session = new Session();
         final ClientSession clientSession = this.clientSessionProvider.get();
 
         // TODO we ensure that we expire the sessions after a while of inactivity

Modified: trunk/step/step-core/src/main/resources/ebean.properties
===================================================================
--- trunk/step/step-core/src/main/resources/ebean.properties	2011-03-19 11:40:37 UTC (rev 220)
+++ trunk/step/step-core/src/main/resources/ebean.properties	2011-03-19 15:53:06 UTC (rev 221)
@@ -8,8 +8,7 @@
   
 ebean.ddl.generate=false  
 ebean.ddl.run=false  
-  
-ebean.debug.sql=true  
+ebean.debug.sql=true
 #ebean.debug.lazyload=false  
   
   

Modified: trunk/step/step-parent/pom.xml
===================================================================
--- trunk/step/step-parent/pom.xml	2011-03-19 11:40:37 UTC (rev 220)
+++ trunk/step/step-parent/pom.xml	2011-03-19 15:53:06 UTC (rev 221)
@@ -361,13 +361,14 @@
 							<projectnature>net.sf.eclipsecs.core.CheckstyleNature</projectnature>
 							<projectnature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</projectnature>
 							<projectnature>org.maven.ide.eclipse.maven2Nature</projectnature>
-
+							<projectnature>com.avaje.eclipse.buildplugin.enhanceNature</projectnature>
 						</additionalProjectnatures>
 						<additionalBuildcommands>
 							<buildcommand>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</buildcommand>
 							<buildcommand>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</buildcommand>
 							<buildcommand>net.sf.eclipsecs.core.CheckstyleBuilder</buildcommand>
 							<buildcommand>org.maven.ide.eclipse.maven2Builder</buildcommand>
+							<buildcommand>com.avaje.eclipse.buildplugin.enhanceBuilder</buildcommand>
 						</additionalBuildcommands>
 
 						<additionalConfig>




More information about the Tynstep-svn mailing list