Hi Thomas,

I made some updates and wrote a quick start guide. This is now working for me. Hopefully you will find this patch helpful. It does disable Intake for Java 8 users by default (commented out) which anyone new to Turbine would most likely be using at the moment since Java 8 has been out for a while. Also, I cannot get the test data to generate - maybe you know how to make this happen and can update my notes below. None of the users/groups/roles are being inserted into the database following below instructions and have to be entered manually - the sql code is not being generated from the torque-security-data.xml file or the application-data.xml I updated in the archetype.

You will see I added some parameters to the startup to help get things going a little more quickly.

------------------
Quick Guide to using the new Turbine 4.0-M2 maven archetype for skeleton application generation

Invoke the maven archetype from the command line:

mvn archetype:generate \
    -DarchetypeGroupId=org.apache.turbine \
    -DarchetypeArtifactId=turbine-webapp-4.0 \
    -DarchetypeVersion=1.0.1 \
    -DgroupId=com.mycompany.webapp \
    -DartifactId=helloWorld \
    -Dversion=1.0 \
    -Dturbine_app_name=HelloWorld \
    -Dturbine_database_adapter=mysql \
    -Dturbine_database_user=dbUsername \
    -Dturbine_database_password=dbPassword \
    -Dturbine_database_name=helloWorld

(**note that the database URL will be appended with your database name in the final pom.xml, so you do not need to specify that in the configuration)

Next, you need to manually create the database in MySQL
Note: (the execution path for sql-maven-plugin is not working to create database - I worked on it but could not get it to cooperate)
 mysql -u <user> -p
 mysql> create database helloWorld;
 mysql> \q

cd helloWorld
mvn generate-sources ## This will generate the OM layer and SQL code for creating the corresponding database tables
mvn sql:execute       ## This executes the SQL code to create the schema
mvn jetty:run         ## Now you can launch your new Turbine application

Open a web browser to http://localhost:8081/app
------------------

Thanks,
Jeffery


On 10/21/2016 02:28 AM, Thomas Vandahl wrote:
Hi Jeffrey,

On 20.10.16 21:49, Jeffery Painter wrote:
FYI

I removed intake references from componentConfiguration.xml,
containerConfiguration.xml and TurbineResources.properties and it start
up fine, but that does not seem like the best solution. I would like to
continue to use intake :-)
Georg found out that the current fulcrum-intake does not work on Java8.
There is something wrong with the JAXB support. I need to investigate
this. In the meantime, you may run your application on Java7 if that is
an option.

Sorry for the trouble.
Bye, Thomas.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Index: src/main/resources/META-INF/maven/archetype-metadata.xml
===================================================================
--- src/main/resources/META-INF/maven/archetype-metadata.xml	(revision 1765863)
+++ src/main/resources/META-INF/maven/archetype-metadata.xml	(working copy)
@@ -39,6 +39,18 @@
     <requiredProperty key="turbine_database_jndipath">
       <defaultValue>java:comp/env/jdbc/Turbine</defaultValue>
     </requiredProperty>
+    <requiredProperty key="turbine_database_driver">
+      <defaultValue>com.mysql.jdbc.Driver</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="turbine_database_url">
+      <defaultValue>jdbc:mysql://localhost:3306/</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="turbine_database_user">
+      <defaultValue>db_user</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="turbine_database_password">
+      <defaultValue>db_password</defaultValue>
+    </requiredProperty>
   </requiredProperties>
 
   <fileSets>
Index: src/main/resources/archetype-resources/pom.xml
===================================================================
--- src/main/resources/archetype-resources/pom.xml	(revision 1765863)
+++ src/main/resources/archetype-resources/pom.xml	(working copy)
@@ -1,237 +1,292 @@
 <?xml version="1.0" encoding="UTF-8"?>
 #*
 Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
+or more
+contributor license agreements. See the NOTICE file
+distributed with this
+work for additional information
+regarding copyright ownership. The ASF
+licenses this file
 to you 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
