Permalink
Browse files

GERONIMODEVTOOLS-639 Cleanup necessary to support Geronimo 3.0 server

  • Loading branch information...
1 parent 3bf1c15 commit cb04c305082093a1b1638f7c1b82294eabba769f Tim McConnell committed Apr 17, 2010
Showing with 384 additions and 384 deletions.
  1. +3 −3 LICENSE.txt
  2. +1 −1 NOTICE.txt
  3. +3 −3 features/org.apache.geronimo.v30.feature/feature.properties
  4. +2 −2 plugins/org.apache.geronimo.runtime.common/LICENSE.txt
  5. +5 −5 plugins/org.apache.geronimo.runtime.common/META-INF/MANIFEST.MF
  6. +1 −1 plugins/org.apache.geronimo.runtime.v20/META-INF/MANIFEST.MF
  7. +1 −1 plugins/org.apache.geronimo.runtime.v21/LICENSE.txt
  8. +4 −4 plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF
  9. +1 −1 plugins/org.apache.geronimo.runtime.v21/NOTICE.txt
  10. +1 −1 plugins/org.apache.geronimo.runtime.v22/LICENSE.txt
  11. +4 −4 plugins/org.apache.geronimo.runtime.v22/META-INF/MANIFEST.MF
  12. +1 −1 plugins/org.apache.geronimo.runtime.v22/NOTICE.txt
  13. +1 −1 plugins/org.apache.geronimo.runtime.v30/LICENSE.txt
  14. +4 −4 plugins/org.apache.geronimo.runtime.v30/META-INF/MANIFEST.MF
  15. +1 −1 plugins/org.apache.geronimo.runtime.v30/NOTICE.txt
  16. +44 −44 ...ore/src/main/java/org/apache/geronimo/st/v30/core/{GeronimoV21Utils.java → GeronimoV30Utils.java}
  17. +17 −17 ...org/apache/geronimo/st/v30/core/{GeronimoV21VersionHandler.java → GeronimoV30VersionHandler.java}
  18. +12 −12 ...v30/core/operations/{GeronimoV21FacetInstallDelegate.java → GeronimoV30FacetInstallDelegate.java}
  19. +0 −258 .../src/main/java/org/apache/geronimo/st/v30/core/operations/V21DeploymentPlanCreationOperation.java
  20. +258 −0 .../src/main/java/org/apache/geronimo/st/v30/core/operations/V30DeploymentPlanCreationOperation.java
  21. +20 −20 pom.xml
