Last active
September 8, 2017 17:43
-
-
Save pcwhite/ef1db7f7f1377de59f7d5d2f5b6f8f53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<project name="app" basedir="." default="compile"> | |
<import file="build.xml" /> | |
<property name="app.server" value="tomcat" /> | |
<property name="database.name" value="lportal_exercise4" /> | |
<target name="compile" description="Compiles source into bundle and starts up portal and runs a test"> | |
<ant antfile="build-dist.xml" target="unzip-tomcat" /> | |
<antcall target="initDatabase" /> | |
<antcall target="portal-ext" /> | |
<antcall target="all" /> | |
<antcall target="catalinaRun" /> | |
<antcall target="testcase" /> | |
</target> | |
<target name="initDatabase" description="Creates database, drops it if it already exists"> | |
<exec executable="mysql"> | |
<arg line="-e "drop database if exists ${database.name}";" /> | |
<arg line="-e "create database ${database.name}";" /> | |
</exec> | |
</target> | |
<target name="portal-ext" description="Creates/updates portal-ext.properties"> | |
<property name="jdbc.default.driverClassName" value="com.mysql.jdbc.Driver" /> | |
<property name="jdbc.default.url" value="jdbc\:mysql\://localhost/${database.name}?useUnicode\=true&characterEncoding\=UTF-8&useFastDateParsing\=false" /> | |
<property name="browser.launcher.url" value="http://localhost:8080/" /> | |
<property name="PATH_portal-ext.properties" value="portal-impl/src/portal-ext.properties" /> | |
<propertyfile file="${PATH_portal-ext.properties}"> | |
<entry key="plugins.notification.enabled" value="false" /> | |
<entry key="jdbc.default.jndi.name" value="" /> | |
<entry key="jdbc.default.driverClassName" value="${jdbc.default.driverClassName}" /> | |
<entry key="jdbc.default.url" value="@DEFAULT_URL" /> | |
<entry key="jdbc.default.username" value="" /> | |
<entry key="jdbc.default.password" value="" /> | |
<entry key="browser.launcher.url" value="@LAUNCHER_URL" /> | |
<entry key="index.on.startup" value="true" /> | |
<entry key="mail.session.jndi.name" value="" /> | |
<entry key="axis.servlet.hosts.allowed" value="" /> | |
<entry key="tunnel.servlet.hosts.allowed" value="" /> | |
<entry key="setup.wizard.enabled" value="false" /> | |
<entry key="terms.of.use.required" value="false" /> | |
<entry key="users.reminder.queries.enabled" value="false" /> | |
</propertyfile> | |
<replace file="${PATH_portal-ext.properties}" token="@DEFAULT_URL" value="${jdbc.default.url}" /> | |
<replace file="${PATH_portal-ext.properties}" token="@LAUNCHER_URL" value="${browser.launcher.url}" /> | |
</target> | |
<target name="catalinaRun" description="starts up portal with tomcat"> | |
<property name="username" value="philipwhite" /> | |
<property name="bundle" value="ee-7.0.x_exercise_branch" /> | |
<property name="tomcat.home" value="/Users/${username}/Portals/liferay.com/${bundle}/tomcat-8.0.32" /> | |
<java classname="org.apache.catalina.startup.Bootstrap" fork="true"> | |
<classpath path="${tomcat.home}/bin/bootstrap.jar:${tomcat.home}/bin/tomcat-juli.jar" /> | |
<jvmarg value="-Dcatalina.home=${tomcat.home}"/> | |
</java> | |
</target> | |
<target name="testcase" description="runs a predefinied test case to make sure the portal is working properly"> | |
<property name="test.class" value="TestBlogs_exercise" /> | |
<ant antfile="build-test.xml" target="run-selenium-test" /> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment