portale per la richiesta autorizzazioni sismiche da parte del Genio Civile
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

282 righe
10 KiB

<?xml version="1.0"?>
<!DOCTYPE project>
<project name="portlets" basedir="." default="deploy" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="../build-common-plugins.xml" />
<target name="create">
<if>
<or>
<not>
<isset property="portlet.display.name" />
</not>
<not>
<isset property="portlet.name" />
</not>
</or>
<then>
<fail>This task must be called by the create script.</fail>
</then>
</if>
<property name="portlet.parent.dir" value="${user.dir}" />
<property name="portlet.dir" value="${portlet.parent.dir}/${portlet.name}-portlet" />
<if>
<available file="${portlet.dir}" />
<then>
<fail>${portlet.dir} already exists.</fail>
</then>
</if>
<copy todir="${portlet.dir}">
<fileset
dir="${sdk.dir}/tools/templates/portlet_tmpl"
/>
</copy>
<antelope:stringutil string="${portlet.display.name}" property="portlet.java.class.name">
<antelope:replace regex="\s+" replacement="" />
<antelope:trim />
</antelope:stringutil>
<antelope:stringutil string="${portlet.name}" property="portlet.java.package.name">
<antelope:replace regex="-" replacement="" />
<antelope:trim />
</antelope:stringutil>
<if>
<not>
<or>
<not>
<isset property="portlet.framework" />
</not>
<equals arg1="${portlet.framework}" arg2="" />
<equals arg1="${portlet.framework}" arg2="mvc" />
</or>
</not>
<then>
<if>
<or>
<equals arg1="${portlet.framework}" arg2="icefaces" />
<equals arg1="${portlet.framework}" arg2="liferay_faces_alloy" />
<equals arg1="${portlet.framework}" arg2="primefaces" />
<equals arg1="${portlet.framework}" arg2="richfaces" />
</or>
<then>
<copy todir="${portlet.dir}">
<fileset
dir="${sdk.dir}/tools/templates/portlet_jsf_tmpl"
/>
</copy>
</then>
</if>
<copy overwrite="true" todir="${portlet.dir}">
<fileset
dir="${sdk.dir}/tools/templates/portlet_${portlet.framework}_tmpl"
/>
</copy>
</then>
</if>
<if>
<or>
<equals arg1="${portlet.framework}" arg2="icefaces" />
<equals arg1="${portlet.framework}" arg2="jsf" />
<equals arg1="${portlet.framework}" arg2="liferay_faces_alloy" />
<equals arg1="${portlet.framework}" arg2="primefaces" />
<equals arg1="${portlet.framework}" arg2="richfaces" />
</or>
<then>
<if>
<or>
<equals arg1="${portlet.framework}" arg2="jsf" />
<equals arg1="${portlet.framework}" arg2="liferay_faces_alloy" />
<equals arg1="${portlet.framework}" arg2="primefaces" />
<equals arg1="${portlet.framework}" arg2="richfaces" />
</or>
<then>
<echo file="${portlet.dir}/docroot/WEB-INF/liferay-plugin-package.properties" append="true">
portal-dependency-jars=commons-beanutils.jar,commons-collections.jar,commons-digester.jar,commons-fileupload.jar,commons-io.jar,commons-lang.jar
speed-filters-enabled=false
</echo>
</then>
<else>
<echo file="${portlet.dir}/docroot/WEB-INF/liferay-plugin-package.properties" append="true">
portal-dependency-jars=commons-beanutils.jar,commons-collections.jar,commons-digester.jar,commons-lang.jar
speed-filters-enabled=false
</echo>
</else>
</if>
<replace file="${portlet.dir}/docroot/WEB-INF/liferay-portlet.xml">
<replacetoken><![CDATA[</icon>]]></replacetoken>
<replacevalue><![CDATA[</icon>
<requires-namespaced-parameters>false</requires-namespaced-parameters>
<ajaxable>false</ajaxable>]]></replacevalue>
</replace>
<replaceregexp match="&lt;/header-portlet-css&gt;(.*)&lt;/footer-portlet-javascript&gt;" replace="&lt;/header-portlet-css&gt;" flags="s">
<fileset
dir="${portlet.dir}/docroot/WEB-INF"
includes="liferay-portlet.xml"
/>
</replaceregexp>
<replace file="${portlet.dir}/docroot/WEB-INF/portlet.xml">
<replacetoken><![CDATA[<portlet-class>com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet</portlet-class>]]></replacetoken>
<replacevalue><![CDATA[<portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>]]></replacevalue>
</replace>
<replace file="${portlet.dir}/docroot/WEB-INF/portlet.xml">
<replacetoken><![CDATA[<name>view-template</name>]]></replacetoken>
<replacevalue><![CDATA[<name>javax.portlet.faces.defaultViewId.view</name>]]></replacevalue>
</replace>
<replace file="${portlet.dir}/docroot/WEB-INF/portlet.xml">
<replacetoken><![CDATA[<value>/view.jsp</value>]]></replacetoken>
<replacevalue><![CDATA[<value>/views/view.xhtml</value>]]></replacevalue>
</replace>
<delete includeemptydirs="true">
<fileset
dir="${portlet.dir}/docroot"
includes="js/**,view.jsp"
/>
</delete>
</then>
</if>
<if>
<equals arg1="${portlet.framework}" arg2="spring_mvc" />
<then>
<move
file="${portlet.dir}/docroot/WEB-INF/jsp/view.jsp"
tofile="${portlet.dir}/docroot/WEB-INF/jsp/${portlet.name}/view.jsp"
/>
<move
file="${portlet.dir}/docroot/WEB-INF/spring-context/portlet-context.xml"
tofile="${portlet.dir}/docroot/WEB-INF/spring-context/portlet/${portlet.name}-portlet.xml"
/>
<move
file="${portlet.dir}/docroot/WEB-INF/src/PortletViewController.java"
tofile="${portlet.dir}/docroot/WEB-INF/src/${portlet.java.package.name}/${portlet.java.class.name}PortletViewController.java"
/>
<echo file="${portlet.dir}/docroot/WEB-INF/liferay-plugin-package.properties" append="true">
portal-dependency-jars=aopalliance.jar,commons-logging.jar,jstl-api.jar,jstl-impl.jar,spring-aop.jar,spring-beans.jar,spring-context.jar,spring-core.jar,spring-expression.jar,spring-web.jar,spring-webmvc.jar,spring-webmvc-portlet.jar</echo>
<replace file="${portlet.dir}/docroot/WEB-INF/liferay-portlet.xml">
<replacetoken><![CDATA[</icon>]]></replacetoken>
<replacevalue><![CDATA[</icon>
<requires-namespaced-parameters>false</requires-namespaced-parameters>]]></replacevalue>
</replace>
<replace file="${portlet.dir}/docroot/WEB-INF/portlet.xml">
<replacetoken><![CDATA[<portlet-class>com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet</portlet-class>]]></replacetoken>
<replacevalue><![CDATA[<portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>]]></replacevalue>
</replace>
<replace file="${portlet.dir}/docroot/WEB-INF/portlet.xml">
<replacetoken><![CDATA[<name>view-template</name>]]></replacetoken>
<replacevalue><![CDATA[<name>contextConfigLocation</name>]]></replacevalue>
</replace>
<replace file="${portlet.dir}/docroot/WEB-INF/portlet.xml">
<replacetoken><![CDATA[<value>/view.jsp</value>]]></replacetoken>
<replacevalue><![CDATA[<value>/WEB-INF/spring-context/portlet/@portlet.name@-portlet.xml</value>]]></replacevalue>
</replace>
<delete includeemptydirs="true">
<fileset
dir="${portlet.dir}/docroot"
includes="view.jsp"
/>
</delete>
</then>
</if>
<if>
<equals arg1="${portlet.framework}" arg2="vaadin" />
<then>
<move
file="${portlet.dir}/docroot/WEB-INF/src/Application.java"
tofile="${portlet.dir}/docroot/WEB-INF/src/${portlet.java.package.name}/${portlet.java.class.name}Application.java"
/>
<echo file="${portlet.dir}/docroot/WEB-INF/liferay-plugin-package.properties" append="true">
portal-dependency-jars=vaadin.jar</echo>
<replace file="${portlet.dir}/docroot/WEB-INF/portlet.xml">
<replacetoken><![CDATA[<portlet-class>com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet</portlet-class>]]></replacetoken>
<replacevalue><![CDATA[<portlet-class>com.vaadin.terminal.gwt.server.ApplicationPortlet2</portlet-class>]]></replacevalue>
</replace>
<replace file="${portlet.dir}/docroot/WEB-INF/portlet.xml">
<replacetoken><![CDATA[<name>view-template</name>]]></replacetoken>
<replacevalue><![CDATA[<name>application</name>]]></replacevalue>
</replace>
<replace file="${portlet.dir}/docroot/WEB-INF/portlet.xml">
<replacetoken><![CDATA[<value>/view.jsp</value>]]></replacetoken>
<replacevalue><![CDATA[<value>@portlet.java.package.name@.@portlet.java.class.name@Application</value>]]></replacevalue>
</replace>
<replaceregexp match="&lt;/icon&gt;(.*)&lt;/footer-portlet-javascript&gt;" replace="&lt;/icon&gt;" flags="s">
<fileset
dir="${portlet.dir}/docroot/WEB-INF"
includes="liferay-portlet.xml"
/>
</replaceregexp>
<replace file="${portlet.dir}/docroot/WEB-INF/liferay-portlet.xml">
<replacetoken><![CDATA[</icon>]]></replacetoken>
<replacevalue><![CDATA[</icon>
<requires-namespaced-parameters>false</requires-namespaced-parameters>
<ajaxable>false</ajaxable>]]></replacevalue>
</replace>
<delete includeemptydirs="true">
<fileset
dir="${portlet.dir}/docroot"
includes="css/**,js/**,view.jsp"
/>
</delete>
</then>
</if>
<replace dir="${portlet.dir}">
<replacefilter token="@app.server.tomcat.manager.password@" value="${app.server.tomcat.manager.password}" />
<replacefilter token="@app.server.tomcat.manager.user@" value="${app.server.tomcat.manager.user}" />
<replacefilter token="@jmx.remote.port@" value="${jmx.remote.port}" />
<replacefilter token="@plugin.type.dir@" value="${plugin.type.dir}" />
<replacefilter token="@portlet.display.name@" value="${portlet.display.name}" />
<replacefilter token="@portlet.java.class.name@" value="${portlet.java.class.name}" />
<replacefilter token="@portlet.java.package.name@" value="${portlet.java.package.name}" />
<replacefilter token="@portlet.name@" value="${portlet.name}" />
</replace>
<mkdir dir="${portlet.dir}/docroot/WEB-INF/tld" />
<copy todir="${portlet.dir}/docroot/WEB-INF/tld">
<fileset dir="${app.server.portal.dir}/WEB-INF/tld">
<include name="aui.tld" />
<include name="liferay-portlet.tld" />
<include name="liferay-portlet-ext.tld" />
<include name="liferay-security.tld" />
<include name="liferay-theme.tld" />
<include name="liferay-ui.tld" />
<include name="liferay-util.tld" />
</fileset>
</copy>
</target>
</project>