Hi Thomas,

I spent several hours working on cleaning up a bit more to make this a little more friendly "out of the box" when someone invokes the archetype.

It was a personal preference to move the torque schema files up to root level "application-schema" directory. Feel free to reject that change if you do not like it.

I updated the Torque properties to use shared data pool which is simpler to config for new starters I think than the JNDI config. I still cannot get the sample data to populate. Any help there would be appreciated.


I have also updated my quick start guide:

--------------------------
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=ipsys \
    -Dturbine_database_password=ip2002 \
    -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

To work in eclipse:
 mvn eclipse:eclipse

then you can import project into eclipse (use existing directory)
Next, update the project to be managed by maven -> right click on project -> Configure -> Convert to maven project

Then you can select the run configuration "Run On Server" if you have a container configured with your eclipse environment.
--------------------------


Thanks,
Jeffery



On 10/21/2016 12:45 PM, Jeffery Painter wrote:
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]




---------------------------------------------------------------------
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 1766153)
+++ 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>
@@ -50,7 +62,7 @@
       </includes>
     </fileSet>
     <fileSet filtered="true" packaged="false" encoding="UTF-8">
-      <directory>src/main/torque-schema</directory>
+      <directory>application-schema</directory>
       <includes>
         <include>**/*.xml</include>
       </includes>
Index: src/main/resources/archetype-resources/application-schema/application-data.dtd
===================================================================
--- src/main/resources/archetype-resources/application-schema/application-data.dtd	(nonexistent)
+++ src/main/resources/archetype-resources/application-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/application-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/application-schema/application-data.xml
===================================================================
--- src/main/resources/archetype-resources/application-schema/application-data.xml	(nonexistent)
+++ src/main/resources/archetype-resources/application-schema/application-data.xml	(working copy)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+#*
+ 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.
+*#
+<!DOCTYPE dataset SYSTEM "file://application-data.dtd">
+
+<!-- =============================================================================== -->
+<!--                                                                                 -->
+<!-- Application Data in XML. Add your custom values to this file                    -->
+<!--                                                                                 -->
+<!-- @version $Id: application-data.xml 615328 2008-01-25 20:25:05Z tv $ -->
+<!--                                                                                 -->
+<!-- =============================================================================== -->
+
+<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

Property changes on: src/main/resources/archetype-resources/application-schema/application-data.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/application-schema/application-schema.xml
===================================================================
--- src/main/resources/archetype-resources/application-schema/application-schema.xml	(nonexistent)
+++ src/main/resources/archetype-resources/application-schema/application-schema.xml	(working copy)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+#*
+ 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.
+*#
+
+<!-- ============================================================================== -->
+<!--                                                                                -->
+<!--  Database Definition for the Application                                       -->
+<!--                                                                                -->
+<!--  @version $Id: application-schema.xml                                          -->
+<!--                                                                                -->
+<!-- ============================================================================== -->
+
+<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>

Property changes on: src/main/resources/archetype-resources/application-schema/application-schema.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/application-schema/id-table-schema.xml
===================================================================
--- src/main/resources/archetype-resources/application-schema/id-table-schema.xml	(nonexistent)
+++ src/main/resources/archetype-resources/application-schema/id-table-schema.xml	(working copy)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<!--
+ 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.
+-->
+<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd";>
+
+<!-- ========================================================================= -->
+<!--                                                                           -->
+<!-- Table definition for the ID Broker Table used by Torque                   -->
+<!--                                                                           -->
+<!-- @version $Id: id-table-schema.xml 615328 2008-01-25 20:25:05Z tv $ -->
+<!--                                                                           -->
+<!-- ========================================================================= -->
+
+<database name="@DATABASE_DEFAULT@"
+  defaultIdMethod="idbroker"
+  defaultJavaType="primitive"
+  defaultJavaNamingMethod="underscore"
+  package="@DATABASE_PACKAGE@">
+  <table name="ID_TABLE" idMethod="idbroker">
+    <column name="ID_TABLE_ID" required="true" primaryKey="true" type="INTEGER" javaName="IdTableId"/>
+    <column name="TABLE_NAME" required="true" size="255" type="VARCHAR" javaName="TableName"/>
+    <column name="NEXT_ID" required="true" type="INTEGER" javaName="NextId"/>
+    <column name="QUANTITY" required="true" type="INTEGER" javaName="Quantity"/>
+
+    <unique>
+      <unique-column name="TABLE_NAME"/>
+    </unique>
+
+  </table>
+</database>

Property changes on: src/main/resources/archetype-resources/application-schema/id-table-schema.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/application-schema/torque-security-data.xml
===================================================================
--- src/main/resources/archetype-resources/application-schema/torque-security-data.xml	(nonexistent)
+++ src/main/resources/archetype-resources/application-schema/torque-security-data.xml	(working copy)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+#*
+ 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.
+*#
+<!DOCTYPE dataset SYSTEM "file://torque-security-data.dtd">
+
+<!-- =============================================================================== -->
+<!--                                                                                 -->
+<!-- Default Values for Admin and normal User                                        -->
+<!--                                                                                 -->
+<!-- @version $Id: turbine-security-data.xml 615328 2008-01-25 20:25:05Z tv $ -->
+<!--                                                                                 -->
+<!-- =============================================================================== -->
+
+<dataset name="all">
+
+  <TurbineUser UserId="1"
+               UserName="admin"
+               Password="password"
+               FirstName=""
+               LastName="Admin"/>
+
+  <TurbineUser UserId="2"
+               UserName="user"
+               Password="password"
+               FirstName=""
+               LastName="User"/>
+
+  <!-- Turbine Permissions -->
+
+  <TurbinePermission PermissionId="1" Name="TurbineAdmin"/>
+  <TurbinePermission PermissionId="2" Name="Turbine"/>
+
+  <!-- Turbine Roles -->
+
+  <TurbineRole RoleId="1" Name="TurbineAdmin"/>
+  <TurbineRole RoleId="2" Name="TurbineUser"/>
+
+ <!-- Turbine Groups -->
+
+  <TurbineGroup GroupId="1" Name="global"/>
+  <TurbineGroup GroupId="2" Name="Turbine"/>
+
+  <TurbineRolePermission RoleId="1" PermissionId="1"/>
+  <TurbineRolePermission RoleId="2" PermissionId="2"/>
+
+  <!-- Associate Users, Groups, and Roles -->
+
+  <TurbineUserGroupRole UserId="1" GroupId="2" RoleId="1"/>
+  <TurbineUserGroupRole UserId="2" GroupId="2" RoleId="2"/>
+
+</dataset>

Property changes on: src/main/resources/archetype-resources/application-schema/torque-security-data.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/application-schema/torque-security-schema.xml
===================================================================
--- src/main/resources/archetype-resources/application-schema/torque-security-schema.xml	(nonexistent)
+++ src/main/resources/archetype-resources/application-schema/torque-security-schema.xml	(working copy)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<!--
+ 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.
+-->
+<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd";>
+
+<!-- ======================================================================== -->
+<!--                                                                          -->
+<!--  Turbine Torque based Security Service Schema                            -->
+<!--                                                                          -->
+<!-- $Id: turbine-security-schema.xml 615328 2008-01-25 20:25:05Z tv $ -->
+<!--                                                                          -->
+<!-- ======================================================================== -->
+
+<database name="${turbine_database_name}">
+
+  <table name="TURBINE_PERMISSION" idMethod="idbroker">
+    <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER"/>
+    <column name="PERMISSION_NAME" required="true" size="64" type="VARCHAR" javaName="Name"/>
+
+    <unique>
+      <unique-column name="PERMISSION_NAME"/>
+    </unique>
+
+  </table>
+
+  <table name="TURBINE_ROLE" idMethod="idbroker">
+    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
+    <column name="ROLE_NAME" required="true" size="64" type="VARCHAR" javaName="Name"/>
+
+    <unique>
+        <unique-column name="ROLE_NAME"/>
+    </unique>
+
+  </table>
+
+  <table name="TURBINE_GROUP" idMethod="idbroker">
+    <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER"/>
+    <column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="Name"/>
+
+    <unique>
+        <unique-column name="GROUP_NAME"/>
+    </unique>
+
+  </table>
+
+  <table name="TURBINE_ROLE_PERMISSION">
+    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
+    <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER"/>
+
+    <foreign-key foreignTable="TURBINE_ROLE">
+      <reference local="ROLE_ID" foreign="ROLE_ID"/>
+    </foreign-key>
+
+    <foreign-key foreignTable="TURBINE_PERMISSION">
+      <reference local="PERMISSION_ID" foreign="PERMISSION_ID"/>
+    </foreign-key>
+  </table>
+
+  <table name="TURBINE_USER" idMethod="idbroker">
+    <column name="USER_ID" required="true" primaryKey="true" type="INTEGER"/>
+    <column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="UserName"/>
+    <column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
+    <column name="FIRST_NAME" required="true" size="64" type="VARCHAR"/>
+    <column name="LAST_NAME" required="true" size="64" type="VARCHAR"/>
+    <column name="EMAIL" size="64" type="VARCHAR"/>
+    <column name="CONFIRM_VALUE" size="16" type="VARCHAR" javaName="Confirmed"/>
+    <column name="MODIFIED_DATE" type="TIMESTAMP" javaName="ModifiedDate"/>
+    <column name="CREATED" type="TIMESTAMP" javaName="CreateDate"/>
+    <column name="LAST_LOGIN" type="TIMESTAMP"/>
+    <column name="OBJECTDATA" type="VARBINARY"/>
+
+    <unique>
+        <unique-column name="LOGIN_NAME"/>
+    </unique>
+
+  </table>
+
+  <table name="TURBINE_USER_GROUP_ROLE">
+    <column name="USER_ID" required="true" primaryKey="true" type="INTEGER"/>
+    <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER"/>
+    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
+
+    <foreign-key foreignTable="TURBINE_USER">
+      <reference local="USER_ID" foreign="USER_ID"/>
+    </foreign-key>
+
+    <foreign-key foreignTable="TURBINE_GROUP">
+      <reference local="GROUP_ID" foreign="GROUP_ID"/>
+    </foreign-key>
+
+    <foreign-key foreignTable="TURBINE_ROLE">
+      <reference local="ROLE_ID" foreign="ROLE_ID"/>
+    </foreign-key>
+  </table>
+
+</database>

Property changes on: src/main/resources/archetype-resources/application-schema/torque-security-schema.xml
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/pom.xml
===================================================================
--- src/main/resources/archetype-resources/pom.xml	(revision 1766153)
+++ src/main/resources/archetype-resources/pom.xml	(working copy)
@@ -1,237 +1,301 @@
 <?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>application-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")/application-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")/application-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>
+
+				<!--  This is not being called during mvn sql:execute / not sure why -->
+				<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>
+
+		<!-- update with the database driver of your choice -->
+		<dependency>
+			<artifactId>mysql-connector-java</artifactId>
+			<groupId>mysql</groupId>
+			<version>5.1.40</version>
+		</dependency>
+	
+		<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/actions/SecureAction.java
===================================================================
--- src/main/resources/archetype-resources/src/main/java/modules/actions/SecureAction.java	(nonexistent)
+++ src/main/resources/archetype-resources/src/main/java/modules/actions/SecureAction.java	(working copy)
@@ -0,0 +1,84 @@
+package ${package}.modules.actions;
+
+#*
+* 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.
+*#
+
+import org.apache.fulcrum.security.SecurityService;
+import org.apache.fulcrum.security.model.turbine.TurbineAccessControlListImpl;
+import org.apache.turbine.modules.actions.VelocitySecureAction;
+import org.apache.turbine.om.security.User;
+import org.apache.turbine.pipeline.PipelineData;
+import org.apache.velocity.context.Context;
+
+/**
+ * Velocity Secure action.
+ *
+ * Always performs a Security Check that you've defined before executing the
+ * doBuildtemplate().
+ */
+public class SecureAction extends VelocitySecureAction {
+
+	protected SecurityService securityService;
+
+	/**
+	 * This currently only checks to make sure that user is allowed to view the
+	 * storage area. If you create an action that requires more security then
+	 * override this method.
+	 *
+	 * @param data
+	 *            Turbine information.
+	 * @return True if the user is authorized to access the screen.
+	 * @exception Exception,
+	 *                a generic exception.
+	 */
+	@Override
+	protected boolean isAuthorized(PipelineData data) throws Exception {
+
+		boolean isAuthorized = false;
+
+		// Who is our current user?
+		User user = getRunData(data).getUser();
+
+		// Get the Turbine ACL implementation
+		TurbineAccessControlListImpl acl = (TurbineAccessControlListImpl) getRunData(data).getACL();
+
+		if (acl == null || !acl.hasRole("TurbineAdmin")) {
+			getRunData(data).setMessage("You do not have permission to access this action");
+			isAuthorized = false;
+		} else if (acl.hasRole("admin")) {
+			isAuthorized = true;
+		}
+
+		return isAuthorized;
+	}
+
+	/**
+	 * Implement this to add information to the context.
+	 *
+	 * @param data
+	 *            Turbine information.
+	 * @param context
+	 *            Context for web pages.
+	 * @exception Exception,
+	 *                a generic exception.
+	 */
+	public void doPerform(PipelineData data, Context context) throws Exception {
+
+	}
+}

Property changes on: src/main/resources/archetype-resources/src/main/java/modules/actions/SecureAction.java
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
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 1766153)
+++ 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/java/modules/screens/SecureScreen.java
===================================================================
--- src/main/resources/archetype-resources/src/main/java/modules/screens/SecureScreen.java	(nonexistent)
+++ src/main/resources/archetype-resources/src/main/java/modules/screens/SecureScreen.java	(working copy)
@@ -0,0 +1,77 @@
+package ${package}.modules.screens;
+
+#*
+* 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.
+*#
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.turbine.Turbine;
+import org.apache.turbine.modules.screens.VelocitySecureScreen;
+import org.apache.turbine.om.security.User;
+import org.apache.turbine.pipeline.PipelineData;
+import org.apache.turbine.services.TurbineServices;
+import org.apache.turbine.services.security.SecurityService;
+import org.apache.turbine.services.security.TurbineSecurity;
+import org.apache.fulcrum.security.acl.AccessControlList;
+import org.apache.fulcrum.security.model.turbine.TurbineAccessControlListImpl;
+import org.apache.velocity.context.Context;
+
+/**
+ * This class provides a sample implementation for creating a secured screen
+ */
+public class SecureScreen extends VelocitySecureScreen {
+	// create an instance of the logging facility
+	private static Log log = LogFactory.getLog(SecureScreen.class);
+
+	protected SecurityService securityService;
+
+	@Override
+	protected boolean isAuthorized(PipelineData data) throws Exception {
+		boolean isAuthorized = false;
+
+		// Load the security service
+		securityService = (SecurityService) TurbineServices.getInstance().getService(SecurityService.SERVICE_NAME);
+
+		// Who is our current user?
+		User user = getRunData(data).getUser();
+
+		// Get the Turbine ACL implementation
+		TurbineAccessControlListImpl acl = (TurbineAccessControlListImpl) getRunData(data).getACL();
+
+		if (acl == null) {
+			getRunData(data).setScreenTemplate(Turbine.getConfiguration().getString("template.login"));
+			isAuthorized = false;
+		} else if (acl.hasRole("TurbineAdmin")) {
+			isAuthorized = true;
+		} else {
+			getRunData(data).setScreenTemplate(Turbine.getConfiguration().getString("template.home"));
+			getRunData(data).setMessage("You do not have access to this part of the site.");
+			isAuthorized = false;
+		}
+		return isAuthorized;
+	}
+
+	@Override
+	protected void doBuildTemplate(PipelineData data, Context context) throws Exception {
+		// TODO Auto-generated method stub
+
+	}
+
+}

