ANT plugin to generate sourceDir folders; dependency scope changes for MavenPackager compilation; write XML artifacts to META-INF
diff --git a/dbws/dbws.maven/README.md b/dbws/dbws.maven/README.md
index 4182ed3..25ccc1e 100644
--- a/dbws/dbws.maven/README.md
+++ b/dbws/dbws.maven/README.md
@@ -5,7 +5,7 @@
 This pom.xml and its config.properties file simplifies this. Simply edit the config.properties file to match the version 
 and install location of the EclipseLink release and execute mvn.
 
-After this fas completed successfully other projects can reference these artifacts using:
+After this has completed successfully other projects can reference these artifacts using:
 
 		<dependency>
 			<groupId>org.eclipse.persistence</groupId>
diff --git a/dbws/dbws.maven/pom.xml b/dbws/dbws.maven/pom.xml
index 8db7267..908227e 100644
--- a/dbws/dbws.maven/pom.xml
+++ b/dbws/dbws.maven/pom.xml
@@ -61,7 +61,6 @@
 					<groupId>commonj.sdo</groupId>
 				</exclusion>
 			</exclusions> 
-			<scope>test</scope>
 		</dependency>
 
 		<dependency>
@@ -75,7 +74,6 @@
 			<groupId>org.eclipse.persistence</groupId>
 			<artifactId>dbws.builder</artifactId>
 			<version>${eclipselink.version}</version>
-			<scope>test</scope>
 		</dependency>
 
 		<dependency>
diff --git a/dbws/dbws.maven/src/main/java/org/eclipse/persistence/tools/dbws/MavenPackager.java b/dbws/dbws.maven/src/main/java/org/eclipse/persistence/tools/dbws/MavenPackager.java
index 419c94e..9781ce5 100644
--- a/dbws/dbws.maven/src/main/java/org/eclipse/persistence/tools/dbws/MavenPackager.java
+++ b/dbws/dbws.maven/src/main/java/org/eclipse/persistence/tools/dbws/MavenPackager.java
@@ -12,14 +12,59 @@
  ******************************************************************************/
 package org.eclipse.persistence.tools.dbws;
 
+import static org.eclipse.persistence.internal.xr.Util.DBWS_OR_XML;
+import static org.eclipse.persistence.internal.xr.Util.DBWS_OX_XML;
+import static org.eclipse.persistence.internal.xr.Util.DBWS_SERVICE_XML;
 import static org.eclipse.persistence.tools.dbws.DBWSPackager.ArchiveUse.noArchive;
 
-public class MavenPackager extends IDEPackager {
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
 
+public class MavenPackager extends IDEPackager {
+	File resourceDir;
+	String resourceDirName;
+	
     public MavenPackager() {
         super(null, "maven", noArchive);
         srcDirname = "java";
         publicHTMLDirname = "webapp";
+        resourceDirName = "META-INF";
+    }
+    
+    protected void buildResourceDir() throws FileNotFoundException {
+        buildSrcDir();
+    	resourceDir = new File(srcDir, resourceDirName);
+        if (!resourceDir.exists()) {
+            boolean worked = resourceDir.mkdir();
+            if (!worked) {
+                throw new FileNotFoundException("cannot create " + resourceDirName + " under " + srcDir);
+            }
+        }
     }
 
-}
+    @Override
+    public OutputStream getOxStream() throws FileNotFoundException {
+    	buildResourceDir();
+        return new FileOutputStream(new File(resourceDir, DBWS_OX_XML));
+    }
+    
+    @Override
+    public OutputStream getSessionsStream(String sessionsFileName) throws FileNotFoundException {
+    	buildResourceDir();
+        return new FileOutputStream(new File(resourceDir, sessionsFileName));
+    }
+
+    @Override
+    public OutputStream getServiceStream() throws FileNotFoundException {
+    	buildResourceDir();
+        return new FileOutputStream(new File(resourceDir, DBWS_SERVICE_XML));
+    }
+
+    @Override
+    public OutputStream getOrStream() throws FileNotFoundException {
+    	buildResourceDir();
+        return new FileOutputStream(new File(resourceDir, DBWS_OR_XML));
+    }
+}
\ No newline at end of file
diff --git a/dbws/dbws.simple/pom.xml b/dbws/dbws.simple/pom.xml
index 02855da..8f92238 100644
--- a/dbws/dbws.simple/pom.xml
+++ b/dbws/dbws.simple/pom.xml
@@ -84,6 +84,13 @@
 			<version>5.1.24</version>
 			<scope>test</scope>
 		</dependency>
+        
+        <dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc6</artifactId>
+            <version>11.2.0</version>
+            <scope>test</scope>
+        </dependency>
 
 		<dependency>
 			<groupId>org.eclipse.persistence</groupId>
@@ -143,6 +150,26 @@
 					<target>1.7</target>
 				</configuration>
 			</plugin>
+            
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>create-empty-directory</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <mkdir dir="${project.basedir}/target/generated-src/java" />
+                                <mkdir dir="${project.basedir}/target/generated-src/webapp" />
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
 
 			<plugin>
 				<groupId>org.codehaus.mojo</groupId>
@@ -170,16 +197,6 @@
 					</execution>
 				</executions>
 			</plugin>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<includes>
-						<include>${project.basedir}/target/generated-src/java/**/*.java</include>
-					</includes>
-				</configuration>
-			</plugin>
 		</plugins>
 
 		<resources>
@@ -191,6 +208,5 @@
 			</resource>
 		</resources>
 
-
 	</build>
 </project>