Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
How to Mavenize Liferay Plugins Ant build.xml
<?xml version="1.0"?>
<!-- Download Maven ant tasks jar form and drop it into your $ANT_HOME/lib -->
<project name="mavenized-liferay-plugins-build" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant" default="copy-dependencies-and-deploy">
<import file="../build-common-portlet.xml" />
<property name="app.lib.dir" value="docroot/WEB-INF/lib" />
<!-- Include the your project dependencies -->
<artifact:dependencies filesetId="app.cutom.deps" usescope="runtime">
<!-- Add dependency of the maven format -->
<!-- e.g. for adding slf4j dependecy -->
<dependency groupId="org.slf4j" artifactId="slf4j-log4j12" version="${slf4j.version}" scope="provided" />
<!-- end example-->
<!-- Add more if you need, all will end up in docroot/WEB-INF/lib -->
<!-- =================================
target: copy-dependencies
================================= -->
<target name="copy-dependencies" description="copies all the dependcies">
<copy todir="${app.lib.dir}">
<fileset refid="app.cutom.deps" />
<!-- This mapper strips off all leading directory information -->
<mapper type="flatten" />
<!-- Just ensure that we copy all application sepecific libraries to the docroot/WEB-INF/lib folder so that its picked up by the Liferay build-->
<target name="copy-dependencies-and-deploy">
<antcall target="copy-dependencies" />
<!-- Call the Liferay deploy target to deploy to the necessary ${auto.deploy.dir} - default build-->
<antcall target="deploy" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.