Property changes on: src/main/resources/archetype-resources/src/main/java/modules/screens/SecureScreen.java
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/src/main/java/modules/screens/TestSecure.java
===================================================================
--- src/main/resources/archetype-resources/src/main/java/modules/screens/TestSecure.java	(nonexistent)
+++ src/main/resources/archetype-resources/src/main/java/modules/screens/TestSecure.java	(working copy)
@@ -0,0 +1,15 @@
+package com.mycompany.webapp.modules.screens;
+
+import org.apache.turbine.pipeline.PipelineData;
+import org.apache.velocity.context.Context;
+
+public class TestSecure extends SecureScreen {
+
+	@Override
+	protected void doBuildTemplate(PipelineData data, Context context) throws Exception {
+
+		// if we are authorized, this should display
+		getRunData(data).setMessage("It works!");
+		
+	}
+}

Property changes on: src/main/resources/archetype-resources/src/main/java/modules/screens/TestSecure.java
___________________________________________________________________
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 1766153)
+++ src/main/resources/archetype-resources/src/main/torque-schema/application-data.xml	(nonexistent)
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-#*
- 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.
-*#
-<!DOCTYPE dataset SYSTEM "file://application-data.dtd">
-
-<!-- =============================================================================== -->
-<!--                                                                                 -->
-<!-- Application Data in XML. Add your custom values to this file                    -->
-<!--                                                                                 -->
-<!-- @version $Id: application-data.xml 615328 2008-01-25 20:25:05Z tv $ -->
-<!--                                                                                 -->
-<!-- =============================================================================== -->
-
-<dataset name="all"/>
-

