blob: 742d621a0b7f4b578ff316ce997f881f507aae87 [file] [log] [blame]
<?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.
-->
<!-- This generates a geronimo-application.xml file used in an exploded EAR structure (no WAR files).
The file is copied in the META-INF directory in this EAR structure ready to deploy using the inPlace deployer tool option
Eventually irrelevant generated modules and dependencies should be removed (but it should not hurt if not done)
The indentation is specifically done for the rendered file
-->
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
xmlns:security="http://geronimo.apache.org/xml/ns/security-1.2">
<dep:environment>
<dep:moduleId>
<dep:groupId>org.ofbiz</dep:groupId>
<dep:artifactId>ofbiz${instanceNumber}</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>ear</dep:type>
</dep:moduleId>
<dep:dependencies>
<#list classpathJars as jar_version>
<#assign jar = jar_version.substring(0,jar_version.indexOf("#"))/>
<#assign version = jar_version.substring(jar_version.indexOf("#") + 1)/>
<dependency>
<dep:groupId>org.ofbiz</dep:groupId>
<dep:artifactId>${jar}</dep:artifactId>
<dep:version>${version}</dep:version>
<dep:type>jar</dep:type>
</dependency>
</#list>
</dep:dependencies>
<dep:hidden-classes/>
<dep:non-overridable-classes/>
</dep:environment>
<#list webApps as webapp>
<#assign location = webapp.getLocation()?if_exists/>
<#assign origin = webapp.getLocation()?if_exists/>
<#if location.contains("/framework/") && (location.contains("/webtools/") || location.contains("/images/"))>
<#assign location = location.substring(location.lastIndexOf("framework"))/>
</#if>
<#if location.contains("/applications/")>
<#assign location = location.substring(location.lastIndexOf("applications"))/>
</#if>
<#if location.contains("/specialpurpose/") && !location.contains("/pos/")>
<#assign location = location.substring(location.lastIndexOf("specialpurpose"))/>
</#if>
<#if location.contains("/hot-deploy/")>
<#assign location = location.substring(location.lastIndexOf("hot-deploy"))/>
</#if>
<#if location != origin>
<module>
<web>${location}/</web>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
<context-root>${webapp.getContextRoot()}${instanceNumber}</context-root>
</web-app>
</module>
</#if>
</#list>
</application>