View
6 LICENSE.txt
@@ -238,15 +238,15 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-For cglib-nodep-2.1_3.jar:
+For cglib-nodep jar:
=========================================================================
== CGLIB License ==
=========================================================================
CGLIB is licensed under the Apache License 2.0.
-For commons-logging-1.0.4.jar:
+For commons-logging jar:
=========================================================================
== Apache Commons License ==
@@ -589,7 +589,7 @@ shall be subject to the jurisdiction of the Federal Courts of the
Northern District of California and the state courts of the State of
California, with venue lying in Santa Clara County, California.
-For plexus-archiver-1.0-alpha-7.jar:
+For plexus-archiver jar:
=========================================================================
== Plexus License ==
View
2 NOTICE.txt
@@ -54,7 +54,7 @@ For jaxb-api and jaxb-impl jars in org.apache.geronimo.runtime.common.jar:
This product includes software developed for the JAXB Reference
Implementation project. (https://jaxb.dev.java.net/)
-For plexus-archiver-1.0-alpha-7.jar in org.apache.geronimo.runtime.v21.jar:
+For plexus-archiver jar in org.apache.geronimo.runtime.v21.jar:
=========================================================================
== Plexus Notice ==
View
6 features/org.apache.geronimo.v30.feature/feature.properties
@@ -262,15 +262,15 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n\
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n\
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\
\n\
-For cglib-nodep-2.1_3.jar:\n\
+For cglib-nodep jar:\n\
\n\
=========================================================================\n\
== CGLIB License ==\n\
=========================================================================\n\
\n\
CGLIB is licensed under the Apache License 2.0.\n\
\n\
-For commons-logging-1.0.4.jar:\n\
+For commons-logging jar:\n\
\n\
=========================================================================\n\
== Apache Commons License ==\n\
@@ -613,7 +613,7 @@ shall be subject to the jurisdiction of the Federal Courts of the\n\
Northern District of California and the state courts of the State of\n\
California, with venue lying in Santa Clara County, California.\n\
\n\
-For plexus-archiver-1.0-alpha-7.jar:\n\
+For plexus-archiver jar:\n\
\n\
=========================================================================\n\
== Plexus License ==\n\
View
4 plugins/org.apache.geronimo.runtime.common/LICENSE.txt
@@ -205,15 +205,15 @@
## ADDITIONAL SOURCE LICENSES ##
#########################################################################
-For cglib-nodep-2.1_3.jar:
+For cglib-nodep jar:
=========================================================================
== CGLIB License ==
=========================================================================
CGLIB is licensed under the Apache License 2.0.
-For commons-logging-1.0.4.jar:
+For commons-logging jar:
=========================================================================
== Apache Commons License ==
View
10 plugins/org.apache.geronimo.runtime.common/META-INF/MANIFEST.MF
@@ -4,13 +4,13 @@ Bundle-Name: Geronimo Common Runtime Plug-in
Bundle-SymbolicName: org.apache.geronimo.runtime.common;singleton:=true
Bundle-Version: 3.0.0
Bundle-ClassPath:
- lib/geronimo-j2ee-deployment_1.1_spec-1.0.jar,
- lib/commons-logging-1.0.4.jar,
+ lib/geronimo-j2ee-deployment_1.1_spec-1.1.jar,
+ lib/commons-logging-1.1.1.jar,
lib/cglib-nodep-2.1_3.jar,
- lib/jaxb-api-2.0.jar,
- lib/jaxb-impl-2.0.5.jar,
+ lib/jaxb-api-2.2.jar,
+ lib/jaxb-impl-2.2.jar,
lib/geronimo-stax-api_1.0_spec-1.0.1.jar,
- lib/geronimo-activation_1.1_spec-1.0.2.jar
+ lib/geronimo-activation_1.1_spec-1.0.3-SNAPSHOT.jar
Export-Package:
com.sun.istack,
com.sun.xml.bind,
View
2 plugins/org.apache.geronimo.runtime.v20/META-INF/MANIFEST.MF
@@ -12,7 +12,7 @@ Bundle-ClassPath: lib/geronimo-common-2.0.2.jar,
lib/geronimo-system-2.0.2.jar,
lib/geronimo-util-2.0.2.jar,
lib/geronimo-deploy-config-2.0.2.jar,
- lib/geronimo-javaee-deployment_1.1MR3_spec-1.0.jar
+ lib/geronimo-javaee-deployment_1.1MR3_spec-1.0.1-SNAPSHOT.jar
Export-Package:
javax.enterprise.deploy.model,
javax.enterprise.deploy.model.exceptions,
View
2 plugins/org.apache.geronimo.runtime.v21/LICENSE.txt
@@ -236,7 +236,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRA
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-For plexus-archiver-1.0-alpha-7.jar:
+For plexus-archiver jar:
=========================================================================
== Plexus License ==
View
8 plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF
@@ -13,11 +13,11 @@ Bundle-ClassPath: lib/geronimo-common-2.1.4.jar,
lib/geronimo-system-2.1.4.jar,
lib/geronimo-util-2.1.4.jar,
lib/geronimo-deploy-config-2.1.4.jar,
- lib/geronimo-javaee-deployment_1.1MR3_spec-1.0.jar,
- lib/plexus-archiver-1.0-alpha-7.jar,
+ lib/geronimo-javaee-deployment_1.1MR3_spec-1.0.1-SNAPSHOT.jar,
+ lib/plexus-archiver-1.0-alpha-12.jar,
lib/geronimo-crypto-2.1.4.jar,
- lib/slf4j-api-1.4.3.jar,
- lib/slf4j-simple-1.4.3.jar
+ lib/slf4j-api-1.5.5.jar,
+ lib/slf4j-simple-1.5.5.jar
Export-Package:
javax.enterprise.deploy.model,
javax.enterprise.deploy.model.exceptions,
View
2 plugins/org.apache.geronimo.runtime.v21/NOTICE.txt
@@ -21,7 +21,7 @@ package) which was developed by the Bouncy Castle project.
Copyright (c) 2000-2005 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-For plexus-archiver-1.0-alpha-7.jar:
+For plexus-archiver jar:
=========================================================================
== Plexus Notice ==
View
2 plugins/org.apache.geronimo.runtime.v22/LICENSE.txt
@@ -236,7 +236,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRA
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-For plexus-archiver-1.0-alpha-7.jar:
+For plexus-archiver jar:
=========================================================================
== Plexus License ==
View
8 plugins/org.apache.geronimo.runtime.v22/META-INF/MANIFEST.MF
@@ -13,11 +13,11 @@ Bundle-ClassPath: lib/geronimo-common-2.2.jar,
lib/geronimo-system-2.2.jar,
lib/geronimo-util-2.2.jar,
lib/geronimo-deploy-config-2.2.jar,
- lib/geronimo-javaee-deployment_1.1MR3_spec-1.0.jar,
- lib/plexus-archiver-1.0-alpha-7.jar,
+ lib/geronimo-javaee-deployment_1.1MR3_spec-1.0.1-SNAPSHOT.jar,
+ lib/plexus-archiver-1.0-alpha-12.jar,
lib/geronimo-crypto-2.2.jar,
- lib/slf4j-api-1.4.3.jar,
- lib/slf4j-simple-1.4.3.jar
+ lib/slf4j-api-1.5.5.jar,
+ lib/slf4j-simple-1.5.5.jar
Export-Package:
javax.enterprise.deploy.model,
javax.enterprise.deploy.model.exceptions,
View
2 plugins/org.apache.geronimo.runtime.v22/NOTICE.txt
@@ -21,7 +21,7 @@ package) which was developed by the Bouncy Castle project.
Copyright (c) 2000-2005 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-For plexus-archiver-1.0-alpha-7.jar:
+For plexus-archiver jar:
=========================================================================
== Plexus Notice ==
View
2 plugins/org.apache.geronimo.runtime.v30/LICENSE.txt
@@ -236,7 +236,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRA
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-For plexus-archiver-1.0-alpha-7.jar:
+For plexus-archiver jar:
=========================================================================
== Plexus License ==
View
8 plugins/org.apache.geronimo.runtime.v30/META-INF/MANIFEST.MF
@@ -13,11 +13,11 @@ Bundle-ClassPath: lib/geronimo-common-3.0-SNAPSHOT.jar,
lib/geronimo-system-3.0-SNAPSHOT.jar,
lib/geronimo-util-3.0-SNAPSHOT.jar,
lib/geronimo-deploy-config-3.0-SNAPSHOT.jar,
- lib/geronimo-javaee-deployment_1.1MR3_spec-1.0.jar,
- lib/plexus-archiver-1.0-alpha-7.jar,
+ lib/geronimo-javaee-deployment_1.1MR3_spec-1.0.1-SNAPSHOT.jar,
+ lib/plexus-archiver-1.0-alpha-12.jar,
lib/geronimo-crypto-3.0-SNAPSHOT.jar,
- lib/slf4j-api-1.4.3.jar,
- lib/slf4j-simple-1.4.3.jar
+ lib/slf4j-api-1.5.5.jar,
+ lib/slf4j-simple-1.5.5.jar
Export-Package:
javax.enterprise.deploy.model,
javax.enterprise.deploy.model.exceptions,
View
2 plugins/org.apache.geronimo.runtime.v30/NOTICE.txt
@@ -21,7 +21,7 @@ package) which was developed by the Bouncy Castle project.
Copyright (c) 2000-2005 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
-For plexus-archiver-1.0-alpha-7.jar:
+For plexus-archiver jar:
=========================================================================
== Plexus Notice ==
View
88 ...eronimo/st/v30/core/GeronimoV21Utils.java → ...eronimo/st/v30/core/GeronimoV30Utils.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.geronimo.st.v21.core;
+package org.apache.geronimo.st.v30.core;
import javax.xml.bind.JAXBElement;
@@ -35,10 +35,10 @@
/**
* @version $Rev$ $Date$
*/
-public class GeronimoV21Utils extends GeronimoUtils {
+public class GeronimoV30Utils extends GeronimoUtils {
public static JAXBElement getDeploymentPlan(IFile file) throws Exception {
- Trace.tracePoint("ENTRY", "GeronimoV21Utils.getDeploymentPlan", file);
+ Trace.tracePoint("ENTRY", "GeronimoV30Utils.getDeploymentPlan", file);
if (!file.exists()) {
return null;
@@ -55,12 +55,12 @@ else if (file.getName().equals(GeronimoUtils.CONNECTOR_PLAN_NAME))
else if (file.getName().equals(GeronimoUtils.APP_CLIENT_PLAN_NAME))
return getApplicationClientDeploymentPlan(file);
- Trace.tracePoint("EXIT", "GeronimoV21Utils.getDeploymentPlan", null);
+ Trace.tracePoint("EXIT", "GeronimoV30Utils.getDeploymentPlan", null);
return null;
}
//public static String getConfigId2(IModule module) {
- // Trace.tracePoint("ENTRY", "GeronimoV21Utils.getConfigId2", module);
+ // Trace.tracePoint("ENTRY", "GeronimoV30Utils.getConfigId2", module);
// IFile planFile = null;
// IVirtualComponent comp = ComponentCore.createComponent(module.getProject());
@@ -87,15 +87,15 @@ else if (file.getName().equals(GeronimoUtils.APP_CLIENT_PLAN_NAME))
// if (result != null && result.length > 0) {
// org.apache.geronimo.deployment.xbeans.EnvironmentType env = (org.apache.geronimo.deployment.xbeans.EnvironmentType) result[0].changeType(org.apache.geronimo.deployment.xbeans.EnvironmentType.type);
// org.apache.geronimo.deployment.xbeans.ArtifactType moduleId = env.getModuleId();
- // Trace.tracePoint("EXIT", "GeronimoV21Utils.getConfigId2", getQualifiedConfigID(moduleId));
+ // Trace.tracePoint("EXIT", "GeronimoV30Utils.getConfigId2", getQualifiedConfigID(moduleId));
// return getQualifiedConfigID(moduleId);
// }
// else {
//
// FIXME -- Once GERONIMODEVTOOLS-263 is resolved
//
// String id = getConfigId(module);
- // Trace.tracePoint("EXIT", "GeronimoV21Utils.getConfigId2", id);
+ // Trace.tracePoint("EXIT", "GeronimoV30Utils.getConfigId2", id);
// return id;
// }
// }
@@ -107,50 +107,50 @@ else if (file.getName().equals(GeronimoUtils.APP_CLIENT_PLAN_NAME))
// }
// }
- // Trace.tracePoint("EXIT", "GeronimoV21Utils.getConfigId2", null);
+ // Trace.tracePoint("EXIT", "GeronimoV30Utils.getConfigId2", null);
// return null;
//}
public static String getConfigId(IModule module) throws Exception {
- Trace.tracePoint("ENTRY", "GeronimoV21Utils.getConfigId", module);
+ Trace.tracePoint("ENTRY", "GeronimoV30Utils.getConfigId", module);
Environment environment = null;
if (isWebModule(module)) {
if (getWebDeploymentPlan(module)!=null) {
- WebApp plan = getWebDeploymentPlan(module).getValue();
- if (plan != null)
- environment = plan.getEnvironment();
+ WebApp plan = getWebDeploymentPlan(module).getValue();
+ if (plan != null)
+ environment = plan.getEnvironment();
}
}
else if (isEjbJarModule(module)) {
- if (getOpenEjbDeploymentPlan(module)!=null) {
- OpenejbJar plan = getOpenEjbDeploymentPlan(module).getValue();
- if (plan != null)
- environment = plan.getEnvironment();
- }
+ if (getOpenEjbDeploymentPlan(module)!=null) {
+ OpenejbJar plan = getOpenEjbDeploymentPlan(module).getValue();
+ if (plan != null)
+ environment = plan.getEnvironment();
+ }
}
else if (isEarModule(module)) {
- if (getApplicationDeploymentPlan(module)!=null) {
- Application plan = getApplicationDeploymentPlan(module).getValue();
- if (plan != null)
- environment = plan.getEnvironment();
- }
+ if (getApplicationDeploymentPlan(module)!=null) {
+ Application plan = getApplicationDeploymentPlan(module).getValue();
+ if (plan != null)
+ environment = plan.getEnvironment();
+ }
}
else if (isRARModule(module)) {
- if (getConnectorDeploymentPlan(module)!=null) {
- Connector plan = getConnectorDeploymentPlan(module).getValue();
- if (plan != null)
- environment = plan.getEnvironment();
- }
+ if (getConnectorDeploymentPlan(module)!=null) {
+ Connector plan = getConnectorDeploymentPlan(module).getValue();
+ if (plan != null)
+ environment = plan.getEnvironment();
+ }
}
if (environment != null
&& environment.getModuleId() != null) {
- Trace.tracePoint("EXIT", "GeronimoV21Utils.getConfigId", getQualifiedConfigID(environment.getModuleId()));
+ Trace.tracePoint("EXIT", "GeronimoV30Utils.getConfigId", getQualifiedConfigID(environment.getModuleId()));
return getQualifiedConfigID(environment.getModuleId());
}
- Trace.tracePoint("EXIT", "GeronimoV21Utils.getConfigId", getId(module));
+ Trace.tracePoint("EXIT", "GeronimoV30Utils.getConfigId", getId(module));
return getId(module);
}
@@ -208,57 +208,57 @@ public static JAXBElement getConnectorDeploymentPlan(IVirtualComponent comp) thr
}
public static JAXBElement getApplicationDeploymentPlan(IFile file) throws Exception {
- Trace.tracePoint("ENTRY", "GeronimoV21Utils.getApplicationDeploymentPlan", file);
+ Trace.tracePoint("ENTRY", "GeronimoV30Utils.getApplicationDeploymentPlan", file);
if (file.getName().equals(APP_PLAN_NAME) && file.exists()) {
- return JAXBUtils.unmarshalFilterDeploymentPlan(file);
+ return JAXBUtils.unmarshalFilterDeploymentPlan(file);
}
- Trace.tracePoint("EXIT", "GeronimoV21Utils.getApplicationDeploymentPlan", null);
+ Trace.tracePoint("EXIT", "GeronimoV30Utils.getApplicationDeploymentPlan", null);
return null;
}
public static JAXBElement getApplicationClientDeploymentPlan(IFile file) throws Exception {
- Trace.tracePoint("ENTRY", "GeronimoV21Utils.getApplicationClientDeploymentPlan", file);
+ Trace.tracePoint("ENTRY", "GeronimoV30Utils.getApplicationClientDeploymentPlan", file);
if (file.getName().equals(APP_CLIENT_PLAN_NAME) && file.exists()) {
- return JAXBUtils.unmarshalFilterDeploymentPlan(file);
+ return JAXBUtils.unmarshalFilterDeploymentPlan(file);
}
- Trace.tracePoint("EXIT", "GeronimoV21Utils.getApplicationClientDeploymentPlan", null);
+ Trace.tracePoint("EXIT", "GeronimoV30Utils.getApplicationClientDeploymentPlan", null);
return null;
}
public static JAXBElement getWebDeploymentPlan(IFile file) throws Exception {
- Trace.tracePoint("ENTRY", "GeronimoV21Utils.getWebDeploymentPlan", file);
+ Trace.tracePoint("ENTRY", "GeronimoV30Utils.getWebDeploymentPlan", file);
if (file.getName().equals(WEB_PLAN_NAME) && file.exists()) {
- return JAXBUtils.unmarshalFilterDeploymentPlan(file);
+ return JAXBUtils.unmarshalFilterDeploymentPlan(file);
}
- Trace.tracePoint("EXIT", "GeronimoV21Utils.getWebDeploymentPlan", null);
+ Trace.tracePoint("EXIT", "GeronimoV30Utils.getWebDeploymentPlan", null);
return null;
}
public static JAXBElement getOpenEjbDeploymentPlan(IFile file) throws Exception {
- Trace.tracePoint("ENTRY", "GeronimoV21Utils.getOpenEjbDeploymentPlan", file);
+ Trace.tracePoint("ENTRY", "GeronimoV30Utils.getOpenEjbDeploymentPlan", file);
if (file.getName().equals(OPENEJB_PLAN_NAME) && file.exists()) {
- return JAXBUtils.unmarshalFilterDeploymentPlan(file);
+ return JAXBUtils.unmarshalFilterDeploymentPlan(file);
}
- Trace.tracePoint("EXIT", "GeronimoV21Utils.getOpenEjbDeploymentPlan", null);
+ Trace.tracePoint("EXIT", "GeronimoV30Utils.getOpenEjbDeploymentPlan", null);
return null;
}
public static JAXBElement getConnectorDeploymentPlan(IFile file) throws Exception {
- Trace.tracePoint("ENTRY", "GeronimoV21Utils.getConnectorDeploymentPlan", file);
+ Trace.tracePoint("ENTRY", "GeronimoV30Utils.getConnectorDeploymentPlan", file);
if (file.getName().equals(CONNECTOR_PLAN_NAME) && file.exists()) {
- return JAXBUtils.unmarshalFilterDeploymentPlan(file);
+ return JAXBUtils.unmarshalFilterDeploymentPlan(file);
}
- Trace.tracePoint("EXIT", "GeronimoV21Utils.getConnectorDeploymentPlan", null);
+ Trace.tracePoint("EXIT", "GeronimoV30Utils.getConnectorDeploymentPlan", null);
return null;
}
View
34 ...t/v30/core/GeronimoV21VersionHandler.java → ...t/v30/core/GeronimoV30VersionHandler.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.geronimo.st.v21.core;
+package org.apache.geronimo.st.v30.core;
import javax.enterprise.deploy.spi.TargetModuleID;
@@ -25,21 +25,21 @@
/**
* @version $Rev$ $Date$
*/
-public class GeronimoV21VersionHandler implements IGeronimoVersionHandler {
+public class GeronimoV30VersionHandler implements IGeronimoVersionHandler {
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#getConfigID(org.eclipse.wst.server.core.IModule)
- */
- public String getConfigID(IModule module) throws Exception {
- return GeronimoV21Utils.getConfigId(module);
- }
-
- /* (non-Javadoc)
- * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#createTargetModuleId(java.lang.String)
- */
- public TargetModuleID createTargetModuleId(String configId) {
- return new TargetModuleIDImpl(null, configId);
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#getConfigID(org.eclipse.wst.server.core.IModule)
+ */
+ public String getConfigID(IModule module) throws Exception {
+ return GeronimoV30Utils.getConfigId(module);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#createTargetModuleId(java.lang.String)
+ */
+ public TargetModuleID createTargetModuleId(String configId) {
+ return new TargetModuleIDImpl(null, configId);
+ }
}
View
24 ...ions/GeronimoV21FacetInstallDelegate.java → ...ions/GeronimoV30FacetInstallDelegate.java
@@ -14,10 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.geronimo.st.v21.core.operations;
+package org.apache.geronimo.st.v30.core.operations;
import org.apache.geronimo.st.core.GeronimoFacetInstallDelegate;
-import org.apache.geronimo.st.v21.core.internal.Trace;
+import org.apache.geronimo.st.v30.core.internal.Trace;
import org.eclipse.core.resources.IProject;
import org.eclipse.jst.common.project.facet.JavaProjectFacetCreationDataModelProvider;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
@@ -28,15 +28,15 @@
/**
* @version $Rev$ $Date$
*/
-public class GeronimoV21FacetInstallDelegate extends GeronimoFacetInstallDelegate {
+public class GeronimoV30FacetInstallDelegate extends GeronimoFacetInstallDelegate {
- public IDataModelOperation createDeploymentPlanCreationOp(IProject project, Object config) {
- Trace.tracePoint("Entry", "GeronimoV21FacetInstallDelegate.createDeploymentPlanCreationOp", project, config);
-
- IDataModel model = DataModelFactory.createDataModel(new JavaProjectFacetCreationDataModelProvider());
- model.setStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, project.getName());
-
- Trace.tracePoint("Exit ", "GeronimoV21FacetInstallDelegate.createDeploymentPlanCreationOp");
- return new V21DeploymentPlanCreationOperation(model, config);
- }
+ public IDataModelOperation createDeploymentPlanCreationOp(IProject project, Object config) {
+ Trace.tracePoint("Entry", "GeronimoV30FacetInstallDelegate.createDeploymentPlanCreationOp", project, config);
+
+ IDataModel model = DataModelFactory.createDataModel(new JavaProjectFacetCreationDataModelProvider());
+ model.setStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, project.getName());
+
+ Trace.tracePoint("Exit ", "GeronimoV30FacetInstallDelegate.createDeploymentPlanCreationOp");
+ return new V30DeploymentPlanCreationOperation(model, config);
+ }
}
View
258 ...n/java/org/apache/geronimo/st/v30/core/operations/V21DeploymentPlanCreationOperation.java
@@ -1,258 +0,0 @@
-/*
- * 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.
- */
-package org.apache.geronimo.st.v21.core.operations;
-
-import javax.xml.bind.JAXBElement;
-
-import org.apache.geronimo.jee.application.Application;
-import org.apache.geronimo.jee.applicationclient.ApplicationClient;
-import org.apache.geronimo.jee.connector.Connector;
-import org.apache.geronimo.jee.connector.Resourceadapter;
-import org.apache.geronimo.jee.deployment.Artifact;
-import org.apache.geronimo.jee.deployment.Dependencies;
-import org.apache.geronimo.jee.deployment.Dependency;
-import org.apache.geronimo.jee.deployment.Environment;
-import org.apache.geronimo.jee.openejb.OpenejbJar;
-import org.apache.geronimo.jee.web.WebApp;
-import org.apache.geronimo.st.core.jaxb.JAXBUtils;
-import org.apache.geronimo.st.core.operations.DeploymentPlanCreationOperation;
-import org.apache.geronimo.st.v21.core.DeploymentPlanInstallConfig;
-import org.apache.geronimo.st.v21.core.internal.Trace;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-
-/**
- * <strong>V21DeploymentPlanCreationOperation</strong>
- * is invoked when projects are created that are to be deployment on the 2.1
- * version of the Geronimo server. One of these Geronimo-specific deployment
- * plans is created as a result and is inserted into the user's Eclipse workspace in
- * the appropriate folder:
- *
- * <ol>
- * <li>geronimo-application.xml
- * <li>geronimo-application-client.xml
- * <li>geronimo-ra.xml
- * <li>geronimo-service.xml
- * <li>geronimo-web.xml
- * <li>openejb-jar.xml
- * </ol>
- *
- * @version $Rev$ $Date$
- */
-public class V21DeploymentPlanCreationOperation extends DeploymentPlanCreationOperation {
-
- DeploymentPlanInstallConfig cfg;
-
- public V21DeploymentPlanCreationOperation(IDataModel model, Object config) {
- super(model, config);
- Trace.tracePoint("Constructor", "V21DeploymentPlanCreationOperation", model, config);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoApplicationDeploymentPlan(org.eclipse.core.resources.IFile)
- */
- public JAXBElement createGeronimoApplicationDeploymentPlan(IFile dpFile) throws Exception {
- Trace.tracePoint("Entry",
- "V21DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", dpFile);
-
- org.apache.geronimo.jee.application.ObjectFactory applicationFactory = new org.apache.geronimo.jee.application.ObjectFactory();
- Application application = applicationFactory.createApplication();
-
- application.setApplicationName(getProject().getName());
- application.setEnvironment(getConfigEnvironment());
-
- JAXBElement jaxbElement = applicationFactory.createApplication(application);
- JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
-
- Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan",
- applicationFactory.createApplication(application));
- return applicationFactory.createApplication(application);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoWebDeploymentPlan(org.eclipse.core.resources.IFile)
- */
- public JAXBElement createGeronimoWebDeploymentPlan(IFile dpFile) throws Exception {
- Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan",
- dpFile, dpFile.getFullPath());
-
- org.apache.geronimo.jee.web.ObjectFactory webFactory = new org.apache.geronimo.jee.web.ObjectFactory();
- WebApp web = webFactory.createWebApp();
-
- web.setContextRoot("/" + getProject().getName());
- web.setEnvironment(getConfigEnvironment());
-
- JAXBElement jaxbElement = webFactory.createWebApp(web);
- JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
-
- Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", jaxbElement);
- return jaxbElement;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createOpenEjbDeploymentPlan(org.eclipse.core.resources.IFile)
- */
- public JAXBElement createOpenEjbDeploymentPlan(IFile dpFile) throws Exception {
- Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", dpFile);
-
- org.apache.geronimo.jee.openejb.ObjectFactory ejbFactory = new org.apache.geronimo.jee.openejb.ObjectFactory();
- OpenejbJar ejbJar = ejbFactory.createOpenejbJar();
-
- ejbJar.setEnvironment(getConfigEnvironment());
-
- JAXBElement jaxbElement = ejbFactory.createOpenejbJar(ejbJar);
- JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
-
- Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", jaxbElement);
- return jaxbElement;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createConnectorDeploymentPlan(org.eclipse.core.resources.IFile)
- */
- public JAXBElement createConnectorDeploymentPlan(IFile dpFile) throws Exception {
- Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createConnectorDeploymentPlan", dpFile);
-
- org.apache.geronimo.jee.connector.ObjectFactory connectorFactory = new org.apache.geronimo.jee.connector.ObjectFactory();
- Connector connector = connectorFactory.createConnector();
- Resourceadapter resourceadapter = connectorFactory.createResourceadapter();
-
- connector.setEnvironment(getConfigEnvironment());
- connector.getResourceadapter().add(resourceadapter);
-
- JAXBElement jaxbElement = connectorFactory.createConnector(connector);
- JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
-
- Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createConnectorDeploymentPlan", jaxbElement);
- return jaxbElement;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoApplicationDeploymentPlan(org.eclipse.core.resources.IFile)
- */
- public JAXBElement createGeronimoApplicationClientDeploymentPlan(IFile dpFile) throws Exception {
- Trace.tracePoint("Entry","V21DeploymentPlanCreationOperation.createGeronimoApplicationClientDeploymentPlan", dpFile);
-
- org.apache.geronimo.jee.applicationclient.ObjectFactory applicationClientFactory = new org.apache.geronimo.jee.applicationclient.ObjectFactory();
- ApplicationClient applicationClient = applicationClientFactory.createApplicationClient();
-
- applicationClient.setServerEnvironment(getConfigEnvironment());
- applicationClient.setClientEnvironment(getConfigEnvironment());
-
- JAXBElement jaxbElement = applicationClientFactory.createApplicationClient(applicationClient);
- JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
-
- Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createGeronimoApplicationClientDeploymentPlan", applicationClientFactory.createApplicationClient(applicationClient));
- return applicationClientFactory.createApplicationClient(applicationClient);
- }
-
-
- public Environment getConfigEnvironment() {
- Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.getConfigEnvironment");
-
- if (config != null && config instanceof DeploymentPlanInstallConfig) {
- cfg = (DeploymentPlanInstallConfig) config;
- }
-
- String groupId = cfg != null && hasValue(cfg.getGroupId()) ? cfg.getGroupId()
- : "default";
- String artifactId = cfg != null && hasValue(cfg.getArtifactId()) ? cfg.getArtifactId()
- : getProject().getName();
- String version = cfg != null && hasValue(cfg.getVersion()) ? cfg.getVersion()
- : "1.0";
- String type = cfg != null && hasValue(cfg.getType()) ? cfg.getType()
- : "car";
-
- Artifact artifact = createArtifact(groupId, artifactId, version, type);
- org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
-
- Environment env = serviceFactory.createEnvironment();
- env.setModuleId(artifact);
-
- if (cfg != null && cfg.isSharedLib()) {
- Dependencies dt = serviceFactory.createDependencies();
- Dependency sharedLib = createDependency("org.apache.geronimo.configs", "sharedlib", null, "car");
- dt.getDependency().add(sharedLib);
- env.setDependencies(dt);
- }
-
- Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.getConfigEnvironment", env);
- return env;
- }
-
-
- public static Artifact createArtifact(String groupId, String artifactId, String version, String type) {
- Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createArtifact", groupId, artifactId, version, type);
-
- org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
- Artifact artifact = serviceFactory.createArtifact();
-
- if (groupId != null)
- artifact.setGroupId(groupId);
- if (artifactId != null)
- artifact.setArtifactId(artifactId);
- if (version != null)
- artifact.setVersion(version);
- artifact.setType(type);
-
- Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createArtifact", artifact);
- return artifact;
- }
-
-
- public static Dependency createDependency(String groupId, String artifactId, String version, String type) {
- Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.createDependency", groupId, artifactId, version, type);
-
- org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
- Dependency dependency = serviceFactory.createDependency();
- if (groupId != null)
- dependency.setGroupId(groupId);
- if (artifactId != null)
- dependency.setArtifactId(artifactId);
- if (version != null)
- dependency.setVersion(version);
- dependency.setType(type);
-
- Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.createDependency", dependency);
- return dependency;
- }
-
-
- private static boolean hasValue(String attribute) {
- Trace.tracePoint("Entry", "V21DeploymentPlanCreationOperation.hasValue", attribute);
- Trace.tracePoint("Exit ", "V21DeploymentPlanCreationOperation.hasValue", (attribute != null && attribute.trim().length() != 0) );
-
- return attribute != null && attribute.trim().length() != 0;
- }
-
-}
View
258 ...n/java/org/apache/geronimo/st/v30/core/operations/V30DeploymentPlanCreationOperation.java
@@ -0,0 +1,258 @@
+/*
+ * 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.
+ */
+package org.apache.geronimo.st.v30.core.operations;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.jee.application.Application;
+import org.apache.geronimo.jee.applicationclient.ApplicationClient;
+import org.apache.geronimo.jee.connector.Connector;
+import org.apache.geronimo.jee.connector.Resourceadapter;
+import org.apache.geronimo.jee.deployment.Artifact;
+import org.apache.geronimo.jee.deployment.Dependencies;
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.deployment.Environment;
+import org.apache.geronimo.jee.openejb.OpenejbJar;
+import org.apache.geronimo.jee.web.WebApp;
+import org.apache.geronimo.st.core.jaxb.JAXBUtils;
+import org.apache.geronimo.st.core.operations.DeploymentPlanCreationOperation;
+import org.apache.geronimo.st.v30.core.DeploymentPlanInstallConfig;
+import org.apache.geronimo.st.v30.core.internal.Trace;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+
+/**
+ * <strong>V30DeploymentPlanCreationOperation</strong>
+ * is invoked when projects are created that are to be deployment on the 2.1
+ * version of the Geronimo server. One of these Geronimo-specific deployment
+ * plans is created as a result and is inserted into the user's Eclipse workspace in
+ * the appropriate folder:
+ *
+ * <ol>
+ * <li>geronimo-application.xml
+ * <li>geronimo-application-client.xml
+ * <li>geronimo-ra.xml
+ * <li>geronimo-service.xml
+ * <li>geronimo-web.xml
+ * <li>openejb-jar.xml
+ * </ol>
+ *
+ * @version $Rev$ $Date$
+ */
+public class V30DeploymentPlanCreationOperation extends DeploymentPlanCreationOperation {
+
+ DeploymentPlanInstallConfig cfg;
+
+ public V30DeploymentPlanCreationOperation(IDataModel model, Object config) {
+ super(model, config);
+ Trace.tracePoint("Constructor", "V30DeploymentPlanCreationOperation", model, config);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoApplicationDeploymentPlan(org.eclipse.core.resources.IFile)
+ */
+ public JAXBElement createGeronimoApplicationDeploymentPlan(IFile dpFile) throws Exception {
+ Trace.tracePoint("Entry",
+ "V30DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan", dpFile);
+
+ org.apache.geronimo.jee.application.ObjectFactory applicationFactory = new org.apache.geronimo.jee.application.ObjectFactory();
+ Application application = applicationFactory.createApplication();
+
+ application.setApplicationName(getProject().getName());
+ application.setEnvironment(getConfigEnvironment());
+
+ JAXBElement jaxbElement = applicationFactory.createApplication(application);
+ JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+ Trace.tracePoint("Exit ", "V30DeploymentPlanCreationOperation.createGeronimoApplicationDeploymentPlan",
+ applicationFactory.createApplication(application));
+ return applicationFactory.createApplication(application);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoWebDeploymentPlan(org.eclipse.core.resources.IFile)
+ */
+ public JAXBElement createGeronimoWebDeploymentPlan(IFile dpFile) throws Exception {
+ Trace.tracePoint("Entry", "V30DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan",
+ dpFile, dpFile.getFullPath());
+
+ org.apache.geronimo.jee.web.ObjectFactory webFactory = new org.apache.geronimo.jee.web.ObjectFactory();
+ WebApp web = webFactory.createWebApp();
+
+ web.setContextRoot("/" + getProject().getName());
+ web.setEnvironment(getConfigEnvironment());
+
+ JAXBElement jaxbElement = webFactory.createWebApp(web);
+ JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+ Trace.tracePoint("Exit ", "V30DeploymentPlanCreationOperation.createGeronimoWebDeploymentPlan", jaxbElement);
+ return jaxbElement;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createOpenEjbDeploymentPlan(org.eclipse.core.resources.IFile)
+ */
+ public JAXBElement createOpenEjbDeploymentPlan(IFile dpFile) throws Exception {
+ Trace.tracePoint("Entry", "V30DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", dpFile);
+
+ org.apache.geronimo.jee.openejb.ObjectFactory ejbFactory = new org.apache.geronimo.jee.openejb.ObjectFactory();
+ OpenejbJar ejbJar = ejbFactory.createOpenejbJar();
+
+ ejbJar.setEnvironment(getConfigEnvironment());
+
+ JAXBElement jaxbElement = ejbFactory.createOpenejbJar(ejbJar);
+ JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+ Trace.tracePoint("Exit ", "V30DeploymentPlanCreationOperation.createOpenEjbDeploymentPlan", jaxbElement);
+ return jaxbElement;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createConnectorDeploymentPlan(org.eclipse.core.resources.IFile)
+ */
+ public JAXBElement createConnectorDeploymentPlan(IFile dpFile) throws Exception {
+ Trace.tracePoint("Entry", "V30DeploymentPlanCreationOperation.createConnectorDeploymentPlan", dpFile);
+
+ org.apache.geronimo.jee.connector.ObjectFactory connectorFactory = new org.apache.geronimo.jee.connector.ObjectFactory();
+ Connector connector = connectorFactory.createConnector();
+ Resourceadapter resourceadapter = connectorFactory.createResourceadapter();
+
+ connector.setEnvironment(getConfigEnvironment());
+ connector.getResourceadapter().add(resourceadapter);
+
+ JAXBElement jaxbElement = connectorFactory.createConnector(connector);
+ JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+ Trace.tracePoint("Exit ", "V30DeploymentPlanCreationOperation.createConnectorDeploymentPlan", jaxbElement);
+ return jaxbElement;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.geronimo.st.core.operations.IDeploymentPlanCreationOp#createGeronimoApplicationDeploymentPlan(org.eclipse.core.resources.IFile)
+ */
+ public JAXBElement createGeronimoApplicationClientDeploymentPlan(IFile dpFile) throws Exception {
+ Trace.tracePoint("Entry","V30DeploymentPlanCreationOperation.createGeronimoApplicationClientDeploymentPlan", dpFile);
+
+ org.apache.geronimo.jee.applicationclient.ObjectFactory applicationClientFactory = new org.apache.geronimo.jee.applicationclient.ObjectFactory();
+ ApplicationClient applicationClient = applicationClientFactory.createApplicationClient();
+
+ applicationClient.setServerEnvironment(getConfigEnvironment());
+ applicationClient.setClientEnvironment(getConfigEnvironment());
+
+ JAXBElement jaxbElement = applicationClientFactory.createApplicationClient(applicationClient);
+ JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
+
+ Trace.tracePoint("Exit ", "V30DeploymentPlanCreationOperation.createGeronimoApplicationClientDeploymentPlan", applicationClientFactory.createApplicationClient(applicationClient));
+ return applicationClientFactory.createApplicationClient(applicationClient);
+ }
+
+
+ public Environment getConfigEnvironment() {
+ Trace.tracePoint("Entry", "V30DeploymentPlanCreationOperation.getConfigEnvironment");
+
+ if (config != null && config instanceof DeploymentPlanInstallConfig) {
+ cfg = (DeploymentPlanInstallConfig) config;
+ }
+
+ String groupId = cfg != null && hasValue(cfg.getGroupId()) ? cfg.getGroupId()
+ : "default";
+ String artifactId = cfg != null && hasValue(cfg.getArtifactId()) ? cfg.getArtifactId()
+ : getProject().getName();
+ String version = cfg != null && hasValue(cfg.getVersion()) ? cfg.getVersion()
+ : "1.0";
+ String type = cfg != null && hasValue(cfg.getType()) ? cfg.getType()
+ : "car";
+
+ Artifact artifact = createArtifact(groupId, artifactId, version, type);
+ org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
+
+ Environment env = serviceFactory.createEnvironment();
+ env.setModuleId(artifact);
+
+ if (cfg != null && cfg.isSharedLib()) {
+ Dependencies dt = serviceFactory.createDependencies();
+ Dependency sharedLib = createDependency("org.apache.geronimo.configs", "sharedlib", null, "car");
+ dt.getDependency().add(sharedLib);
+ env.setDependencies(dt);
+ }
+
+ Trace.tracePoint("Exit ", "V30DeploymentPlanCreationOperation.getConfigEnvironment", env);
+ return env;
+ }
+
+
+ public static Artifact createArtifact(String groupId, String artifactId, String version, String type) {
+ Trace.tracePoint("Entry", "V30DeploymentPlanCreationOperation.createArtifact", groupId, artifactId, version, type);
+
+ org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
+ Artifact artifact = serviceFactory.createArtifact();
+
+ if (groupId != null)
+ artifact.setGroupId(groupId);
+ if (artifactId != null)
+ artifact.setArtifactId(artifactId);
+ if (version != null)
+ artifact.setVersion(version);
+ artifact.setType(type);
+
+ Trace.tracePoint("Exit ", "V30DeploymentPlanCreationOperation.createArtifact", artifact);
+ return artifact;
+ }
+
+
+ public static Dependency createDependency(String groupId, String artifactId, String version, String type) {
+ Trace.tracePoint("Entry", "V30DeploymentPlanCreationOperation.createDependency", groupId, artifactId, version, type);
+
+ org.apache.geronimo.jee.deployment.ObjectFactory serviceFactory = new org.apache.geronimo.jee.deployment.ObjectFactory();
+ Dependency dependency = serviceFactory.createDependency();
+ if (groupId != null)
+ dependency.setGroupId(groupId);
+ if (artifactId != null)
+ dependency.setArtifactId(artifactId);
+ if (version != null)
+ dependency.setVersion(version);
+ dependency.setType(type);
+
+ Trace.tracePoint("Exit ", "V30DeploymentPlanCreationOperation.createDependency", dependency);
+ return dependency;
+ }
+
+
+ private static boolean hasValue(String attribute) {
+ Trace.tracePoint("Entry", "V30DeploymentPlanCreationOperation.hasValue", attribute);
+ Trace.tracePoint("Exit ", "V30DeploymentPlanCreationOperation.hasValue", (attribute != null && attribute.trim().length() != 0) );
+
+ return attribute != null && attribute.trim().length() != 0;
+ }
+
+}
View
40 pom.xml
@@ -99,14 +99,14 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <version>4.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
- <version>2.0</version>
+ <version>2.2</version>
<exclusions>
<exclusion>
<groupId>javax.xml.bind</groupId>
@@ -118,13 +118,13 @@
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
- <version>2.0.5</version>
+ <version>2.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
- <version>2.0.5</version>
+ <version>2.2</version>
<exclusions>
<exclusion>
<groupId>javax.xml.bind</groupId>
@@ -140,13 +140,13 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
- <version>1.0-alpha-7</version>
+ <version>1.0-alpha-12</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
+ <version>1.1.1</version>
</dependency>
<dependency>
@@ -158,19 +158,19 @@
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-activation_1.1_spec</artifactId>
- <version>1.0.2</version>
+ <version>1.0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-deployment_1.1_spec</artifactId>
- <version>1.0</version>
+ <version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-javaee-deployment_1.1MR3_spec</artifactId>
- <version>1.1-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
</dependency>
<dependency>
@@ -182,20 +182,20 @@
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
- <version>1.1</version>
+ <version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.4.3</version>
+ <version>1.5.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
- <version>1.4.3</version>
+ <version>1.5.5</version>
</dependency>
<dependency>
@@ -213,19 +213,19 @@
<dependency>
<groupId>org.openqa.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</artifactId>
- <version>1.0-beta-1</version>
+ <version>1.0-beta-2</version>
</dependency>
<dependency>
<groupId>org.openqa.selenium.server</groupId>
<artifactId>selenium-server</artifactId>
- <version>1.0-beta-1</version>
+ <version>1.0-beta-2</version>
</dependency>
<dependency>
<groupId>org.openqa.selenium.core</groupId>
<artifactId>selenium-core</artifactId>
- <version>1.0-beta-1</version>
+ <version>1.0-beta-2</version>
</dependency>
</dependencies>
</dependencyManagement>
@@ -240,7 +240,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.1</version>
+ <version>1.3</version>
<dependencies>
<dependency>
<groupId>oro</groupId>
@@ -272,7 +272,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-1</version>
+ <version>2.2-beta-4</version>
</plugin>
<plugin>
@@ -284,7 +284,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.3</version>
+ <version>2.4.3</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
@@ -293,7 +293,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
- <version>1.0-beta-1</version>
+ <version>1.0-beta-4</version>
</plugin>
<plugin>
@@ -318,7 +318,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
- <version>2.2</version>
+ <version>2.4</version>
<configuration>
<filesets>
<fileset>

0 comments on commit cb04c30

Please sign in to comment.