Property changes on: src/main/resources/archetype-resources/src/main/torque-schema/application-data.xml
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
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 1766153)
+++ src/main/resources/archetype-resources/src/main/torque-schema/application-schema.xml	(nonexistent)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-#*
- 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.
-*#
-<!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 $  -->
-<!--                                                                                -->
-<!-- ============================================================================== -->
-
-<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>

Property changes on: src/main/resources/archetype-resources/src/main/torque-schema/application-schema.xml
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/src/main/torque-schema/id-table-schema.xml
===================================================================
--- src/main/resources/archetype-resources/src/main/torque-schema/id-table-schema.xml	(revision 1766153)
+++ src/main/resources/archetype-resources/src/main/torque-schema/id-table-schema.xml	(nonexistent)
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-<!--
- 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.
--->
-<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd";>
-
-<!-- ========================================================================= -->
-<!--                                                                           -->
-<!-- Table definition for the ID Broker Table used by Torque                   -->
-<!--                                                                           -->
-<!-- @version $Id: id-table-schema.xml 615328 2008-01-25 20:25:05Z tv $ -->
-<!--                                                                           -->
-<!-- ========================================================================= -->
-
-<database name="@DATABASE_DEFAULT@"
-  defaultIdMethod="idbroker"
-  defaultJavaType="primitive"
-  defaultJavaNamingMethod="underscore"
-  package="@DATABASE_PACKAGE@">
-  <table name="ID_TABLE" idMethod="idbroker">
-    <column name="ID_TABLE_ID" required="true" primaryKey="true" type="INTEGER" javaName="IdTableId"/>
-    <column name="TABLE_NAME" required="true" size="255" type="VARCHAR" javaName="TableName"/>
-    <column name="NEXT_ID" required="true" type="INTEGER" javaName="NextId"/>
-    <column name="QUANTITY" required="true" type="INTEGER" javaName="Quantity"/>
-
-    <unique>
-      <unique-column name="TABLE_NAME"/>
-    </unique>
-
-  </table>
-</database>

