| <?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 an 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:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns="http://java.sun.com/xml/ns/javaee" |
| xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" |
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" |
| id="Application_ID" |
| version="5"> |
| |
| <description>The Apache OFBiz Project this is instance ${instanceNumber}</description> |
| <display-name>OFBiz instance ${instanceNumber}</display-name> |
| |
| <#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/")> |
| <#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 id="${webapp.getName()}${instanceNumber}"> |
| <web> |
| <web-uri>${location}/</web-uri> |
| <context-root>${webapp.getContextRoot()}${instanceNumber}</context-root> |
| </web> |
| </module> |
| </#if> |
| </#list> |
| </application> |