db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1188480 [3/3] - in /db/torque/torque4/trunk: maven-torque-generator-plugin/ maven-torque-generator-plugin/src/main/java/org/apache/torque/generator/maven/ maven-torque-generator-plugin/src/test/java/org/apache/torque/generator/maven/ torqu...
Date Tue, 25 Oct 2011 01:23:06 GMT
Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/src/source2.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/src/source2.properties?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/src/source2.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/src/source2.properties Tue Oct 25 01:23:02 2011
@@ -0,0 +1,25 @@
+# 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.
+#
+fileName = source2.properties
+fromDir = existingTargetStrategyTest.mergeStrategy
+otherPropertyName1 = propertyValue1
+otherPropertyWhichWasInsertedLater = insertedValue
+otherPropertyName2 = propertyValue2
+otherPropertyName3 = propertyValue3
+otherPropertyWhichIsModifiedLater = modifiedValueInNormalSourceDir
+otherPropertyName4 = propertyValue4

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/templates/propertiesCopy.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/templates/propertiesCopy.vm?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/templates/propertiesCopy.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/templates/propertiesCopy.vm Tue Oct 25 01:23:02 2011
@@ -0,0 +1,18 @@
+## 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.
+##
+$torqueGen.mergepoint("properties")
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/templates/propertyCopy.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/templates/propertyCopy.vm?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/templates/propertyCopy.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/mergeStrategy/src/main/torque-gen/templates/propertyCopy.vm Tue Oct 25 01:23:02 2011
@@ -0,0 +1,18 @@
+## 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.
+##
+$key = ${value}

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/package.html
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/package.html?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/package.html (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/package.html Tue Oct 25 01:23:02 2011
@@ -0,0 +1,23 @@
+<!--
+ Copyright 2001-2006 The Apache Software Foundation.
+
+ Licensed 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.
+-->
+
+<h2>Test configuration for the ExistingTargetStrategyTest</h2>
+
+<p>
+  This directory and its subdirectories contain a test directory
+  structure to test the ExistingTargetStrategy class. It is used from the
+  ExistingTargetStrategyTest class.
+</p>

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/conf/control.xml?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/conf/control.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/conf/control.xml Tue Oct 25 01:23:02 2011
@@ -0,0 +1,39 @@
+<?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
+ 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.
+-->
+
+<control
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/4.0/generator/configuration http://db.apache.org/torque/4.0/generator/configuration.xsd"
+    xmlns="http://db.apache.org/torque/4.0/generator/configuration"
+    loglevel="debug">
+  <output name="output1" file="output1.txt">
+    <source xsi:type="fileSource" elements="properties">
+      <include>source1.properties</include>
+    </source>
+    <outlet name="org.apache.torque.generator.velocity.propertiesCopy" />
+  </output>
+  <output name="output2" file="output2.txt" existingTargetStrategy="replace" outputDirKey="outputDirKey2">
+    <source xsi:type="fileSource" elements="properties">
+      <include>source2.properties</include>
+    </source>
+    <outlet name="org.apache.torque.generator.velocity.propertiesCopy" />
+  </output>
+</control>
+  
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/outlets/output.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/outlets/output.xml?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/outlets/output.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/outlets/output.xml Tue Oct 25 01:23:02 2011
@@ -0,0 +1,35 @@
+<?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
+ 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.
+-->
+
+<outlets xmlns="http://db.apache.org/torque/4.0/generator/configuration"
+    xsi:schemaLocation="http://db.apache.org/torque/4.0/generator/configuration http://db.apache.org/torque/4.0/generator/configuration.xsd"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <outlet name="org.apache.torque.generator.velocity.propertiesCopy"
+      xsi:type="velocityOutlet" 
+      path="propertiesCopy.vm">
+    <mergepoint name="properties">
+      <action xsi:type="traverseAllAction" element="entry" 
+          outlet="org.apache.torque.generator.velocity.propertyCopy"/>
+    </mergepoint>
+  </outlet>
+  <outlet name="org.apache.torque.generator.velocity.propertyCopy"
+      xsi:type="velocityOutlet" 
+      path="propertyCopy.vm"/>
+</outlets>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/src/source1.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/src/source1.properties?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/src/source1.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/src/source1.properties Tue Oct 25 01:23:02 2011
@@ -0,0 +1,25 @@
+# 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.
+#
+fileName = source2.properties
+fromDir = existingTargetStrategyTest.replaceStrategy
+propertyName1 = propertyValue1
+propertyWhichWasInsertedLater = insertedValue
+propertyName2 = propertyValue2
+propertyName3 = propertyValue3
+propertyWhichIsModifiedLater = modifiedValue
+propertyName4 = propertyValue4

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/src/source2.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/src/source2.properties?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/src/source2.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/src/source2.properties Tue Oct 25 01:23:02 2011
@@ -0,0 +1,25 @@
+# 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.
+#
+fileName = source2.properties
+fromDir = existingTargetStrategyTest.replaceStrategy
+otherPropertyName1 = propertyValue1
+otherPropertyWhichWasInsertedLater = insertedValue
+otherPropertyName2 = propertyValue2
+otherPropertyName3 = propertyValue3
+otherPropertyWhichIsModifiedLater = modifiedValue
+otherPropertyName4 = propertyValue4

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/templates/propertiesCopy.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/templates/propertiesCopy.vm?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/templates/propertiesCopy.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/templates/propertiesCopy.vm Tue Oct 25 01:23:02 2011
@@ -0,0 +1,18 @@
+## 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.
+##
+$torqueGen.mergepoint("properties")
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/templates/propertyCopy.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/templates/propertyCopy.vm?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/templates/propertyCopy.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/replaceStrategy/src/main/torque-gen/templates/propertyCopy.vm Tue Oct 25 01:23:02 2011
@@ -0,0 +1,18 @@
+## 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.
+##
+$key = ${value}

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/conf/control.xml?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/conf/control.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/conf/control.xml Tue Oct 25 01:23:02 2011
@@ -0,0 +1,39 @@
+<?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
+ 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.
+-->
+
+<control
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/4.0/generator/configuration http://db.apache.org/torque/4.0/generator/configuration.xsd"
+    xmlns="http://db.apache.org/torque/4.0/generator/configuration"
+    loglevel="debug">
+  <output name="output1" file="output1.txt" existingTargetStrategy="skip">
+    <source xsi:type="fileSource" elements="properties">
+      <include>source1.properties</include>
+    </source>
+    <outlet name="org.apache.torque.generator.velocity.propertiesCopy" />
+  </output>
+  <output name="output2" file="output2.txt" existingTargetStrategy="skip" outputDirKey="outputDirKey2">
+    <source xsi:type="fileSource" elements="properties">
+      <include>source2.properties</include>
+    </source>
+    <outlet name="org.apache.torque.generator.velocity.propertiesCopy" />
+  </output>
+</control>
+  
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/outlets/output.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/outlets/output.xml?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/outlets/output.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/outlets/output.xml Tue Oct 25 01:23:02 2011
@@ -0,0 +1,35 @@
+<?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
+ 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.
+-->
+
+<outlets xmlns="http://db.apache.org/torque/4.0/generator/configuration"
+    xsi:schemaLocation="http://db.apache.org/torque/4.0/generator/configuration http://db.apache.org/torque/4.0/generator/configuration.xsd"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <outlet name="org.apache.torque.generator.velocity.propertiesCopy"
+      xsi:type="velocityOutlet" 
+      path="propertiesCopy.vm">
+    <mergepoint name="properties">
+      <action xsi:type="traverseAllAction" element="entry" 
+          outlet="org.apache.torque.generator.velocity.propertyCopy"/>
+    </mergepoint>
+  </outlet>
+  <outlet name="org.apache.torque.generator.velocity.propertyCopy"
+      xsi:type="velocityOutlet" 
+      path="propertyCopy.vm"/>
+</outlets>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/src/source1.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/src/source1.properties?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/src/source1.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/src/source1.properties Tue Oct 25 01:23:02 2011
@@ -0,0 +1,25 @@
+# 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.
+#
+fileName = source2.properties
+fromDir = existingTargetStrategyTest.skipStrategy
+propertyName1 = propertyValue1
+propertyWhichWasInsertedLater = insertedValue
+propertyName2 = propertyValue2
+propertyName3 = propertyValue3
+propertyWhichIsModifiedLater = modifiedValue
+propertyName4 = propertyValue4

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/src/source2.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/src/source2.properties?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/src/source2.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/src/source2.properties Tue Oct 25 01:23:02 2011
@@ -0,0 +1,25 @@
+# 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.
+#
+fileName = source2.properties
+fromDir = existingTargetStrategyTest.skipStrategy
+otherPropertyName1 = propertyValue1
+otherPropertyWhichWasInsertedLater = insertedValue
+otherPropertyName2 = propertyValue2
+otherPropertyName3 = propertyValue3
+otherPropertyWhichIsModifiedLater = modifiedValue
+otherPropertyName4 = propertyValue4

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/templates/propertiesCopy.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/templates/propertiesCopy.vm?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/templates/propertiesCopy.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/templates/propertiesCopy.vm Tue Oct 25 01:23:02 2011
@@ -0,0 +1,18 @@
+## 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.
+##
+$torqueGen.mergepoint("properties")
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/templates/propertyCopy.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/templates/propertyCopy.vm?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/templates/propertyCopy.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/existingTargetStrategy/skipStrategy/src/main/torque-gen/templates/propertyCopy.vm Tue Oct 25 01:23:02 2011
@@ -0,0 +1,18 @@
+## 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.
+##
+$key = ${value}

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ClasspathConfigurationProviderTest.java Tue Oct 25 01:23:02 2011
@@ -22,6 +22,8 @@ package org.apache.torque.generator.conf
 import static org.junit.Assert.assertArrayEquals;
 
 import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
@@ -44,12 +46,14 @@ public class ClasspathConfigurationProvi
     @Before
     public void before()
     {
+        Map<String, File> outputDirMap = new HashMap<String, File>();
+        outputDirMap.put(null, new File("generated-sources"));
         ProjectPaths projectPaths = new CustomProjectPaths(
                 null,
                 "org.apache.torque.generator.test.readfromclasspath",
                 new File("src"),
-                new File("target"),
-                new File("generated-sources"));
+                outputDirMap,
+                new File("work"));
 
         classpathConfigurationProvider = new ClasspathConfigurationProvider(
                 projectPaths,

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/ReadConfigurationTest.java Tue Oct 25 01:23:02 2011
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -106,18 +107,27 @@ public class ReadConfigurationTest exten
                         unitDescriptor,
                         configurationHandlers);
         {
-            File newFileTargetDirectory
-                    = unitConfiguration.getNewFileTargetDirectory();
+            File defaultTargetDirectory
+                    = unitConfiguration.getOutputDirectory(null);
             File expected = new File(
                     "src/test/configuration/target/generated-sources");
-            assertEquals(expected, newFileTargetDirectory);
+            assertEquals(expected, defaultTargetDirectory);
         }
         {
-            File modifiedFileTargetDirectory
-                    = unitConfiguration.getModifiedFileTargetDirectory();
+            File modifiableTargetDirectory
+                    = unitConfiguration.getOutputDirectory("modifiable");
             File expected = new File(
-                    "src/test/configuration/src/main/generated-sources");
-            assertEquals(expected, modifiedFileTargetDirectory);
+                    "src/test/configuration/src/main/generated-java");
+            assertEquals(expected, modifiableTargetDirectory);
+        }
+        try
+        {
+            unitConfiguration.getOutputDirectory("notExistingKey");
+            fail("Exception expected");
+        }
+        catch (IllegalStateException e)
+        {
+            // expected
         }
 
         assertEquals(Loglevel.DEBUG, unitConfiguration.getLoglevel());