Property changes on: src/main/resources/archetype-resources/src/main/torque-schema/id-table-schema.xml
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/src/main/torque-schema/torque-security-data.xml
===================================================================
--- src/main/resources/archetype-resources/src/main/torque-schema/torque-security-data.xml	(revision 1766153)
+++ src/main/resources/archetype-resources/src/main/torque-schema/torque-security-data.xml	(nonexistent)
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-#*
- 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.
-*#
-<!DOCTYPE dataset SYSTEM "file://torque-security-data.dtd">
-
-<!-- =============================================================================== -->
-<!--                                                                                 -->
-<!-- Default Values for Admin and normal User                                        -->
-<!--                                                                                 -->
-<!-- @version $Id: turbine-security-data.xml 615328 2008-01-25 20:25:05Z tv $ -->
-<!--                                                                                 -->
-<!-- =============================================================================== -->
-
-<dataset name="all">
-
-  <TurbineUser UserId="1"
-               UserName="admin"
-               Password="password"
-               FirstName=""
-               LastName="Admin"/>
-
-  <TurbineUser UserId="2"
-               UserName="user"
-               Password="password"
-               FirstName=""
-               LastName="User"/>
-
-  <!-- Turbine Permissions -->
-
-  <TurbinePermission PermissionId="1" Name="TurbineAdmin"/>
-  <TurbinePermission PermissionId="2" Name="Turbine"/>
-
-  <!-- Turbine Roles -->
-
-  <TurbineRole RoleId="1" Name="TurbineAdmin"/>
-  <TurbineRole RoleId="2" Name="TurbineUser"/>
-
- <!-- Turbine Groups -->
-
-  <TurbineGroup GroupId="1" Name="global"/>
-  <TurbineGroup GroupId="2" Name="Turbine"/>
-
-  <TurbineRolePermission RoleId="1" PermissionId="1"/>
-  <TurbineRolePermission RoleId="2" PermissionId="2"/>
-
-  <!-- Associate Users, Groups, and Roles -->
-
-  <TurbineUserGroupRole UserId="1" GroupId="2" RoleId="1"/>
-  <TurbineUserGroupRole UserId="2" GroupId="2" RoleId="2"/>
-
-</dataset>

Property changes on: src/main/resources/archetype-resources/src/main/torque-schema/torque-security-data.xml
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: src/main/resources/archetype-resources/src/main/torque-schema/torque-security-schema.xml
===================================================================
--- src/main/resources/archetype-resources/src/main/torque-schema/torque-security-schema.xml	(revision 1766153)
+++ src/main/resources/archetype-resources/src/main/torque-schema/torque-security-schema.xml	(nonexistent)
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-<!--
- 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.
--->
-<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd";>
-
-<!-- ======================================================================== -->
-<!--                                                                          -->
-<!--  Turbine Torque based Security Service Schema                            -->
-<!--                                                                          -->
-<!-- $Id: turbine-security-schema.xml 615328 2008-01-25 20:25:05Z tv $ -->
-<!--                                                                          -->
-<!-- ======================================================================== -->
-
-<database name="${turbine_database_name}">
-
-  <table name="TURBINE_PERMISSION" idMethod="idbroker">
-    <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="PERMISSION_NAME" required="true" size="64" type="VARCHAR" javaName="Name"/>
-
-    <unique>
-      <unique-column name="PERMISSION_NAME"/>
-    </unique>
-
-  </table>
-
-  <table name="TURBINE_ROLE" idMethod="idbroker">
-    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="ROLE_NAME" required="true" size="64" type="VARCHAR" javaName="Name"/>
-
-    <unique>
-        <unique-column name="ROLE_NAME"/>
-    </unique>
-
-  </table>
-
-  <table name="TURBINE_GROUP" idMethod="idbroker">
-    <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="Name"/>
-
-    <unique>
-        <unique-column name="GROUP_NAME"/>
-    </unique>
-
-  </table>
-
-  <table name="TURBINE_ROLE_PERMISSION">
-    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER"/>
-
-    <foreign-key foreignTable="TURBINE_ROLE">
-      <reference local="ROLE_ID" foreign="ROLE_ID"/>
-    </foreign-key>
-
-    <foreign-key foreignTable="TURBINE_PERMISSION">
-      <reference local="PERMISSION_ID" foreign="PERMISSION_ID"/>
-    </foreign-key>
-  </table>
-
-  <table name="TURBINE_USER" idMethod="idbroker">
-    <column name="USER_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="UserName"/>
-    <column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
-    <column name="FIRST_NAME" required="true" size="64" type="VARCHAR"/>
-    <column name="LAST_NAME" required="true" size="64" type="VARCHAR"/>
-    <column name="EMAIL" size="64" type="VARCHAR"/>
-    <column name="CONFIRM_VALUE" size="16" type="VARCHAR" javaName="Confirmed"/>
-    <column name="MODIFIEDDATE" type="TIMESTAMP" javaName="ModifiedDate"/>
-    <column name="CREATED" type="TIMESTAMP" javaName="CreateDate"/>
-    <column name="LAST_LOGIN" type="TIMESTAMP"/>
-    <column name="OBJECTDATA" type="VARBINARY"/>
-
-    <unique>
-        <unique-column name="LOGIN_NAME"/>
-    </unique>
-
-  </table>
-
-  <table name="TURBINE_USER_GROUP_ROLE">
-    <column name="USER_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER"/>
-    <column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
-
-    <foreign-key foreignTable="TURBINE_USER">
-      <reference local="USER_ID" foreign="USER_ID"/>
-    </foreign-key>
-
-    <foreign-key foreignTable="TURBINE_GROUP">
-      <reference local="GROUP_ID" foreign="GROUP_ID"/>
-    </foreign-key>
-
-    <foreign-key foreignTable="TURBINE_ROLE">
-      <reference local="ROLE_ID" foreign="ROLE_ID"/>
-    </foreign-key>
-  </table>
-
-</database>