+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
+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
+specific
+language governing permissions and limitations
 under the License.
 *#
 #set($dollar = '$')
 #macro (var $label)${dollar}{${label}}#end
 <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/maven-v4_0_0.xsd";>
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
 
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>${package}</groupId>
-    <artifactId>${artifactId}</artifactId>
-    <version>${version}</version>
-    <packaging>war</packaging>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>${package}</groupId>
+	<artifactId>${artifactId}</artifactId>
+	<version>${version}</version>
+	<packaging>war</packaging>
 
-    <name>${turbine_app_name}</name>
+	<name>${turbine_app_name}</name>
 
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.properties</include>
-                </includes>
-            </resource>
-            <resource>
-                <targetPath>#var("project.build.directory")/torque/schema</targetPath>
-                <filtering>true</filtering>
-                <directory>src/main/torque-schema</directory>
-                <includes>
-                    <include>*.xml</include>
-                </includes>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.5.1</version>
-                <configuration>
-                    <source>${maven.compile.source}</source>
-                    <target>${maven.compile.target}</target>
-                    <encoding>${project.build.sourceEncoding}</encoding>
-                </configuration>
-            </plugin>
-            
-             <plugin>
-                <groupId>org.apache.torque</groupId>
-                <artifactId>torque-maven-plugin</artifactId>
-                <version>4.0</version>
-                <configuration>
-                    <schemaDir>#var("basedir")/src/main/torque-schema</schemaDir>
-                    <useClasspath>true</useClasspath>
-                    <runOnlyOnSchemaChange>false</runOnlyOnSchemaChange>
-                    <targetDatabase>mysql</targetDatabase>
-                </configuration>
-                <executions>
-                 <execution>
-                    <id>torque-om</id>
-                    <phase>generate-sources</phase>
-                    <goals>
-                      <goal>generate</goal>
-                    </goals>
-                    <configuration>
-                      <packaging>classpath</packaging>
-                      <configPackage>org.apache.torque.templates.om</configPackage>
-                      <sourceDir>#var("basedir")/src/main/torque-schema</sourceDir>
-                      <loglevel>error</loglevel>
-                      <options>
-                        <torque.database>mysql</torque.database>
-                        <torque.om.package>${package}.om</torque.om.package>
-                        <torque.om.addGetByNameMethods>false</torque.om.addGetByNameMethods>
-                        <torque.om.save.saveException>TorqueException</torque.om.save.saveException>
-                        <torque.om.useIsForBooleanGetters>true</torque.om.useIsForBooleanGetters>
-                        <torque.om.useManagers>false</torque.om.useManagers>
-                        <torque.om.addTimeStamp>true</torque.om.addTimeStamp>
-                        <torque.om.objectIsCaching>true</torque.om.objectIsCaching>
-                        <torque.om.save.addSaveMethods>true</torque.om.save.addSaveMethods>
-                        <torque.om.addGetByNameMethods>true</torque.om.addGetByNameMethods>
-                        <torque.om.complexObjectModel>true</torque.om.complexObjectModel>                        
-                      </options>
-                      <outputDirMap>
-                        <modifiable>#var("project.build.sourceDirectory")</modifiable>
-                      </outputDirMap>
-                    </configuration>
-                  </execution>
-                  <execution>
-                    <id>torque-sql-${turbine_database_adapter}</id>
-                    <phase>package</phase>
-                    <goals>
-                      <goal>generate</goal>
-                    </goals>
-                    <configuration>
-                      <packaging>classpath</packaging>
-                      <configPackage>org.apache.torque.templates.sql</configPackage>
-                      <sourceDir>#var("basedir")/src/main/torque-schema</sourceDir>
-                      <defaultOutputDir>#var("project.build.directory")/generated-sql/torque/${turbine_database_adapter}</defaultOutputDir>
-                      <defaultOutputDirUsage>none</defaultOutputDirUsage>
-                      <loglevel>error</loglevel>
-                      <options>
-                        <torque.database>${turbine_database_adapter}</torque.database>
-                      </options>
-                    </configuration>
-                  </execution>
-                </executions>
-                <dependencies>
-                  <dependency>
-                    <groupId>org.apache.torque</groupId>
-                    <artifactId>torque-templates</artifactId>
-                    <version>4.0</version>
-                  </dependency>
-                </dependencies>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-war-plugin</artifactId>
-                 <version>2.3</version>
-                <configuration>
-                    <archive>
-                        <manifestEntries>
-                            <X-Compile-Source-JDK>#var("maven.compile.source")</X-Compile-Source-JDK>
-                            <X-Compile-Target-JDK>#var("maven.compile.target")</X-Compile-Target-JDK>
-                        </manifestEntries>
-                    </archive>
-                    <!-- containerConfigXML>WEB-INF/build/context.xml</containerConfigXML -->
-                </configuration>
-            </plugin>
-            
-            <!-- jetty:run checks deployed war http://localhost:8081/app/ 
-            
-            Using jetty 8 as supporting java 6. Other specs cft. http://www.eclipse.org/jetty/documentation/9.3.0.v20150612/what-jetty-version.html
-            -->
-            <plugin>
-               <groupId>org.mortbay.jetty</groupId>
-               <artifactId>jetty-maven-plugin</artifactId>
-               <version>8.1.16.v20140903</version>
-              <configuration>
-                <scanIntervalSeconds>10</scanIntervalSeconds>
-                <dumpOnStart>true</dumpOnStart>
-                <connectors>
-                <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
-                  <port>8081</port>
-                </connector>
-                </connectors>
-                <!--webApp>
-                  <contextPath>/app</contextPath>
-                </webApp-->
-              </configuration>
-            </plugin>
-        </plugins>
-    </build>
+	<build>
+		<resources>
+			<resource>
+				<directory>src/main/java</directory>
+				<includes>
+					<include>**/*.properties</include>
+				</includes>
+			</resource>
+			<resource>
+				<targetPath>#var("project.build.directory")/torque/schema</targetPath>
+				<filtering>true</filtering>
+				<directory>src/main/torque-schema</directory>
+				<includes>
+					<include>*.xml</include>
+				</includes>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.5.1</version>
+				<configuration>
+					<source>${maven.compile.source}</source>
+					<target>${maven.compile.target}</target>
+					<encoding>${project.build.sourceEncoding}</encoding>
+				</configuration>
+			</plugin>
 
-    <dependencies>
-        <dependency>
-            <groupId>javax.activation</groupId>
-            <artifactId>activation</artifactId>
-            <version>1.1.1</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.mail</groupId>
-            <artifactId>mail</artifactId>
-            <version>1.4.5</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>2.5</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.turbine</groupId>
-            <artifactId>turbine</artifactId>
-            <version>4.0-M2</version>
-        </dependency>
-        <!-- yaafi is optional. NOTICE: 1.0.7 has group org.apache.turbine not org.apache.fulcrum  -->
-        <dependency>
-          <groupId>org.apache.turbine</groupId>
-          <artifactId>fulcrum-yaafi</artifactId>
-          <version>1.0.7</version>
-        </dependency>
-        <!-- if using intake -->
-        <dependency>
-          <groupId>org.apache.fulcrum</groupId>
-          <artifactId>fulcrum-intake</artifactId>
-          <version>1.2.0</version>
-         </dependency>
-         <!-- include some optional dependencies required in example componentConfiguration.xml -->
-        <dependency>
-          <groupId>org.apache.fulcrum</groupId>
-          <artifactId>fulcrum-cache</artifactId>
-          <version>1.1.0</version>
-        </dependency>
-         <dependency>
-          <groupId>org.apache.fulcrum</groupId>
-          <artifactId>fulcrum-upload</artifactId>
-          <version>1.0.5</version>
-        </dependency>
-        <dependency>
-          <groupId>org.apache.fulcrum</groupId>
-          <artifactId>fulcrum-security-memory</artifactId>
-          <version>1.1.0</version>
-        </dependency>
-         <dependency>             
-            <groupId>org.apache.fulcrum</groupId>
-            <artifactId>fulcrum-security-torque</artifactId>
-            <version>1.1.0</version>
-        </dependency>	
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.11</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+			<plugin>
+				<groupId>org.apache.torque</groupId>
+				<artifactId>torque-maven-plugin</artifactId>
+				<version>4.0</version>
+				<configuration>
+					<schemaDir>#var("basedir")/src/main/torque-schema</schemaDir>
+					<useClasspath>true</useClasspath>
+					<runOnlyOnSchemaChange>false</runOnlyOnSchemaChange>
+					<targetDatabase>mysql</targetDatabase>
+				</configuration>
+				<executions>
+					<execution>
+						<id>torque-om</id>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+						<configuration>
+							<packaging>classpath</packaging>
+							<configPackage>org.apache.torque.templates.om</configPackage>
+							<sourceDir>#var("basedir")/src/main/torque-schema</sourceDir>
+							<loglevel>error</loglevel>
+							<options>
+								<torque.database>${turbine_database_adapter}</torque.database>
+								<torque.om.package>${package}.om</torque.om.package>
+								<torque.om.addGetByNameMethods>false</torque.om.addGetByNameMethods>
+								<torque.om.save.saveException>TorqueException</torque.om.save.saveException>
+								<torque.om.useIsForBooleanGetters>true</torque.om.useIsForBooleanGetters>
+								<torque.om.useManagers>false</torque.om.useManagers>
+								<torque.om.addTimeStamp>true</torque.om.addTimeStamp>
+								<torque.om.objectIsCaching>true</torque.om.objectIsCaching>
+								<torque.om.save.addSaveMethods>true</torque.om.save.addSaveMethods>
+								<torque.om.addGetByNameMethods>true</torque.om.addGetByNameMethods>
+								<torque.om.complexObjectModel>true</torque.om.complexObjectModel>
+							</options>
+							<outputDirMap>
+								<modifiable>#var("project.build.sourceDirectory")</modifiable>
+							</outputDirMap>
+						</configuration>
+					</execution>
+					<execution>
+						<id>torque-sql-${turbine_database_adapter}</id>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>generate</goal>
+						</goals>
+						<configuration>
+							<packaging>classpath</packaging>
+							<configPackage>org.apache.torque.templates.sql</configPackage>
+							<sourceDir>#var("basedir")/src/main/torque-schema</sourceDir>
+							<defaultOutputDir>#var("project.build.directory")/generated-sql/torque/${turbine_database_adapter}</defaultOutputDir>
+							<defaultOutputDirUsage>none</defaultOutputDirUsage>
+							<loglevel>error</loglevel>
+							<options>
+								<torque.database>${turbine_database_adapter}</torque.database>
+							</options>
+						</configuration>
+					</execution>
+				</executions>
+				<dependencies>
+					<dependency>
+						<groupId>org.apache.torque</groupId>
+						<artifactId>torque-templates</artifactId>
+						<version>4.0</version>
+					</dependency>
+				</dependencies>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.3</version>
+				<configuration>
+					<archive>
+						<manifestEntries>
+							<X-Compile-Source-JDK>#var("maven.compile.source")</X-Compile-Source-JDK>
+							<X-Compile-Target-JDK>#var("maven.compile.target")</X-Compile-Target-JDK>
+						</manifestEntries>
+					</archive>
+					<!-- containerConfigXML>WEB-INF/build/context.xml</containerConfigXML -->
+				</configuration>
+			</plugin>
 
-    <properties>
-        <maven.compile.source>1.6</maven.compile.source>
-        <maven.compile.target>1.6</maven.compile.target>
-        <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
-    </properties>
+			<!-- Required to execute torque database build -->
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>sql-maven-plugin</artifactId>
+				<version>1.5</version>
+				<configuration>
+
+					<!-- Please update with your database configuration -->
+					<driver>${turbine_database_driver}</driver>
+					<url>${turbine_database_url}${turbine_database_name}</url>
+					<username>${turbine_database_user}</username>
+					<password>${turbine_database_password}</password>
+					<onError>continue</onError>
+					<autocommit>true</autocommit>
+					<fileset>
+						<basedir>${project.build.directory}/generated-sql/torque/${turbine_database_adapter}</basedir>
+						<!-- basedir>${basedir}/target/generated-sql</basedir -->
+						<includes>
+							<include>*.sql</include>
+						</includes>
+					</fileset>
+				</configuration>
+
+				<executions>
+					<execution>
+						<id>create-database</id>
+						<phase>application-setup</phase>
+						<goals>
+							<goal>execute</goal>
+						</goals>
+						<configuration>
+							<onError>continue</onError>
+							<autocommit>true</autocommit>
+							<!-- drop/create the database -->
+							<sqlCommand>DROP DATABASE ${turbine_database_name} IF EXISTS</sqlCommand>
+							<sqlCommand>CREATE DATABASE ${turbine_database_name}</sqlCommand>
+						</configuration>
+					</execution>
+				</executions>
+
+				<!-- update with your database driver dependency -->
+				<dependencies>
+					<dependency>
+						<artifactId>mysql-connector-java</artifactId>
+						<groupId>mysql</groupId>
+						<version>5.1.40</version>
+					</dependency>
+				</dependencies>
+
+			</plugin>
+
+			<!-- jetty:run checks deployed war http://localhost:8081/app/ Using jetty 
+				8 as supporting java 6. Other specs cft. http://www.eclipse.org/jetty/documentation/9.3.0.v20150612/what-jetty-version.html -->
+			<plugin>
+				<groupId>org.mortbay.jetty</groupId>
+				<artifactId>jetty-maven-plugin</artifactId>
+				<version>8.1.16.v20140903</version>
+				<configuration>
+					<scanIntervalSeconds>10</scanIntervalSeconds>
+					<dumpOnStart>true</dumpOnStart>
+					<connectors>
+						<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
+							<port>8081</port>
+						</connector>
+					</connectors>
+					<!--webApp> <contextPath>/app</contextPath> </webApp -->
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>javax.activation</groupId>
+			<artifactId>activation</artifactId>
+			<version>1.1.1</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.mail</groupId>
+			<artifactId>mail</artifactId>
+			<version>1.4.5</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.turbine</groupId>
+			<artifactId>turbine</artifactId>
+			<version>4.0-M2</version>
+		</dependency>
+		<!-- yaafi is optional. NOTICE: 1.0.7 has group org.apache.turbine not 
+			org.apache.fulcrum -->
+		<dependency>
+			<groupId>org.apache.turbine</groupId>
+			<artifactId>fulcrum-yaafi</artifactId>
+			<version>1.0.7</version>
+		</dependency>
+		<!-- if using intake -->
+		<dependency>
+			<groupId>org.apache.fulcrum</groupId>
+			<artifactId>fulcrum-intake</artifactId>
+			<version>1.2.0</version>
+		</dependency>
+		<!-- include some optional dependencies required in example componentConfiguration.xml -->
+		<dependency>
+			<groupId>org.apache.fulcrum</groupId>
+			<artifactId>fulcrum-cache</artifactId>
+			<version>1.1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.fulcrum</groupId>
+			<artifactId>fulcrum-upload</artifactId>
+			<version>1.0.5</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.fulcrum</groupId>
+			<artifactId>fulcrum-security-memory</artifactId>
+			<version>1.1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.fulcrum</groupId>
+			<artifactId>fulcrum-security-torque</artifactId>
+			<version>1.1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.11</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+
+	<properties>
+		<maven.compile.source>1.6</maven.compile.source>
+		<maven.compile.target>1.6</maven.compile.target>
+		<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
+	</properties>
 </project>
Index: src/main/resources/archetype-resources/src/main/java/modules/screens/Index.java
===================================================================
--- src/main/resources/archetype-resources/src/main/java/modules/screens/Index.java	(revision 1765863)
+++ src/main/resources/archetype-resources/src/main/java/modules/screens/Index.java	(working copy)
@@ -20,9 +20,9 @@
 
 import org.apache.turbine.pipeline.PipelineData;
 import org.apache.velocity.context.Context;
-
 import org.apache.turbine.modules.screens.VelocitySecureScreen;
 
+
 /**
  * This class provides the data required for displaying content in the
  * Velocity page. 
Index: src/main/resources/archetype-resources/src/main/torque-schema/application-data.dtd
===================================================================
--- src/main/resources/archetype-resources/src/main/torque-schema/application-data.dtd	(nonexistent)
+++ src/main/resources/archetype-resources/src/main/torque-schema/application-data.dtd	(working copy)
@@ -0,0 +1,33 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<!ELEMENT Author EMPTY>
+<!ATTLIST Author
+    AuthId CDATA #REQUIRED
+    FirstName CDATA #REQUIRED
+    LastName CDATA #REQUIRED
+>
+
+<!ELEMENT Book EMPTY>
+<!ATTLIST Book
+    BookId CDATA #REQUIRED
+    AuthId CDATA #REQUIRED
+    Title CDATA #REQUIRED
+    Subject CDATA #REQUIRED
+>

Property changes on: src/main/resources/archetype-resources/src/main/torque-schema/application-data.dtd
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/src/main/torque-schema/application-data.xml
===================================================================
--- src/main/resources/archetype-resources/src/main/torque-schema/application-data.xml	(revision 1765863)
+++ src/main/resources/archetype-resources/src/main/torque-schema/application-data.xml	(working copy)
@@ -27,5 +27,16 @@
 <!--                                                                                 -->
 <!-- =============================================================================== -->
 
-<dataset name="all"/>
+<dataset name="all">
 
+	<Author AuthId="1" FirstName="Stephen" LastName="King"/>
+	<Author AuthId="2" FirstName="Isaac" LastName="Newton"/>
+	<Author AuthId="3" FirstName="Erich" LastName="Gamma"/>
+	<Author AuthId="4" FirstName="Donald" LastName="Knuth"/>
+	
+	<Book BookId="1" AuthId="1" Title="Pet Cemetary" Subject="Horror"/>
+	<Book BookId="2" AuthId="2" Title="Principia" Subject="Physics"/>
+	<Book BookId="3" AuthId="3" Title="Design Patterns: Elements of Reusable Object-Oriented Software" Subject="Computer Science"/>
+	<Book BookId="3" AuthId="4" Title="The Art of Computer Programming" Subject="Computer Science"/>
+
+</dataset>	
\ No newline at end of file
Index: src/main/resources/archetype-resources/src/main/torque-schema/application-schema.xml
===================================================================
--- src/main/resources/archetype-resources/src/main/torque-schema/application-schema.xml	(revision 1765863)
+++ src/main/resources/archetype-resources/src/main/torque-schema/application-schema.xml	(working copy)
@@ -17,20 +17,37 @@
  specific language governing permissions and limitations
  under the License.
 *#
-<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd";>
 
 <!-- ============================================================================== -->
 <!--                                                                                -->
 <!--  Database Definition for the Application                                       -->
 <!--                                                                                -->
-<!--  @version $Id: application-schema.xml 615328 2008-01-25 20:25:05Z tv $  -->
+<!--  @version $Id: application-schema.xml                                          -->
 <!--                                                                                -->
 <!-- ============================================================================== -->
 
-<database name="${turbine_database_name}">
-    <table name="table1" idMethod="idbroker">
-        <column name="test_col1" type="INTEGER" />
-        <column name="test_col2" type="VARCHAR" size="10" />
-        <!-- Add your database schema here -->
-    </table>
+<database xmlns="http://db.apache.org/torque/4.0/templates/database";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://db.apache.org/torque/4.0/templates/database
+        http://db.apache.org/torque/4.0/templates/database-strict.xsd";
+  name="${turbine_database_name}"
+  defaultIdMethod="native">
+
+
+	<!--  Simple author/book database example -->
+	<table name="AUTHOR" idMethod="idbroker">
+		<column name="AUTH_ID"     required="true" primaryKey="true" type="INTEGER" />
+		<column name="FIRST_NAME"  required="true" size="64" type="VARCHAR" />
+		<column name="LAST_NAME"   required="true" size="64" type="VARCHAR" />
+	</table>
+
+    <table name="BOOK" idMethod="idbroker">
+		<column name="BOOK_ID"     required="true" primaryKey="true" type="INTEGER" />
+		<column name="AUTH_ID"     required="true" type="INTEGER" />
+		<column name="TITLE"       required="true" size="64" type="VARCHAR" />
+		<column name="SUBJECT"     required="true" size="64" type="VARCHAR" />
+		<foreign-key foreignTable="AUTHOR">
+			<reference local="AUTH_ID" foreign="AUTH_ID"></reference>
+		</foreign-key>		
+	</table>
 </database>
Index: src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/Torque.properties
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/Torque.properties	(revision 1765863)
+++ src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/Torque.properties	(working copy)
@@ -36,7 +36,9 @@
 # -------------------------------------------------------------------
 
 torque.database.default=${turbine_database_name}
-torque.database.turbine.adapter=${turbine_database_adapter}
+torque.database.${turbine_database_name}.adapter=${turbine_database_adapter}
+torque.database.${turbine_database_name}.user=${turbine_database_user}
+torque.database.${turbine_database_name}.password=${turbine_database_password}
 
 # Using JNDI
 torque.dsfactory.${turbine_database_name}.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
Index: src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties	(revision 1765863)
+++ src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/TurbineResources.properties	(working copy)
@@ -341,7 +341,6 @@
 # that depend on other services during initialization.
 # -------------------------------------------------------------------
 services.AvalonComponentService.classname=org.apache.turbine.services.avaloncomponent.TurbineYaafiComponentService
-
 services.RunDataService.classname=org.apache.turbine.services.rundata.TurbineRunDataService
 services.ServletService.classname=org.apache.turbine.services.servlet.TurbineServletService
 services.AssemblerBrokerService.classname=org.apache.turbine.services.assemblerbroker.TurbineAssemblerBrokerService
@@ -373,7 +372,6 @@
 # A list of AssemblerFactory classes that will be registered
 # with TurbineAssemblerBrokerService
 # -------------------------------------------------------------------
-
 services.AssemblerBrokerService.screen=org.apache.turbine.services.assemblerbroker.util.java.JavaScreenFactory
 services.AssemblerBrokerService.action=org.apache.turbine.services.assemblerbroker.util.java.JavaActionFactory
 services.AssemblerBrokerService.layout=org.apache.turbine.services.assemblerbroker.util.java.JavaLayoutFactory
@@ -487,8 +485,12 @@
 # requests.  Any data stored using this tool will be stored in the session.
 tool.session.sessionData=org.apache.turbine.services.pull.util.SessionData
 
+#
+# Note that intake is currently not availabe if you are deploying with Java 8 until
+# some issues can be resolved
+# 
 # These are intake tools.
-tool.request.intake=org.apache.turbine.services.intake.IntakeTool
+# tool.request.intake=org.apache.turbine.services.intake.IntakeTool
 
 # This is a tool that allows access to the scheduler service.
 # tool.request.scheduler=org.apache.turbine.services.SchedulerTool
Index: src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/componentConfiguration.xml
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/componentConfiguration.xml	(revision 1765863)
+++ src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/componentConfiguration.xml	(working copy)
@@ -37,6 +37,9 @@
         <bundle>${package}.L10N</bundle>
       </bundles>
     </localization>
+    
+    <!--  The Intake service requires Java 7 to run -->
+    <!--
     <intake>
       <serialDataPath>WEB-INF/appData.ser</serialDataPath>
       <xmlPaths>
@@ -43,6 +46,9 @@
         <xmlPath>WEB-INF/conf/${turbine_intake_file}</xmlPath>
       </xmlPaths>
     </intake>
+    -->
+    
+    
     <factory/>
     <pool/>
     <parser>
Index: src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/intake.xml
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/intake.xml	(revision 1765863)
+++ src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/intake.xml	(working copy)
@@ -28,7 +28,8 @@
 
 <input-data xmlns="http://turbine.apache.org/schema/intake/4.0";
     basePackage="${package}.">
-    <group name="example" key="example" mapToObject="om.Table1">
-        <field name="TestCol2" key="testCol2" type="String"/>
+    <group name="example" key="example" mapToObject="om.Author">
+        <field name="FirstName" key="firstName" type="String"/>
+        <field name="LastName" key="lastName" type="String"/>
     </group>
 </input-data>
Index: src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/roleConfiguration.xml
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/roleConfiguration.xml	(revision 1765863)
+++ src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/roleConfiguration.xml	(working copy)
@@ -44,11 +44,13 @@
         shorthand="localization"
         default-class="org.apache.fulcrum.localization.DefaultLocalizationService"/>
 
+	<!--  The Intake service requires Java 7 to run -->
+	<!-- 
     <role
         name="org.apache.fulcrum.intake.IntakeService"
         shorthand="intake"
         default-class="org.apache.fulcrum.intake.IntakeServiceImpl"/>
-
+ 	-->
     <role
         name="org.apache.fulcrum.factory.FactoryService"
         shorthand="factory"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to