@@ -171,8 +181,15 @@ public class ReadConfigurationTest exten
             {
                 Output output = outputFiles.get(0);
                 assertEquals(
-                        output.getName(),
-                        new QualifiedName("org.apache.torque.generator.firstOutput"));
+                        new QualifiedName("org.apache.torque.generator.firstOutput"),
+                        output.getName());
+                assertEquals(
+                        "skip",
+                        output.getExistingTargetStrategy());
+                assertEquals(
+                        null,
+                        output.getOutputDirKey());
+                assertNull(output.getFilename());
 
                 {
                     OutletReference outletConfiguration
@@ -183,9 +200,6 @@ public class ReadConfigurationTest exten
                             outletConfiguration.getName());
                 }
 
-                assertNull(output.getFilename());
-                assertTrue(output.isSkipIfExists());
-
                 {
                     JavaOutlet filenameOutlet
                             = (JavaOutlet) output.getFilenameOutlet();
@@ -223,8 +237,15 @@ public class ReadConfigurationTest exten
             {
                 Output output = outputFiles.get(1);
                 assertEquals(
-                        output.getName(),
-                        new QualifiedName("secondOutput"));
+                        new QualifiedName("secondOutput"),
+                        output.getName());
+                assertEquals(
+                        "replace",
+                        output.getExistingTargetStrategy());
+                assertEquals(
+                        "secondOutputDirKey",
+                        output.getOutputDirKey());
+                assertNull(output.getFilename());
 
                 {
                     OutletReference outletConfiguration
@@ -235,10 +256,6 @@ public class ReadConfigurationTest exten
                             outletConfiguration.getName());
                 }
 