Property changes on: src/main/resources/archetype-resources/src/main/torque-schema/torque-security-schema.xml
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
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 1766153)
+++ src/main/resources/archetype-resources/src/main/webapp/WEB-INF/conf/Torque.properties	(working copy)
@@ -35,21 +35,85 @@
 # configure these properly.
 # -------------------------------------------------------------------
 
+#
+# For JNDI configuration please see: https://db.apache.org/torque/torque-4.0/documentation/orm-reference/initialisation-configuration.html
+# 
+#
+#torque.dsfactory.${turbine_database_name}.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
+#torque.dsfactory.${turbine_database_name}.jndi.path=${turbine_database_jndipath}
+#torque.dsfactory.${turbine_database_name}.jndi.ttl=300000
+
+#
+# Shared Pool Data Source Factory
+#
 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
-torque.dsfactory.${turbine_database_name}.jndi.path=${turbine_database_jndipath}
-torque.dsfactory.${turbine_database_name}.jndi.ttl=300000
+torque.defaults.pool.maxActive =       	30
+torque.defaults.pool.testOnBorrow =    	true
+torque.defaults.pool.validationQuery = 	SELECT 1
 
+torque.defaults.connection.driver =    	${turbine_database_driver}
+torque.defaults.connection.url =       	${turbine_database_url}/${turbine_database_name}
+torque.defaults.connection.user =      	${turbine_database_user}
+torque.defaults.connection.password =  	${turbine_database_password}
+
+torque.dsfactory.${turbine_database_name}.connection.driver =    	${turbine_database_driver}
+torque.dsfactory.${turbine_database_name}.connection.url =       	${turbine_database_url}/${turbine_database_name}
+torque.dsfactory.${turbine_database_name}.connection.user =      	${turbine_database_user}
+torque.dsfactory.${turbine_database_name}.connection.password =  	${turbine_database_password}
+torque.dsfactory.${turbine_database_name}.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
+
 # Determines if the quantity column of the IDBroker's id_table should
 # be increased automatically if requests for ids reaches a high
 # volume.
 
-torque.idbroker.cleverquantity=true
+torque.idbroker.cleverquantity=false
 
 # Determines whether the managers cache instances of the business objects.
 # And also whether the MethodResultCache will really cache results.
+torque.manager.useCache = true
 
-torque.manager.useCache = true
+# Determines if IDBroker should prefetch IDs or not.  If set to false
+# this property has the effect of shutting off the housekeeping thread
+# that attempts to prefetch the id's.  It also sets the # of id's grabbed
+# per request to 1 regardless of the settings in the database.
+# Default: true
+torque.idbroker.prefetch = true
+
+# Controls the starting id of table entries when creating SQL for 
+# the id-table. If you have two projects that use the same id-table 
+# in the same database with different tables, make sure that they have 
+# different initialID settings and the ranges (initialID is incremented 
+# for every new table) don't overlap.
+torque.idbroker.initialId = 101 
+
+# The start value of the ID broker for supplying IDs to Torque. This value 
+# is incremented every time Torque requests ID keys from the broker. If you 
+# pre-load your table straight from SQL, make sure that you don't accidentially 
+# overlap with this setting, because Torque doesn't keep record of what IDs are 
+# already taken in the database. If you overlap, inserting new objects will fail 
+# because the ID assigned by Torque is already taken.
+torque.idBroker.initialIdValue = 100
+
+# For performance reasons, the ID Broker does not request a single ID at a time
+# but fetches a whole range and increments the current next ID Value in the ID
+# Table by this step. If you have to do lots of inserts straight in a row, increment
+# this value to get slightly better performance.
+torque.idbroker.initialIdStep = 500
+
+# IDBroker can grab its own connection from the pool to use when retrieving
+# more id's to minimize the amount of time ID_TABLE will be locked.
+# Some usage of IDBroker or assumptions made by connection pools or jdbc
+# drivers may disallow this optimization in which case the property
+# should be set to false.
+torque.idbroker.usenewconnection = true
+
+torque.database.default=${turbine_database_name}
+
+
+
+
+
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 1766153)
+++ 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 1766153)
+++ 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 1766153)
+++ 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 1766153)
+++ 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"
Index: src/main/resources/archetype-resources/src/main/webapp/templates/layouts/Default.vm
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/templates/layouts/Default.vm	(revision 1766153)
+++ src/main/resources/archetype-resources/src/main/webapp/templates/layouts/Default.vm	(working copy)
@@ -14,16 +14,45 @@
 ## KIND, either express or implied.  See the License for the
 ## specific language governing permissions and limitations
 ## under the License.
