Adding dojo dependency explicitly in the project pom to avoid having to use maven to install it manually which is causing issues when maven is not available in the classpath

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@886298 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
lresende 2009-12-02 20:38:16 +00:00
parent 5ef0a5d2a0
commit 57bcc2f395
2 changed files with 9 additions and 25 deletions

View file

@ -21,12 +21,13 @@
<property name="dojo.version" value="1.3.0"/>
<property name="dojo.zip" value="${localRepository}/org/dojotoolkit/dojo/${dojo.version}/dojo-${dojo.version}.zip"/>
<property name="unpack.location" value="${basedir}/src/main/resources/dojo"/>
<target name="check-dojo-installed">
<condition property="already.installed" >
<available file="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"/>
<available file="${dojo.zip}"/>
</condition>
<condition property="maven.suffix" value="">
<os family="unix"/>
@ -43,32 +44,10 @@
</condition>
</target>
<target name="install-dojo" depends="check-dojo-installed" unless="already.installed">
<mkdir dir="${basedir}/target/dojo-download/"/>
<get src="http://download.dojotoolkit.org/release-${dojo.version}/dojo-release-${dojo.version}.zip"
dest="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"
verbose="true"
usetimestamp="true"/>
<exec executable="mvn${maven.suffix}" dir="${basedir}" failonerror="false">
<arg line="install:install-file -DgroupId=dojo -DartifactId=dojo -Dversion=${dojo.version} -Dpackaging=zip -DgeneratePom=true -Dfile=${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"/>
</exec>
</target>
<target name="install-dojo-nomaven" depends="check-dojo-installed" unless="already.installed">
<mkdir dir="${basedir}/target/dojo-download/"/>
<get src="http://download.dojotoolkit.org/release-${dojo.version}/dojo-release-${dojo.version}.zip"
dest="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"
verbose="true"
usetimestamp="true"/>
<copy file="${basedir}/target/dojo-download/dojo-release-${dojo.version}.zip"
tofile="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"/>
</target>
<target name="unpack-dojo-files" depends="check-dojo-installed, check-dojo-unpacked" unless="already.unpacked">
<fail message="dojo zip file not installed in local repository: ${localRepository}" unless="already.installed"/>
<mkdir dir="${basedir}/target/dojo-unpack-temp/"/>
<unzip src="${localRepository}/dojo/dojo/${dojo.version}/dojo-${dojo.version}.zip"
<unzip src="${dojo.zip}"
dest="${basedir}/target/dojo-unpack-temp/"
overwrite="false">
<patternset>

View file

@ -41,6 +41,12 @@
<artifactId>tuscany-host-http</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.dojotoolkit</groupId>
<artifactId>dojo</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
@ -55,7 +61,6 @@
<version>4.5</version>
<scope>test</scope>
</dependency>
</dependencies>