2012-05-09 17:18:06 -04:00
|
|
|
<?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
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
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
|
2018-10-02 08:32:32 -04:00
|
|
|
under the License.
|
2012-05-09 17:18:06 -04:00
|
|
|
-->
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- Ant build script for JEE version of OpenBooks for -->
|
|
|
|
<!-- WebSphere Application Server with Liberty Profile -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- ====================================================================== -->
|
|
|
|
|
|
|
|
<project name="OpenBooks.JEE.Liberty">
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
<!-- Location of WebSphere Application Server Liberty Profile home/install dir -->
|
|
|
|
<property name="liberty.home" value="/was8.5/gm1216.05/WebSphere/AppServer/wlp"/>
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
<!-- WebSphere Liberty Server name (IP name or address) -->
|
|
|
|
<property name="liberty.server" value=""/>
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
<!-- Location of WebSphere Application Server Liberty Profile bin dir -->
|
|
|
|
<property name="liberty.bin" value="${liberty.home}/bin"/>
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
<!-- WebSphere Liberty Server dropins directory -->
|
|
|
|
<property name="liberty.dropins" value="${liberty.home}/usr/servers/${liberty.server}/dropins"/>
|
|
|
|
|
|
|
|
<target name="pre-package">
|
|
|
|
<echo message="In Liberty pre-package"/>
|
|
|
|
<copy file="${rsrc.dir}/META-INF/persistence.jee.liberty.xml" tofile="${classes.dir}/META-INF/persistence.xml"/>
|
|
|
|
</target>
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
<target name="uninstall"
|
|
|
|
description="Uninstall OpenBooks from the WebSphere Application Server, Liberty Profile">
|
|
|
|
<echo message="Uninstall is a no-op in Liberty, just copy in a new war during the install process..."/>
|
|
|
|
</target>
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
<target name="install"
|
|
|
|
description="Deploy OpenBooks as a WAR application in WebSphere Application Server, Liberty Profile">
|
|
|
|
<condition property="default.deploy">
|
|
|
|
<length string="${liberty.server}" length="0"/>
|
|
|
|
</condition>
|
|
|
|
<antcall target="liberty.deploy"/>
|
|
|
|
<antcall target="liberty.deploy.server"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Default simple deployment if Liberty server is not specified -->
|
|
|
|
<target name="liberty.deploy" if="default.deploy">
|
|
|
|
<echo>
|
|
|
|
--------------------------------------------
|
|
|
|
Creating Derby JDBC provider and data source
|
|
|
|
WAS Liberty Home: ${liberty.home}
|
|
|
|
WAS Liberty Server: ${liberty.server}
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
Nothing to do since "liberty.server" is not set...
|
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Target for installation and deployment of the application when a -->
|
|
|
|
<!-- Liberty server IP name is provided. This type of deployment -->
|
|
|
|
<!-- requires server IP name liberty.home, liberty.server, liberty.dropins, -->
|
|
|
|
<!-- to be provided. -->
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
<target name="liberty.deploy.server" unless="default.deploy">
|
|
|
|
<echo>
|
|
|
|
-------------------------------------------
|
|
|
|
Creating Derby JDBC Provider and DataSource
|
|
|
|
WAS Home: ${liberty.home}
|
|
|
|
WAS Server: ${liberty.server}
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
Have to figure out how to configure datasources in server.xml...
|
|
|
|
</echo>
|
|
|
|
<echo>
|
|
|
|
-------------------------------------
|
|
|
|
Deploying OpenBooks demo application
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
Copying openbooks.war to dropins directory...
|
|
|
|
Liberty server ${liberty.server} should automatically restart application...
|
|
|
|
</echo>
|
|
|
|
<copy file="${target.dir}/openbooks.war" todir="${liberty.dropins}/"/>
|
|
|
|
<exec osfamily="windows" dir="${liberty.bin}" executable="cmd">
|
|
|
|
<arg line="/c server.bat start ${liberty.server}"/>
|
|
|
|
</exec>
|
|
|
|
<exec osfamily="unix" dir="${liberty.bin}" executable="server">
|
|
|
|
<arg line="start ${liberty.server}"/>
|
|
|
|
</exec>
|
2018-10-02 08:32:32 -04:00
|
|
|
|
2012-05-09 17:18:06 -04:00
|
|
|
<echo>
|
|
|
|
-------------------------------------
|
|
|
|
Start OpenBooks via http://localhost:9080/openbooks
|
|
|
|
</echo>
|
|
|
|
</target>
|
|
|
|
</project>
|