+
+<!DOCTYPE html>
 <html>
-#TurbineHtmlHead()
-<body #TurbineHtmlBodyAttributes() >
-  <table bgcolor="$ui.bgcolor" width="100%">
-    <tr>
-      <td>&nbsp;</td>
-       <td align="right"><img src="$ui.image('turbine-project.png')"/></td>
-    </tr>
-  </table>
-$screen_placeholder
-  <img src="$ui.image('powered-by-logo.gif')"/>
+
+<head>
+	<title>Apache Turbine Sample Application</title>
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+	<link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css"; type="text/css" />
+	<link rel="stylesheet" href="http://www.w3schools.com/lib/w3-theme-blue-grey.css"; type="text/css" />
+</head>
+
+<body class="w3-theme-l4">
+	
+	<div class="w3-wrapper">
+	
+		<!-- Header -->
+		<header class="w3-container w3-center w3-padding-32 w3-theme">	
+			<img class="w3-right" src="$ui.image('turbine-project.png')" /> 
+			#if ( $data.getUser().hasLoggedIn() ) 
+				#set ( $u = $data.getUser() )
+				<div class="w3-right">
+					<h5>Hello $!u.FirstName</h5>
+				</div>
+			#end
+		</header>
+	
+			<!-- menu -->
+			$navigation.setTemplate("/Menu.vm") <br />
+	
+			<!--  content -->
+			<div class="w3-left w3-padding" id="content">
+				$screen_placeholder
+			</div>
+
+			<!-- Footer -->
+			<footer class="w3-bottom">
+				<p>Powered by <img src="$ui.image('powered-by-logo.gif')"/></p>
+			</footer>
+	</div>
+	
 </body>
 </html>
Index: src/main/resources/archetype-resources/src/main/webapp/templates/navigations/Menu.vm
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/templates/navigations/Menu.vm	(nonexistent)
+++ src/main/resources/archetype-resources/src/main/webapp/templates/navigations/Menu.vm	(working copy)
@@ -0,0 +1,45 @@
+## 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.
+
+
+#if ( $data.getUser().hasLoggedIn() )
+<nav class="w3-navbar w3-theme">
+	  <li><a  href="$link.setPage("Index.vm")">Home</a></li>
+	  <li class="w3-dropdown-hover">
+	    <a href="#">Administration <i class="fa fa-caret-down"></i></a>
+	    <div class="w3-dropdown-content w3-white w3-card-4">
+	      ## every user can change their password
+          <a href="$link.setPage("user,Password.vm")">Update Password <i class="fa fa-unlock"></i></a>
+          
+          #if ( $data.getACL().hasRole("admin") )
+	      <a href="$link.setPage("user,FluxUserList.vm")">User List <div class="w3-right"><i class="fa fa-users"></i></div></a>
+	      <a href="$link.setPage("role,FluxRoleList.vm")">User Roles <div class="w3-right"><i class="fa fa-user-plus"></i></div></a>
+	      <a href="$link.setPage("user,FluxUserForm.vm")?mode=insert">Add User <div class="w3-right"><i class="fa fa-user"></i></div></a>
+	      #end
+	    </div>
+	  </li>
+
+	  <li class="w3-right"><a href="$link.setAction("LogoutUser")">Logout</a></li>
+</nav>
+#else
+<nav class="w3-navbar w3-theme">
+	  <li><a  href="$link.setPage("Index.vm")">Home</a></li>
+	  <li class="w3-right"><a href="$link.setPage("Login.vm")">Login</a></li>
+</nav>
+
+#end
+
Index: src/main/resources/archetype-resources/src/main/webapp/templates/screens/Index.vm
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/templates/screens/Index.vm	(revision 1766153)
+++ src/main/resources/archetype-resources/src/main/webapp/templates/screens/Index.vm	(working copy)
@@ -15,27 +15,24 @@
 ## specific language governing permissions and limitations
 ## under the License.
 
-<div align="center"><h1>$success</h1></div>
+#if ( $data.getMessage() )
+	#info( $data.getMessage() )
+#end
 
-You're now successfully running a <a
-href="http://turbine.apache.org/";>Turbine</a> based
-application, deployed to <font color="red">$data.ServerData.ContextPath</a></font> on
-your web container.<p/>
+	<div align="center"><h1>$success</h1></div>
 
-You can (and should!) change or remove this page at any time. It is
-intended to give you immediate feedback if you just deployed an newly
-setup Turbine application.</p>
+	<p>
+		You're now successfully running a <a href="http://turbine.apache.org/";>Turbine</a> based
+		application, deployed to <font color="red">$data.ServerData.ContextPath</a></font> on
+		your web container.
+	</p>
+	
+	<p>
+		You can (and should!) change or remove this page at any time. It is
+		intended to give you immediate feedback if you just deployed an newly
+		setup Turbine application.
+	</p>
 
