TRINIDAD-1590 - maven-jdev-plugin: added ability to set JVM Java Options. Default is "-ea" to enable assertions

Thx to Gary Kind for the patch
diff --git a/maven-jdev-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/JDeveloperMojo.java b/maven-jdev-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/JDeveloperMojo.java
index 2f88a37..1f3d9cb 100644
--- a/maven-jdev-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/JDeveloperMojo.java
+++ b/maven-jdev-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/JDeveloperMojo.java
@@ -261,6 +261,14 @@
   private Properties[] distributedTagLibraries;
 
   /**
+   * JVM javaOptions found under 
+   * Project Properties->Run/Debug/Profile->Launch Settings->Java Options
+   * in JDeveloper. "-ea" is the default for "enableAssertions".  
+   * @parameter expression="${jdev.jvm.java.options}" default-value="-ea"
+   */
+  private String javaOptions;
+
+  /**
    * Execute the Mojo.
    */
   public void execute()
@@ -1372,7 +1380,7 @@
     //   /hash[@n="oracle.jdeveloper.runner.RunConfigurations"]
     //     /hash[@n="runConfigurationDefinitions"]
     //       /hash[@n="Default"]
-    //         /value[@n="makeProject" v="false"]
+    //         /value[@n="compileBeforeRun" v="false"]
     //         /url[@n="targetURL" path="src/main/webapp/index.jspx"]
     Xpp3Dom configDOM =
       findNamedChild(projectDOM, "hash",
@@ -1388,7 +1396,13 @@
     else
       makeProjectDom.setAttribute("v", "false");
 
-    if ((runTarget != null) && !"".equals(runTarget))
+    Xpp3Dom javaOptionsDom =
+      findNamedChild(defaultDOM, "value", "javaOptions");
+
+    if (javaOptions != null)
+      javaOptionsDom.setAttribute("v", javaOptions);
+
+   if ((runTarget != null) && !"".equals(runTarget))
     {
       // Convert file separator chars to generic
       String targetURL = "";
diff --git a/maven-jdev-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/11.1.2.0.0/project.xml b/maven-jdev-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/11.1.2.0.0/project.xml
new file mode 100644
index 0000000..f31e9e0
--- /dev/null
+++ b/maven-jdev-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/11.1.2.0.0/project.xml
@@ -0,0 +1,216 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>

+<!--

+  Copyright 2006-2009 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.

+-->

+<jpr:project xmlns:jpr="http://xmlns.oracle.com/ide/project">

+   <hash n="component-versions">

+      <value n="oracle.adfdt.controller.adfc.source.migration.AdfControllerSchemaMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdt.controller.adfc.source.migration.MoveMetadataResourcesAgainMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdt.controller.common.migrator.ProjectMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdt.controller.jsf2.diagram.migrate.JsfNodeMigratorHelper" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdt.controller.struts.addin.db.ADFStrutsProjectMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdt.controller.struts.addin.StrutsProjectMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.dvt.datapresdt.migration.DVTDataMapMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.model.ide.migration.ProjectMigrator" v="11.1.1.1.0.11.1.1;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.model.ide.security.wizard.FormPageMigrator" v="11.1.1.0.0;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.model.ide.security.wizard.JpsFilterMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.model.ide.xmled.migration.ADFNodeMigrator" v="11.1.1.1.0.5;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.model.ide.xmled.migration.PageDefinitionParameterValueMigrator" v="11.1.1.1.0.5;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.model.ide.xmled.migration.WebXmlMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.view.common.migration.wizards.MigrationHelper" v="11.1.1.1.0.3;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.view.rich.binding.migration.JarResourceMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.view.rich.migration.ComponentIdNodeMigratorHelper" v="11.1.1.1.0.01;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.view.rich.migration.LibraryVersionMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.bm.commonIde.ProjectUpgrader" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.bm.migration.project.MigratorRegistryProjectUpgradeAdapter" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.ide.model.Project" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.ide.model.ResourcePathsMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jbo.dt.jclient.migrator.JCProjectMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jbo.dt.jdevx.deployment.JbdProjectMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jbo.dt.jdevx.ui.appnav.APProjectMigrator" v="11.1.1.1.0.5;11.1.2.0.0"/>

+      <value n="oracle.jbo.dt.migrate.ResourceBundlePathMigrator" v="11.1.1.1.0.5;11.1.2.0.0"/>

+      <value n="oracle.jbo.dt.migration.ServiceInterfaceMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdeveloper.ejb.EjbMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdeveloper.library.ProjectLibraryMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdeveloper.model.OutputDirectoryMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.deploy.DeploymentProfilesMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.deploy.jps.JpsDataMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.jsp.JspMigrator" v="11.1.1;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.offlinedb.migration.OfflineDBProjectMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.offlinedb.migration.OfflineTransferMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.resourcebundle.XliffAddin$XliffMigratorHelper" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.webapp.jsp.libraries.JspLibraryMigrator" v="11.1.1.1.4;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.webapp.WebAppContentSetNodeMigratorHelper" v="11.1.1;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.webapp.WebAppNodeMigratorHelper" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.webservices.WebServicesMigratorHelper" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.xml.wl.WeblogicMigratorHelper" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.modeler.bmmigrate.management.Migration" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.tip.tools.ide.fabric.addin.SCAProjectMigrator" v="11.1.1.1.0.06;11.1.2.0.0"/>

+      <value n="oracle.tip.tools.ide.pm.addin.migrator.PMProjectMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.toplink.workbench.addin.migration.PersistenceProjectMigrator" v="11.1.1.1.1;11.1.2.0.0"/>

+      <value n="oracle.toplink.workbench.addin.migration.TopLinkProjectMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+   </hash>

+   <list n="contentSets">

+      <string v="oracle.jdeveloper.model.PathsConfiguration/javaContentSet"/>

+      <string v="oracle.ide.model.ResourcePaths/resourcesContentSet"/>

+      <string v="oracle.jdeveloper.offlinedb.model.OfflineDBProjectSettings/offlineDBContentSet"/>

+      <string v="oracle.jdeveloper.model.J2eeSettings/webContentSet"/>

+      <string v="oracle.bm.commonIde.data.project.ModelerProjectSettings/modelersContentSet"/>

+      <string v="oracle.toplink.workbench.addin/toplinkContentSet"/>

+      <string v="oracle.adfdtinternal.model.ide.settings.ADFMSettings/adfmContentSet"/>

+      <string v="oracle.tip.tools.ide.fabric.addin.SCAContentSetProvider/sca-content"/>

+      <string v="oracle.mof.ide-tests/mofIdeTestsContentSet"/>

+   </list>

+      <hash n="oracle.adfdtinternal.model.ide.settings.ADFMSettings">

+      <hash n="adfmContentSet">

+         <list n="pattern-filters">

+            <string v="+**"/>

+         </list>

+         <list n="url-path">

+            <url path="adfmsrc/"/>

+         </list>

+      </hash>

+   </hash>

+   <hash n="oracle.bm.commonIde.data.project.ModelerProjectSettings">

+      <hash n="modelersContentSet">

+         <list n="url-path">

+            <url path="model/"/>

+         </list>

+      </hash>

+      <value n="modelersVersion" v="11.111"/>

+   </hash>

+   <hash n="oracle.ide.model.DependencyConfiguration">

+      <list n="dependencyList"/>

+   </hash>

+   <hash n="oracle.ide.model.ResourcePaths">

+      <hash n="resourcesContentSet">

+         <list n="pattern-filters">

+            <string v="+**"/>

+         </list>

+         <list n="url-path"/>

+      </hash>

+   </hash>

+   <hash n="oracle.jdeveloper.compiler.OjcConfiguration">

+      <value n="assertionsEnabled" v="true"/>

+      <value n="compiler.name" v="Ojc"/>

+      <list n="copyRes">

+         <string v=".java"/>

+      </list>

+      <value n="internalEncoding" v="Default"/>

+      <list n="Javac.commandline.optionlist">

+         <string v="-g"/>

+         <string v="-Xlint:all"/>

+         <string v="-Xlint:-cast"/>

+         <string v="-Xlint:-empty"/>

+         <string v="-Xlint:-fallthrough"/>

+         <string v="-Xlint:-path"/>

+         <string v="-Xlint:-serial"/>

+         <string v="-Xlint:-unchecked"/>

+      </list>

+      <list n="Ojc.commandline.optionlist">

+         <string v="-g"/>

+         <string v="-warn"/>

+         <string v="-nowarn:320"/>

+         <string v="-nowarn:372"/>

+         <string v="-nowarn:412"/>

+         <string v="-nowarn:413"/>

+         <string v="-nowarn:415"/>

+         <string v="-nowarn:486"/>

+         <string v="-nowarn:487"/>

+         <string v="-nowarn:489"/>

+         <string v="-nowarn:556"/>

+         <string v="-nowarn:558"/>

+         <string v="-nowarn:560"/>

+         <string v="-nowarn:561"/>

+         <string v="-nowarn:705"/>

+         <string v="-Xlint:-fallthrough"/>

+         <string v="-Xlint:-serial"/>

+         <string v="-Xlint:-unchecked"/>

+      </list>

+      <value n="reverseCopyRes" v="true"/>

+      <value n="showObjectDotStaticWarnings" v="true"/>

+      <value n="showPartialImportWarnings" v="true"/>

+      <value n="showUnusedImportWarnings" v="true"/>

+   </hash>

+   <hash n="oracle.jdeveloper.model.J2eeSettings">

+      <value n="j2eeWebAppName" v="maven-generated-webapp"/>

+      <value n="j2eeWebContextRoot" v="maven-generated-context-root"/>

+      <hash n="webContentSet">

+         <list n="url-path" />

+      </hash>

+   </hash>

+   <hash n="oracle.jdeveloper.model.PathsConfiguration">

+      <hash n="javaContentSet">

+        <list n="constituent-sets" />

+      </hash>

+   </hash>

+   <hash n="oracle.jdeveloper.offlinedb.model.OfflineDBProjectSettings">

+      <hash n="offlineDBContentSet">

+         <list n="pattern-filters">

+            <string v="+**"/>

+         </list>

+         <list n="url-path">

+            <url path="database/"/>

+         </list>

+      </hash>

+   </hash>

+   <hash n="oracle.jdeveloper.runner.RunConfigurations">

+      <hash n="runConfigurationDefinitions">

+         <hash n="Default">

+            <value n="compileBeforeRun" v="false"/>

+            <value n="custom" v="false"/>

+            <value n="javaOptions" v="-ea"/>

+            <value n="name" v="Default"/>

+         </hash>

+      </hash>

+      <list n="runConfigurationList">

+         <string v="Default"/>

+      </list>

+   </hash>

+   <hash n="oracle.jdevimpl.config.JProjectLibraries">

+      <list n="exportedReferences"/>

+      <hash n="internalDefinitions">

+         <list n="libraryDefinitions" />

+      </hash>

+      <list n="libraryReferences"/>

+   </hash>

+   <hash n="oracle.jdevimpl.config.JProjectPaths"/>

+   <hash n="oracle.jdevimpl.webapp.jsp.libraries.model.ProjectTagLibraries">

+      <list n="tag-libraries"/>

+   </hash>

+   <hash n="oracle.tip.tools.ide.fabric.addin.SCAContentSetProvider">

+      <hash n="sca-content"/>

+   </hash>

+   <hash n="oracle.tip.tools.ide.pm.addin.PMProjectSettings">

+     <hash n="Integration_Content">

+       <list n="pattern-filters">

+         <string v="+**"/>

+       </list>

+     </hash>

+   </hash>

+   <hash n="oracle.toplink.workbench.addin">

+      <hash n="toplinkContentSet">

+         <list n="pattern-filters">

+            <string v="+**"/>

+         </list>

+         <list n="url-path">

+            <url path="toplink/"/>

+         </list>

+      </hash>

+   </hash>

+</jpr:project>

+

+

+

diff --git a/maven-jdev-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/11.1.2.0.0/workspace.xml b/maven-jdev-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/11.1.2.0.0/workspace.xml
new file mode 100644
index 0000000..0638049
--- /dev/null
+++ b/maven-jdev-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/jdeveloper/11.1.2.0.0/workspace.xml
@@ -0,0 +1,31 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>

+<!--

+  Copyright 2006-2009 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.

+-->

+<jws:workspace xmlns:jws="http://xmlns.oracle.com/ide/project">

+   <hash n="component-versions">

+      <value n="oracle.adf.share.dt.migration.jps.JaznCredStoreMigratorHelper" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdt.controller.adfc.source.migration.SavePointDataSourceForWLSMigrator" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.adfdtinternal.model.ide.security.wizard.AdfSecurityMigrator" v="11.1.1.1.0.13;11.1.2.0.0"/>

+      <value n="oracle.ide.model.Project" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.deploy.ear.OarMigratorHelper" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.deploy.mar.MarMigratorHelper" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.xml.oc4j.jps.JpsConfigMigratorHelper" v="11.1.1.1.0.1;11.1.2.0.0"/>

+      <value n="oracle.jdevimpl.xml.wl.WeblogicMigratorHelper" v="11.1.1.1.0;11.1.2.0.0"/>

+      <value n="oracle.mds.internal.dt.ide.migrator.MDSConfigMigratorHelper" v="11.1.1.0.5313;11.1.2.0.0"/>

+   </hash>

+   <list n="listOfChildren" />

+</jws:workspace>

+</jws:workspace>