Permalink
Browse files

LPS-31543 Hardcode to absolute paths in the plugin's build.xml when i…

…t is created outside of the sdk context
  • Loading branch information...
1 parent a87679d commit 7f291f8cc4150e2c74c9d292ac94b8f8f09984b2 @shinnlok shinnlok committed with brianchandotcom Apr 11, 2013
View
@@ -4,6 +4,16 @@
<project name="build-common-plugins" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-common.xml" />
+ <if>
+ <equals arg1="${basedir}" arg2="${user.dir}" />
+ <then>
+ <property name="plugin.type.dir" value=".." />
+ </then>
+ <else>
+ <property name="plugin.type.dir" value="${basedir}" />
+ </else>
+ </if>
+
<target name="build-service">
<for param="service.file">
<path>
View
@@ -11,14 +11,6 @@
<taskdef classpathref="lib.classpath" resource="net/sf/antcontrib/antlib.xml" />
<taskdef classpathref="lib.classpath" resource="ise/antelope/tasks/antlib.xml" uri="antlib:ise.antelope.tasks" />
- <property location="${project.dir}" name="project.location.absolute" />
-
- <propertycopy
- from="project.location.absolute"
- name="project.dir"
- override="true"
- />
-
<import file="build-common-ivy.xml" />
<property file="${project.dir}/build.${user.name}.properties" />
View
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="plugins" basedir="." default="all" xmlns:antelope="antlib:ise.antelope.tasks">
- <property name="project.dir" value="." />
+ <property location="." name="project.dir" />
<import file="build-common.xml" />
View
@@ -2,7 +2,8 @@
<!DOCTYPE project>
<project name="build-common-ext">
- <property name="project.dir" value="../.." />
+ <dirname file="${ant.file.build-common-ext}" property="plugin.type.dir" />
+ <property location="${plugin.type.dir}/.." name="project.dir" />
<import file="../build-common-plugin.xml" />
View
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="ext" basedir="." default="deploy">
- <property name="project.dir" value=".." />
+ <property location=".." name="project.dir" />
<import file="../build-common-plugins.xml" />
@@ -41,8 +41,9 @@
<mkdir dir="${ext.plugin.dir}/docroot/WEB-INF/ext-util-taglib/src" />
<replace dir="${ext.plugin.dir}">
- <replacefilter token="@ext.name@" value="${ext.name}" />
<replacefilter token="@ext.display.name@" value="${ext.display.name}" />
+ <replacefilter token="@ext.name@" value="${ext.name}" />
+ <replacefilter token="@plugin.type.dir@" value="${plugin.type.dir}" />
</replace>
</target>
@@ -2,7 +2,8 @@
<!DOCTYPE project>
<project name="build-common-hook">
- <property name="project.dir" value="../.." />
+ <dirname file="${ant.file.build-common-hook}" property="plugin.type.dir" />
+ <property location="${plugin.type.dir}/.." name="project.dir" />
<import file="../build-common-plugin.xml" />
</project>
View
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="hooks" basedir="." default="deploy">
- <property name="project.dir" value=".." />
+ <property location=".." name="project.dir" />
<import file="../build-common-plugins.xml" />
@@ -38,8 +38,9 @@
</copy>
<replace dir="${hook.dir}">
- <replacefilter token="@hook.name@" value="${hook.name}" />
<replacefilter token="@hook.display.name@" value="${hook.display.name}" />
+ <replacefilter token="@hook.name@" value="${hook.name}" />
+ <replacefilter token="@plugin.type.dir@" value="${plugin.type.dir}" />
</replace>
</target>
</project>
@@ -2,7 +2,8 @@
<!DOCTYPE project>
<project name="build-common-layouttpl">
- <property name="project.dir" value="../.." />
+ <dirname file="${ant.file.build-common-layouttpl}" property="plugin.type.dir" />
+ <property location="${plugin.type.dir}/.." name="project.dir" />
<import file="../build-common-plugin.xml" />
View
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="layouttpl" basedir="." default="deploy" xmlns:antelope="antlib:ise.antelope.tasks">
- <property name="project.dir" value=".." />
+ <property location=".." name="project.dir" />
<import file="../build-common-plugins.xml" />
@@ -42,9 +42,10 @@
</antelope:stringutil>
<replace dir="${layouttpl.dir}">
- <replacefilter token="@layouttpl.name@" value="${layouttpl.name}" />
<replacefilter token="@layouttpl.display.name@" value="${layouttpl.display.name}" />
+ <replacefilter token="@layouttpl.name@" value="${layouttpl.name}" />
<replacefilter token="@layouttpl.template.name@" value="${layouttpl.template.name}" />
+ <replacefilter token="@plugin.type.dir@" value="${plugin.type.dir}" />
</replace>
<move
@@ -2,7 +2,8 @@
<!DOCTYPE project>
<project name="build-common-portlet">
- <property name="project.dir" value="../.." />
+ <dirname file="${ant.file.build-common-portlet}" property="plugin.type.dir" />
+ <property location="${plugin.type.dir}/.." name="project.dir" />
<import file="../build-common-plugin.xml" />
View
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="portlets" basedir="." default="deploy" xmlns:antelope="antlib:ise.antelope.tasks">
- <property name="project.dir" value=".." />
+ <property location=".." name="project.dir" />
<import file="../build-common-plugins.xml" />
@@ -235,10 +235,11 @@ portal-dependency-jars=vaadin.jar</echo>
</if>
<replace dir="${portlet.dir}">
- <replacefilter token="@portlet.name@" value="${portlet.name}" />
+ <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" />
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="build-common-shared">
- <property name="project.dir" value="../.." />
+ <property location="../.." name="project.dir" />
<import file="../build-common-plugin.xml" />
View
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="shared" basedir="." default="deploy">
- <property name="project.dir" value=".." />
+ <property location=".." name="project.dir" />
<import file="../build-common-plugins.xml" />
</project>
@@ -2,7 +2,8 @@
<!DOCTYPE project>
<project name="build-common-theme">
- <property name="project.dir" value="../.." />
+ <dirname file="${ant.file.build-common-theme}" property="plugin.type.dir" />
+ <property location="${plugin.type.dir}/.." name="project.dir" />
<import file="../build-common-plugin.xml" />
@@ -124,7 +125,7 @@
excludes="**/.sass-cache/**,_diffs/**,templates/**"
/>
</copy>
-
+
<copy todir="docroot" overwrite="false" preservelastmodified="true">
<fileset
dir="${app.server.portal.dir}/html/themes/classic"
@@ -149,7 +150,7 @@
excludes="**/.sass-cache/**,_diffs/**,templates/**"
/>
</copy>
-
+
<copy todir="docroot" overwrite="false" preservelastmodified="true">
<fileset
dir="${app.server.portal.dir}/html/themes/control_panel"
@@ -176,7 +177,7 @@
excludes="**/.sass-cache/**,_diffs/**,WEB-INF/*.properties,WEB-INF/*.xml"
/>
</copy>
-
+
<copy todir="docroot" overwrite="false" preservelastmodified="true">
<fileset
dir="${theme.parent}/docroot"
View
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="themes" basedir="." default="deploy">
- <property name="project.dir" value=".." />
+ <property location=".." name="project.dir" />
<import file="../build-common-plugins.xml" />
@@ -44,8 +44,9 @@
<mkdir dir="${theme.dir}/docroot/WEB-INF/src/resources-importer/journal/templates" />
<replace dir="${theme.dir}">
- <replacefilter token="@theme.name@" value="${theme.name}" />
+ <replacefilter token="@plugin.type.dir@" value="${plugin.type.dir}" />
<replacefilter token="@theme.display.name@" value="${theme.display.name}" />
+ <replacefilter token="@theme.name@" value="${theme.name}" />
</replace>
</target>
View
@@ -2,5 +2,5 @@
<!DOCTYPE project>
<project name="@ext.name@-ext" basedir="." default="deploy">
- <import file="../build-common-ext.xml" />
+ <import file="@plugin.type.dir@/build-common-ext.xml" />
</project>
@@ -2,5 +2,5 @@
<!DOCTYPE project>
<project name="@hook.name@-hook" basedir="." default="deploy">
- <import file="../build-common-hook.xml" />
+ <import file="@plugin.type.dir@/build-common-hook.xml" />
</project>
@@ -4,5 +4,5 @@
<project name="@layouttpl.name@-layouttpl" basedir="." default="deploy">
<property name="plugin.version" value="1" />
- <import file="../build-common-layouttpl.xml" />
+ <import file="@plugin.type.dir@/build-common-layouttpl.xml" />
</project>
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="@portlet.name@-portlet" basedir="." default="deploy">
- <import file="../build-common-portlet.xml" />
+ <import file="@plugin.type.dir@/build-common-portlet.xml" />
<target name="compile">
<antcall target="build-common-plugin.compile" />
@@ -2,5 +2,5 @@
<!DOCTYPE project>
<project name="@portlet.name@-portlet" basedir="." default="deploy">
- <import file="../build-common-portlet.xml" />
+ <import file="@plugin.type.dir@/build-common-portlet.xml" />
</project>
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="@theme.name@-theme" basedir="." default="deploy">
- <import file="../build-common-theme.xml" />
+ <import file="@plugin.type.dir@/build-common-theme.xml" />
<property name="theme.parent" value="_styled" />
</project>
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="build-common-web">
- <property name="project.dir" value="../.." />
+ <property location="../.." name="project.dir" />
<import file="../build-common-plugin.xml" />
</project>
View
@@ -2,7 +2,7 @@
<!DOCTYPE project>
<project name="webs" basedir="." default="deploy">
- <property name="project.dir" value=".." />
+ <property location=".." name="project.dir" />
<import file="../build-common-plugins.xml" />
</project>

0 comments on commit 7f291f8

Please sign in to comment.