-Login here
 
-<form method="post" enctype="application/x-www-form-urlencoded" name="loginForm" id="loginForm">
-  <fieldset>
-    <legend>Login</legend>
-    <input name="action" type="hidden" value="LoginUser">
-   <label for="username">Username</label>
-    <input type="text" id="username" name="username" value="" tabindex="1" autocomplete="off" autofocus="">
-    <label for="password">Password</label>
-    <input type="password" id="password" name="password" value="" tabindex="2" autocomplete="off"> 
-    <input type="submit" id="submitLogin" value="Login" tabindex="3">
- </fieldset>
-</form>
+
+	<a href="$link.setPage("TestSecure.vm")">Test a secure access page</a>
\ No newline at end of file
Index: src/main/resources/archetype-resources/src/main/webapp/templates/screens/Login.vm
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/templates/screens/Login.vm	(revision 1766153)
+++ src/main/resources/archetype-resources/src/main/webapp/templates/screens/Login.vm	(working copy)
@@ -15,14 +15,49 @@
 ## specific language governing permissions and limitations
 ## under the License.
 
-<div align="center"><h1>Welcome </h1></div>
-User created : $data.user.createDate
-User lastLogin : $data.user.lastLogin
-<form method="post" name="logoutForm" id="logoutForm">
-  <fieldset>
-    <legend>Logout</legend>
-    <input name="action" type="hidden" value="LogoutUser">
-    <input type="submit" id="submitLogout" value="Logout" tabindex="1">
- </fieldset>
-</form>
+##
+## If you want to use intake to process the data, uncomment below
+##
 
+## #set ( $loginGroup = $intake.Login.Default )
+##  
+## #if (!$loginGroup.Username.isValid() ) 
+## 	#info( "$loginGroup.Username.Message" )
+## #end
+## 
+## #if ( !$loginGroup.Password.isValid() ) 
+## 	#info("$loginGroup.Password.Message" )
+## #end
+
+<p/>
+
+<div class="w3-display-middle w3-card-12 w3-center" style="width: 45%">
+	<form class="w3-container w3-card-4 w3-light-grey" name="login" method="post" action="$link.setAction("LoginUser")">
+		<h2>Please Login</h2>
+		
+		<p>
+			<!--  input class="w3-input w3-border" style="margin: auto; width: 200px;" placeholder="Username" type="text" name="$loginGroup.Username.Key" value="$!loginGroup.Username" -->
+			<input class="w3-input w3-border" style="margin: auto; width: 200px;" placeholder="Username" type="text" name="username" value="">
+		</p>
+
+		<p>
+			<input class="w3-input w3-border" style="margin: auto; width: 200px;" placeholder="Password" type="password" name="password" value="">
+		</p>
+
+		<button type="submit" name="submit" id="submit" value="eventSubmit_doPerform" class="w3-ripple">Sign in</button>
+			
+		<p/>
+		
+		#if($data.getMessage())
+			#info( $data.getMessage() )
+			<br/> 
+		#end 
+
+	</form>
+
+</div>
+
+## $intake.declareGroups()
+
+
+
Index: src/main/resources/archetype-resources/src/main/webapp/templates/screens/TestSecure.vm
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/templates/screens/TestSecure.vm	(nonexistent)
+++ src/main/resources/archetype-resources/src/main/webapp/templates/screens/TestSecure.vm	(working copy)
@@ -0,0 +1,5 @@
+#if ( $data.getMessage() )
+	#info( $data.getMessage() )
+#end
+
+<h1> Secured Access Page </h1>
Index: src/main/resources/archetype-resources/src/main/webapp/templates/screens/user/Password.vm
===================================================================
--- src/main/resources/archetype-resources/src/main/webapp/templates/screens/user/Password.vm	(nonexistent)
+++ src/main/resources/archetype-resources/src/main/webapp/templates/screens/user/Password.vm	(working copy)
@@ -0,0 +1,37 @@
+
+#if ( $success )
+	#if ( $data.getMessage() )
+		#info( $data.getMessage() )
+	#end
+#else
+
+	<script language="javascript">
+	    function setFocus() {
+	        document.update.old_password.focus();
+	    }
+	</script>
+
+
+	#if ( $data.getMessage() )
+		$data.getMessage()
+	#end
+
+	    <div align="center">
+        <form name="update" method="post" action="$link.setAction("UpdatePassword").setPage("user,Password.vm")">
+          <table cellspacing="0" cellpadding="2">
+            <tr>
+              #formCell( "Old Password: " "old_password" "" )
+            </tr>
+            <tr>
+              #formPasswordCell("New Password: " "password" "" )
+            </tr>
+            <tr>
+              <td colspan="2" align="center">
+                    <input type="submit" name="eventSubmit_doUpdate" value="Update Password"/>
+              </td>
+            </tr>
+          </table>
+        </form>
+    	</div>
+
+#end

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

Reply via email to