-
-                assertNull(output.getFilename());
-                assertFalse(output.isSkipIfExists());
-
                 {
                     VelocityOutlet filenameOutlet
                             = (VelocityOutlet) output.getFilenameOutlet();
@@ -306,8 +323,16 @@ public class ReadConfigurationTest exten
             {
                 Output output = outputFiles.get(2);
                 assertEquals(
-                        output.getName(),
-                        new QualifiedName("thirdOutput"));
+                        new QualifiedName("thirdOutput"),
+                        output.getName());
+                assertEquals(
+                        "append",
+                        output.getExistingTargetStrategy());
+                assertEquals(
+                        "thirdOutputDirKey",
+                        output.getOutputDirKey());
+                assertEquals("outputFileName", output.getFilename());
+                assertNull(output.getFilenameOutlet());
 
                 {
                     OutletReference outletConfiguration
@@ -318,11 +343,6 @@ public class ReadConfigurationTest exten
                             outletConfiguration.getName());
                 }
 
-
-                assertEquals("outputFileName", output.getFilename());
-                assertNull(output.getFilenameOutlet());
-                assertFalse(output.isSkipIfExists());
-
                 {
                     JdbcMetadataSourceProvider sourceProvider
                             = new JdbcMetadataSourceProvider(
@@ -433,12 +453,14 @@ public class ReadConfigurationTest exten
     @Test
     public void testReadConfigFromClasspath() throws Exception
     {
+        Map<String, File> outputDirMap = new HashMap<String, File>();
+        outputDirMap.put(null, new File("generated-sources"));
         ProjectPaths projectPaths = new CustomProjectPaths(
                 null,
                 "org.apache.torque.generator.test.readfromclasspath",
                 new File("src"),
-                new File("target"),
-                new File("generated-src"));
+                outputDirMap,
+                new File("work"));
         UnitDescriptor unitDescriptor = new UnitDescriptor(
                 UnitDescriptor.Packaging.CLASSPATH,
                 projectPaths,
@@ -526,9 +548,11 @@ public class ReadConfigurationTest exten
                                     new File("src/test/configuration")));
             parentProjectPaths.setConfigurationDir(
                     new File("src/test/configuration/src/main/torque-gen-parent"));
-            parentProjectPaths.setNewFileTargetDir(
+            parentProjectPaths.setOutputDirectory(
+                    null,
                     new File("src/test/configuration/target/parentCustom"));
-            parentProjectPaths.setModifiedFileTargetDir(
+            parentProjectPaths.setOutputDirectory(
+                    "modifiable",
                     new File("src/test/configuration/src/main/parentCustom"));
             UnitDescriptor parentUnitDescriptor = new UnitDescriptor(
                     UnitDescriptor.Packaging.DIRECTORY,
@@ -542,9 +566,11 @@ public class ReadConfigurationTest exten
             projectPaths = new CustomProjectPaths(
                     new Maven2DirectoryProjectPaths(
                             new File("src/test/configuration")));
-            projectPaths.setNewFileTargetDir(
+            projectPaths.setOutputDirectory(
+                    null,
                     new File("src/test/configuration/target/custom"));
-            projectPaths.setModifiedFileTargetDir(
+            projectPaths.setOutputDirectory(
+                    "modifiable",
                     new File("src/test/configuration/src/main/custom"));
             UnitDescriptor unitDescriptor = new UnitDescriptor(
                     UnitDescriptor.Packaging.DIRECTORY,
@@ -566,15 +592,15 @@ public class ReadConfigurationTest exten
 
         {
             File newFileTargetDirectory
-                    = unitConfiguration.getNewFileTargetDirectory();
+                    = unitConfiguration.getOutputDirectory(null);
             File expected = new File("src/test/configuration/target/custom");
             assertEquals(expected, newFileTargetDirectory);
         }
         {
-            File modifiedFileTargetDirectory
-                    = unitConfiguration.getModifiedFileTargetDirectory();
+            File modifiableFileTargetDirectory
+                    = unitConfiguration.getOutputDirectory("modifiable");
             File expected = new File("src/test/configuration/src/main/custom");
-            assertEquals(expected, modifiedFileTargetDirectory);
+            assertEquals(expected, modifiableFileTargetDirectory);
         }
 
         {
@@ -636,8 +662,15 @@ public class ReadConfigurationTest exten
             {
                 Output output = outputList.get(0);
                 assertEquals(
-                        output.getName(),
-                        new QualifiedName("parentOutput"));
+                        new QualifiedName("parentOutput"),
+                        output.getName());
+                assertEquals(
+                        "replace",
+                        output.getExistingTargetStrategy());
+                assertEquals(
+                        "parentOutputDirKeyFromParent",
+                        output.getOutputDirKey());
+                assertNull(output.getFilename());
                 {
                     OutletReference outletConfiguration
                             = output.getContentOutlet();
@@ -646,10 +679,6 @@ public class ReadConfigurationTest exten
                                 "org.apache.torque.generator.test.readConfiguration.testParentOutlet"),
                             outletConfiguration.getName());
                 }
-
-
-                assertNull(output.getFilename());
-
                 {
                     JavaOutlet filenameOutlet
                             = (JavaOutlet) output.getFilenameOutlet();
@@ -702,8 +731,15 @@ public class ReadConfigurationTest exten
             {
                 Output output = outputList.get(1);
                 assertEquals(
-                        output.getName(),
-                        new QualifiedName("org.apache.torque.generator.firstOutput"));
+                        new QualifiedName("org.apache.torque.generator.firstOutput"),
+                        output.getName());
+                assertEquals(
+                        "skip",
+                        output.getExistingTargetStrategy());
+                assertEquals(
+                        null,
+                        output.getOutputDirKey());
+                assertNull(output.getFilename());
 
                 {
                     OutletReference outletConfiguration
@@ -713,10 +749,6 @@ public class ReadConfigurationTest exten
                                 "org.apache.torque.generator.test.readConfiguration.javaOutlet"),
                             outletConfiguration.getName());
                 }
-
-
-                assertNull(output.getFilename());
-
                 {
                     JavaOutlet filenameOutlet
                             = (JavaOutlet) output.getFilenameOutlet();
@@ -754,8 +786,15 @@ public class ReadConfigurationTest exten
             {
                 Output output = outputList.get(2);
                 assertEquals(
-                        output.getName(),
-                        new QualifiedName("secondOutput"));
+                        new QualifiedName("secondOutput"),
+                        output.getName());
+                assertEquals(
+                        "replace",
+                        output.getExistingTargetStrategy());
+                assertEquals(
+                        output.getOutputDirKey(),
+                        "secondOutputDirKey");
+                assertNull(output.getFilename());
 
                 {
                     OutletReference outletConfiguration
@@ -765,10 +804,6 @@ public class ReadConfigurationTest exten
                                 "org.apache.torque.generator.test.readConfiguration.anotherOutlet"),
                             outletConfiguration.getName());
                 }
-
-
-                assertNull(output.getFilename());
-
                 {
                     VelocityOutlet filenameOutlet
                             = (VelocityOutlet) output.getFilenameOutlet();
@@ -831,8 +866,16 @@ public class ReadConfigurationTest exten
             {
                 Output output = outputList.get(3);
                 assertEquals(
-                        output.getName(),
-                        new QualifiedName("thirdOutput"));
+                        new QualifiedName("thirdOutput"),
+                        output.getName());
+                assertEquals(
+                        "append",
+                        output.getExistingTargetStrategy());
+                assertEquals(
+                        "thirdOutputDirKey",
+                        output.getOutputDirKey());
+                assertEquals("outputFileName", output.getFilename());
+                assertNull(output.getFilenameOutlet());
 
                 {
                     OutletReference outletConfiguration
@@ -843,8 +886,6 @@ public class ReadConfigurationTest exten
                             outletConfiguration.getName());
                 }
 
-                assertEquals("outputFileName", output.getFilename());
-                assertNull(output.getFilenameOutlet());
                 {
                     JdbcMetadataSourceProvider sourceProvider
                             = new JdbcMetadataSourceProvider(

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OtherTemplateLanguageTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OtherTemplateLanguageTest.java?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OtherTemplateLanguageTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/configuration/outlet/OtherTemplateLanguageTest.java Tue Oct 25 01:23:02 2011
@@ -67,7 +67,7 @@ public class OtherTemplateLanguageTest
         CustomProjectPaths projectPaths = new CustomProjectPaths(
                 new Maven2DirectoryProjectPaths(
                         new File("src/test/otherTemplateLanguages")));
-        projectPaths.setNewFileTargetDir(TARGET_DIR);
+        projectPaths.setOutputDirectory(null, TARGET_DIR);
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
                 projectPaths,

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/DeeplyNestedMergepointsTest.java Tue Oct 25 01:23:02 2011
@@ -51,7 +51,7 @@ public class DeeplyNestedMergepointsTest
         CustomProjectPaths projectPaths = new CustomProjectPaths(
                 new Maven2DirectoryProjectPaths(
                         new File("src/test/deeplyNestedMergepoints")));
-        projectPaths.setNewFileTargetDir(targetDir);
+        projectPaths.setOutputDirectory(null, targetDir);
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
                 projectPaths,

Added: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ExistingTargetStrategyTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ExistingTargetStrategyTest.java?rev=1188480&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ExistingTargetStrategyTest.java (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/ExistingTargetStrategyTest.java Tue Oct 25 01:23:02 2011
@@ -0,0 +1,280 @@
+package org.apache.torque.generator.control;
+
+/*
+ * 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 static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.torque.generator.BaseTest;
+import org.apache.torque.generator.GeneratorException;
+import org.apache.torque.generator.configuration.UnitDescriptor;
+import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
+import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
+import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ExistingTargetStrategyTest extends BaseTest
+{
+    private File confRootDir = new File("src/test/existingTargetStrategy");
+    private File targetDir1 = new File("target/test/existingTargetStrategy/target1");
+    private File targetDir2 = new File("target/test/existingTargetStrategy/target2");
+    private File workDir 
+        = new File("target/test/existingTargetStrategy/work");
+    private File targetFile1 = new File(targetDir1, "output1.txt");
+    private File targetFile2 = new File(targetDir2, "output2.txt");
+    private File workFile1 = new File(workDir, "raw-generated/default/output1.txt");
+    private File workFile2 = new File(workDir, "raw-generated/other/outputDirKey2/output2.txt");
+    
+    private String srcPath1 = "src/main/torque-gen/src/source1.properties";
+    private String srcPath2 = "src/main/torque-gen/src/source2.properties";
+
+    @Before
+    public void setUp() throws IOException
+    {
+        FileUtils.deleteDirectory(targetDir1);
+        FileUtils.deleteDirectory(targetDir2);
+        FileUtils.deleteDirectory(workDir);
+    }
+
+    @Test
+    public void testReplaceStrategy() throws Exception
+    {
+        File configurationDirectory = new File(confRootDir, "initial");
+        runGeneration(configurationDirectory, null);
+        assertFile(new File(configurationDirectory, srcPath1), targetFile1);
+        assertFile(new File(configurationDirectory, srcPath2), targetFile2);
+        configurationDirectory = new File(confRootDir, "replaceStrategy");
+        runGeneration(configurationDirectory, null);
+        assertFile(new File(configurationDirectory, srcPath1), targetFile1);
+        assertFile(new File(configurationDirectory, srcPath2), targetFile2);
+    }
+
+    @Test
+    public void testMergeStrategyChangeGenerationResult() throws Exception
+    {
+        File configurationDirectory = new File(confRootDir, "mergeStrategy");
+        File initialSourceDir 
+                = new File(confRootDir, "/initial/src/main/torque-gen/src");
+        runGeneration(configurationDirectory, initialSourceDir);
+        File initialSourceDirectory = new File(confRootDir, "initial");
+        assertFile(new File(initialSourceDirectory, srcPath1), targetFile1);
+        assertFile(new File(initialSourceDirectory, srcPath2), targetFile2);
+        assertFile(new File(initialSourceDirectory, srcPath1), workFile1);
+        assertFile(new File(initialSourceDirectory, srcPath2), workFile2);
+        
+        // change the generation result but do not change the target file
+        // -> new target must look like new generation result
+        File mergeSourceDir  = new File(
+                confRootDir,
+                "/mergeStrategy/src/main/torque-gen/src");
+        runGeneration(configurationDirectory, mergeSourceDir);
+        assertFile(new File(configurationDirectory, srcPath1), targetFile1);
+        assertFile(new File(configurationDirectory, srcPath2), targetFile2);
+        assertFile(new File(configurationDirectory, srcPath1), workFile1);
+        assertFile(new File(configurationDirectory, srcPath2), workFile2);
+    }
+
+    @Test
+    public void testMergeStrategyChangeTarget() throws Exception
+    {
+        File configurationDirectory = new File(confRootDir, "mergeStrategy");
+        File initialSourceDir 
+                = new File(confRootDir, "/initial/src/main/torque-gen/src");
+        runGeneration(configurationDirectory, initialSourceDir);
+        File initialSourceDirectory = new File(confRootDir, "initial");
+        assertFile(new File(initialSourceDirectory, srcPath1), targetFile1);
+        assertFile(new File(initialSourceDirectory, srcPath2), targetFile2);
+        assertFile(new File(initialSourceDirectory, srcPath1), workFile1);
+        assertFile(new File(initialSourceDirectory, srcPath2), workFile2);
+        
+        // change the target file result but do not change the generation result
+        // -> new target must not change
+        File mergeStrategyDir  = new File(
+                confRootDir,
+                "/mergeStrategy");
+        String intermediateTargetContent1 = FileUtils.readFileToString(
+                new File(mergeStrategyDir, srcPath1),
+                "ISO-8859-1"); 
+        intermediateTargetContent1 = Pattern.compile("#.*\\r?\\n{1}?")
+                .matcher(intermediateTargetContent1)
+                .replaceAll("");
+        FileUtils.writeStringToFile(
+                targetFile1,
+                intermediateTargetContent1,
+                "ISO-8859-1");
+        String intermediateTargetContent2 = FileUtils.readFileToString(
+                new File(mergeStrategyDir, srcPath2),
+                "ISO-8859-1"); 
+        intermediateTargetContent2 = Pattern.compile("#.*\\r?\\n{1}?")
+                .matcher(intermediateTargetContent2)
+                .replaceAll("");
+        FileUtils.writeStringToFile(
+                targetFile2,
+                intermediateTargetContent2,
+                "ISO-8859-1");
+        runGeneration(configurationDirectory, initialSourceDir);
+        String endGenerationContent1
+                = FileUtils.readFileToString(targetFile1, "ISO-8859-1");
+        assertEquals(intermediateTargetContent1, endGenerationContent1);
+        String endGenerationContent2
+                = FileUtils.readFileToString(targetFile2, "ISO-8859-1");
+        assertEquals(intermediateTargetContent2, endGenerationContent2);
+        assertFile(new File(initialSourceDirectory, srcPath1), workFile1);
+        assertFile(new File(initialSourceDirectory, srcPath2), workFile2);
+    }
+
+    @Test
+    public void testMergeStrategyChangeGenerationResultAndTarget()
+            throws Exception
+    {
+        File configurationDirectory = new File(confRootDir, "mergeStrategy");
+        File initialSourceDir 
+                = new File(confRootDir, "/initial/src/main/torque-gen/src");
+        runGeneration(configurationDirectory, initialSourceDir);
+        File initialSourceDirectory = new File(confRootDir, "initial");
+        assertFile(new File(initialSourceDirectory, srcPath1), targetFile1);
+        assertFile(new File(initialSourceDirectory, srcPath2), targetFile2);
+        assertFile(new File(initialSourceDirectory, srcPath1), workFile1);
+        assertFile(new File(initialSourceDirectory, srcPath2), workFile2);
+        
+        // change the target file result and the generation result
+        File newTargetContentsFile1 = new File(
+                configurationDirectory,
+                "src/main/torque-gen/src/source1.properties");
+        String newTargetContent1 = FileUtils.readFileToString(
+                newTargetContentsFile1,
+                "ISO-8859-1"); 
+        newTargetContent1 = Pattern.compile("#.*\\r?\\n{1}?")
+                .matcher(newTargetContent1)
+                .replaceAll("");
+        FileUtils.writeStringToFile(targetFile1, newTargetContent1, "ISO-8859-1");
+        File newTargetContentsFile2 = new File(
+                configurationDirectory,
+                "src/main/torque-gen/src/source2.properties");
+        String newTargetContent2 = FileUtils.readFileToString(
+                newTargetContentsFile2,
+                "ISO-8859-1"); 
+        newTargetContent2 = Pattern.compile("#.*\\r?\\n{1}?")
+                .matcher(newTargetContent2)
+                .replaceAll("");
+        FileUtils.writeStringToFile(targetFile2, newTargetContent2, "ISO-8859-1");
+        File conflictSourceDir = new File(configurationDirectory, "conflict");
+        runGeneration(configurationDirectory, conflictSourceDir);
+        assertFile(
+                new File(conflictSourceDir, "expected1.properties"),
+                targetFile1);
+        assertFile(
+                new File(conflictSourceDir, "expected2.properties"),
+                targetFile2);
+        assertFile(new File(conflictSourceDir, "source1.properties"), workFile1);
+        assertFile(new File(conflictSourceDir, "source2.properties"), workFile2);
+    }
+
+    @Test
+    public void testSkipStrategy() throws Exception
+    {
+        File initialConfigurationDirectory = new File(confRootDir, "initial");
+        runGeneration(initialConfigurationDirectory, null);
+        assertFile(new File(initialConfigurationDirectory, srcPath1), targetFile1);
+        assertFile(new File(initialConfigurationDirectory, srcPath2), targetFile2);
+        File newConfigurationDirectory = new File(confRootDir, "skipStrategy");
+        runGeneration(newConfigurationDirectory, null);
+        assertFile(new File(initialConfigurationDirectory, srcPath1), targetFile1);
+        assertFile(new File(initialConfigurationDirectory, srcPath2), targetFile2);
+    }
+
+    @Test
+    public void testAppendStrategy() throws Exception
+    {
+        File configurationDirectoryInitial = new File(confRootDir, "initial");
+        runGeneration(configurationDirectoryInitial, null);
+        assertFile(
+                new File(configurationDirectoryInitial, srcPath1),
+                targetFile1);
+        assertFile(
+                new File(configurationDirectoryInitial, srcPath2),
+                targetFile2);
+        File configurationDirectoryAppend 
+                = new File(confRootDir, "appendStrategy");
+        runGeneration(configurationDirectoryAppend, null);
+        File expectedTargetFile1 = new File(targetDir1, "expectedOutput1.txt");
+        String initial1 = FileUtils.readFileToString(
+                new File(configurationDirectoryInitial, srcPath1),
+                "ISO-8859-1");
+        String appended1 = FileUtils.readFileToString(
+                new File(configurationDirectoryAppend, srcPath1),
+                "ISO-8859-1");
+        FileUtils.writeStringToFile(expectedTargetFile1, initial1 + appended1);
+        File expectedTargetFile2 = new File(targetDir1, "expectedOutput2.txt");
+        String initial2 = FileUtils.readFileToString(
+                new File(configurationDirectoryInitial, srcPath2),
+                "ISO-8859-1");
+        String appended2 = FileUtils.readFileToString(
+                new File(configurationDirectoryAppend, srcPath2),
+                "ISO-8859-1");
+        FileUtils.writeStringToFile(expectedTargetFile2, initial2 + appended2);
+        assertFile(expectedTargetFile1, targetFile1);
+        assertFile(expectedTargetFile2, targetFile2);
+    }
+
+    private File runGeneration(File configurationDirectory, File sourceDir)
+            throws GeneratorException
+    {
+        Controller controller = new Controller();
+        List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>();
+        CustomProjectPaths projectPaths = new CustomProjectPaths(
+                new Maven2DirectoryProjectPaths(configurationDirectory));
+        projectPaths.setOutputDirectory(null, targetDir1);
+        projectPaths.setOutputDirectory("outputDirKey2", targetDir2);
+        projectPaths.setWorkDir(workDir);
+        if (sourceDir != null)
+        {
+            projectPaths.setSourceDir(sourceDir);
+        }
+        unitDescriptors.add(new UnitDescriptor(
+                UnitDescriptor.Packaging.DIRECTORY,
+                projectPaths,
+                new DefaultTorqueGeneratorPaths()));
+        controller.run(unitDescriptors);
+        return configurationDirectory;
+    }
+
+    private void assertFile(File expectedFile, File actualFile)
+            throws IOException
+    {
+        assertTrue(actualFile.exists());
+        String expected = FileUtils.readFileToString(expectedFile);
+        // remove Apache license header
+        expected = Pattern.compile("#.*\\r?\\n{1}?")
+            .matcher(expected)
+            .replaceAll("");
+        String actual = FileUtils.readFileToString(actualFile);
+        assertEquals(expected, actual);
+    }
+}

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/control/PropertyToJavaGenerationTest.java Tue Oct 25 01:23:02 2011
@@ -46,7 +46,7 @@ public class PropertyToJavaGenerationTes
         CustomProjectPaths projectPaths = new CustomProjectPaths(
                 new Maven2DirectoryProjectPaths(
                         new File("src/test/propertyToJava")));
-        projectPaths.setNewFileTargetDir(targetDir);
+        projectPaths.setOutputDirectory(null, targetDir);
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
                 projectPaths,

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/example/gettingstarted/GettingStartedTest.java Tue Oct 25 01:23:02 2011
@@ -46,7 +46,7 @@ public class GettingStartedTest extends 
         CustomProjectPaths projectPaths = new CustomProjectPaths(
                 new Maven2DirectoryProjectPaths(
                         new File("src/test/site/gettingStarted")));
-        projectPaths.setNewFileTargetDir(targetDir);
+        projectPaths.setOutputDirectory(null, targetDir);
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
                 projectPaths,

Modified: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java (original)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/generator/source/transform/LoadAdditionalSourceTransformerTest.java Tue Oct 25 01:23:02 2011
@@ -64,7 +64,7 @@ public class LoadAdditionalSourceTransfo
         CustomProjectPaths projectPaths = new CustomProjectPaths(
                 new Maven2DirectoryProjectPaths(
                         new File("src/test/loadAdditionalSourceTransformer")));
-        projectPaths.setNewFileTargetDir(targetDir);
+        projectPaths.setOutputDirectory(null, targetDir);
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
                 projectPaths,

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/configuration.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/configuration.xml?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/configuration.xml (original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/generator/reference/configuration.xml Tue Oct 25 01:23:02 2011
@@ -97,7 +97,7 @@
       systemId="http://foo.org/bar.xsd"
       resource="bar.xsd" />
 
-  <output name="torque.om.dbObject" skipIfExists="true">
+  <output name="torque.om.dbObject" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -142,7 +142,21 @@
     and defining entity references makes no sense.<br/>
     The output tags define which output files are generated.
     The name attribute of the output is used for debugging purposes and
-    must be set. 
+    must be set.
+    The existingTargetStrategy attribute of the output tag defines 
+    how to handle existing files.
+    Default is "replace" (replace the existing file),
+    other modes are "skip" (skip generation and leave existing file as is),
+    "append" (append generation result to the existing file)
+    and "merge" (merge changes in the generation output with changed generation
+    result, see <a href="mergeMode.html" /> for a detailed documentation).
+    The outputDirKey attribute of the output tag allows to write the
+    output files to another output directory, the outputDirKey defines
+    a symbolic name for this directory. On generation time, the user needs
+    to assign real directories to the symbolic names. E.g. in the torque 
+    templates, the outputDirKey "modifiable" is used for files which are
+    intended to be modifiable by the user; the "modifiable" key defaults
+    to the src/main/generated-java directory.
     The filename of the output files can either be defined in the "filename"
     attribute if the filename is fixed, or in the filenameOutlet 
     child element if the filename is generated from the sources.

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml Tue Oct 25 01:23:02 2011
@@ -32,7 +32,7 @@
       systemId="http://db.apache.org/torque/4.0/templates/database-strict.xsd"
       resource="../../xsd/database-4-0-strict.xsd" />
 
-  <output name="torque.om.dbObject" skipIfExists="true">
+  <output name="torque.om.dbObject" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -85,7 +85,7 @@
     <outlet name="torque.om.baseDbObject"/>
   </output>
   
-  <output name="torque.om.inheritanceDbObject" skipIfExists="true">
+  <output name="torque.om.inheritanceDbObject" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -112,7 +112,7 @@
     <outlet name="torque.om.inheritanceDbObject"/>
   </output>
   
-  <output name="torque.om.interface" skipIfExists="true">
+  <output name="torque.om.interface" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -140,7 +140,7 @@
     <outlet name="torque.om.interface"/>
   </output>
   
-  <output name="torque.om.peer" skipIfExists="true">
+  <output name="torque.om.peer" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -167,7 +167,7 @@
     <outlet name="torque.om.peer"/>
   </output>
 
-  <output name="torque.om.peer.impl" skipIfExists="true">
+  <output name="torque.om.peer.impl" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -275,7 +275,7 @@
     <outlet name="torque.om.mapBuilder"/>
   </output>
 
-  <output name="torque.om.recordMapper" skipIfExists="true">
+  <output name="torque.om.recordMapper" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -329,7 +329,7 @@
     <outlet name="torque.om.recordmapper.base.recordMapperBase"/>
   </output>
 
-  <output name="torque.om.bean" skipIfExists="true">
+  <output name="torque.om.bean" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -385,7 +385,7 @@
     <outlet name="torque.om.bean.baseBean"/>
   </output>
   
-  <output name="torque.om.inheritanceBean" skipIfExists="true">
+  <output name="torque.om.inheritanceBean" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -413,7 +413,7 @@
     <outlet name="torque.om.inheritanceBean"/>
   </output>
   
-  <output name="torque.om.mapInit" skipIfExists="true">
+  <output name="torque.om.mapInit" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">
@@ -469,7 +469,7 @@
     <outlet name="torque.om.mapInit.baseMapInit"/>
   </output>
   
-  <output name="torque.om.manager" skipIfExists="true">
+  <output name="torque.om.manager" existingTargetStrategy="skip" outputDirKey="modifiable">
     <filenameOutlet
         xsi:type="javaOutlet"
         class="org.apache.torque.generator.outlet.java.JavaFilenameOutlet">

Modified: db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java Tue Oct 25 01:23:02 2011
@@ -33,6 +33,7 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
 import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
+import org.apache.torque.generator.configuration.paths.Maven2ProjectPaths;
 import org.apache.torque.generator.control.Controller;
 import org.apache.torque.generator.file.Fileset;
 import org.apache.torque.generator.source.SourceProvider;
@@ -68,7 +69,7 @@ public class TestProcessing
             FileUtils.deleteDirectory(generatedXdocsDir);
         }
     }
-    
+
     @Test
     public void testProcessSchemaXml() throws Exception
     {
@@ -87,14 +88,15 @@ public class TestProcessing
                 new File("src/main/resources/org/apache/torque/templates/om"));
         projectPaths.setSourceDir(
                 new File("src/test/schema"));
-        projectPaths.setModifiedFileTargetDir(
+        projectPaths.setOutputDirectory(
+                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                 new File("target/generated-sources-2"));
         Fileset sourceFileset = new Fileset();
         Set<String> sourceIncludes = new HashSet<String>();
         sourceIncludes.add("schema.xml");
         sourceFileset.setIncludes(sourceIncludes);
         sourceFileset.setBasedir(projectPaths.getDefaultSourcePath());
-        SourceProvider sourceProvider 
+        SourceProvider sourceProvider
                 = new FileSourceProvider(
                         null,
                         sourceFileset);
@@ -115,9 +117,11 @@ public class TestProcessing
                 new File("src/main/resources/org/apache/torque/templates/sql"));
         projectPaths.setSourceDir(
                 new File("src/test/schema"));
-        projectPaths.setNewFileTargetDir(
+        projectPaths.setOutputDirectory(
+                null,
                 new File("target/generated-sql"));
-        projectPaths.setModifiedFileTargetDir(
+        projectPaths.setOutputDirectory(
+                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                 new File("target/generated-sql-2"));
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
@@ -136,9 +140,11 @@ public class TestProcessing
                 new File("src/main/resources/org/apache/torque/templates/sql/createdb"));
         projectPaths.setSourceDir(
                 new File("src/test/schema"));
-        projectPaths.setNewFileTargetDir(
+        projectPaths.setOutputDirectory(
+                null,
                 new File("target/generated-sql"));
-        projectPaths.setModifiedFileTargetDir(
+        projectPaths.setOutputDirectory(
+                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                 new File("target/generated-sql-2"));
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
@@ -157,9 +163,11 @@ public class TestProcessing
                 new File("src/main/resources/org/apache/torque/templates/idtable"));
         projectPaths.setSourceDir(
                 new File("src/test/schema"));
-        projectPaths.setNewFileTargetDir(
+        projectPaths.setOutputDirectory(
+                null,
                 new File("target/generated-sql"));
-        projectPaths.setModifiedFileTargetDir(
+        projectPaths.setOutputDirectory(
+                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                 new File("target/generated-sql-2"));
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
@@ -177,9 +185,11 @@ public class TestProcessing
                 new File("src/main/resources/org/apache/torque/templates/doc/html"));
         projectPaths.setSourceDir(
                 new File("src/test/schema"));
-        projectPaths.setNewFileTargetDir(
+        projectPaths.setOutputDirectory(
+                null,
                 new File("target/generated-docs"));
-        projectPaths.setModifiedFileTargetDir(
+        projectPaths.setOutputDirectory(
+                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                 new File("target/generated-docs-2"));
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
@@ -197,9 +207,11 @@ public class TestProcessing
                 new File("src/main/resources/org/apache/torque/templates/doc/xdoc"));
         projectPaths.setSourceDir(
                 new File("src/test/schema"));
-        projectPaths.setNewFileTargetDir(
+        projectPaths.setOutputDirectory(
+                null,
                 new File("target/generated-xdocs"));
-        projectPaths.setModifiedFileTargetDir(
+        projectPaths.setOutputDirectory(
+                Maven2ProjectPaths.MODIFIABLE_OUTPUT_DIR_KEY,
                 new File("target/generated-xdocs-2"));
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,

Modified: db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java Tue Oct 25 01:23:02 2011
@@ -19,7 +19,6 @@ package org.apache.torque.templates.jdbc
  * under the License.
  */
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 import java.io.BufferedReader;
@@ -37,7 +36,6 @@ import java.util.Map;
 import java.util.StringTokenizer;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.log4j.BasicConfigurator;
@@ -128,7 +126,8 @@ public class Jdbc2SchemaTest
                     new Maven2DirectoryProjectPaths(new File(".")));
         projectPaths.setConfigurationDir(
                 new File("src/main/resources/org/apache/torque/templates/jdbc2schema"));
-        projectPaths.setNewFileTargetDir(
+        projectPaths.setOutputDirectory(
+                null,
                 new File("target/generated-schema"));
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,

Modified: db/torque/torque4/trunk/torque-test/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/pom.xml?rev=1188480&r1=1188479&r2=1188480&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/pom.xml (original)
+++ db/torque/torque4/trunk/torque-test/pom.xml Tue Oct 25 01:23:02 2011
@@ -103,6 +103,8 @@
                 <!--  remove old generated sources -->
                 <echo message="Deleting directory src/main/generated-java"/>
                 <delete dir="src/main/generated-java"/>
+                <echo message="Deleting directory target/torque"/>
+                <delete dir="target/torque"/>
               </tasks>
             </configuration>
             <goals>
@@ -175,8 +177,8 @@
               <packaging>classpath</packaging>
               <configPackage>org.apache.torque.templates.sql</configPackage>
               <sourceDir>target/torque/test/schema</sourceDir>
-              <newFileTargetDir>target/generated-sql</newFileTargetDir>
-              <newFileTargetDirUsage>none</newFileTargetDirUsage>
+              <defaultOutputDir>target/generated-sql</defaultOutputDir>
+              <defaultOutputDirUsage>none</defaultOutputDirUsage>
               <loglevel>info</loglevel>
               <sourceExcludes>
                 <sourceExclude>ext*-schema.xml</sourceExclude>
@@ -197,8 +199,8 @@
               <packaging>classpath</packaging>
               <configPackage>org.apache.torque.templates.sql.createdb</configPackage>
               <sourceDir>target/torque/test/schema</sourceDir>
-              <newFileTargetDir>target/generated-createdb-sql</newFileTargetDir>
-              <newFileTargetDirUsage>none</newFileTargetDirUsage>
+              <defaultOutputDir>target/generated-createdb-sql</defaultOutputDir>
+              <defaultOutputDirUsage>none</defaultOutputDirUsage>
               <loglevel>info</loglevel>
               <sourceExcludes>
                 <sourceExclude>ext*-schema.xml</sourceExclude>
@@ -219,8 +221,8 @@
               <packaging>classpath</packaging>
               <configPackage>org.apache.torque.templates.idtable</configPackage>
               <sourceDir>target/torque/test/schema</sourceDir>
-              <newFileTargetDir>target/generated-sql</newFileTargetDir>
-              <newFileTargetDirUsage>none</newFileTargetDirUsage>
+              <defaultOutputDir>target/generated-sql</defaultOutputDir>
+              <defaultOutputDirUsage>none</defaultOutputDirUsage>
               <loglevel>info</loglevel>
               <options>
                 <torque.database>${torque.targetDatabase}</torque.database>
@@ -237,15 +239,15 @@
               <packaging>classpath</packaging>
               <configPackage>org.apache.torque.templates.doc.html</configPackage>
               <sourceDir>target/torque/test/schema</sourceDir>
-              <newFileTargetDir>target/generated-docs</newFileTargetDir>
-              <newFileTargetDirUsage>none</newFileTargetDirUsage>
+              <defaultOutputDir>target/generated-docs</defaultOutputDir>
+              <defaultOutputDirUsage>none</defaultOutputDirUsage>
               <options>
                 <torque.database>${torque.targetDatabase}</torque.database>
                 <torque.om.package>org.apache.torque.test</torque.om.package>
               </options>
             </configuration>
           </execution>
-          <execution>
+          <!-- execution>
             <id>generate-schema-from-jdbc</id>
             <phase>generate-test-sources</phase>
             <goals>
@@ -254,8 +256,8 @@
             <configuration>
               <packaging>classpath</packaging>
               <configPackage>org.apache.torque.templates.jdbc2schema</configPackage>
-              <newFileTargetDir>target/generated-schema</newFileTargetDir>
-              <newFileTargetDirUsage>none</newFileTargetDirUsage>
+              <defaultOutputDir>target/generated-schema</defaultOutputDir>
+              <defaultOutputDirUsage>none</defaultOutputDirUsage>
               <loglevel>info</loglevel>
               <options>
                 <torque.jdbc2schema.driver>${torque.driver}</torque.jdbc2schema.driver>
@@ -264,7 +266,7 @@
                 <torque.jdbc2schema.password>${torque.database.password}</torque.jdbc2schema.password>
               </options>
             </configuration>
-          </execution>
+          </execution-->
           <execution>
             <id>generate-xdoc</id>
             <phase>pre-site</phase>
@@ -275,8 +277,8 @@
               <packaging>classpath</packaging>
               <configPackage>org.apache.torque.templates.doc.xdoc</configPackage>
               <sourceDir>target/torque/test/schema</sourceDir>
-              <newFileTargetDir>target/generated-xdocs</newFileTargetDir>
-              <newFileTargetDirUsage>none</newFileTargetDirUsage>
+              <defaultOutputDir>target/generated-xdocs</defaultOutputDir>
+              <defaultOutputDirUsage>none</defaultOutputDirUsage>
               <options>
                 <torque.database>${torque.targetDatabase}</torque.database>
                 <torque.om.package>org.apache.torque.test</torque.om.package>



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message