Skip to content

Commit

Permalink
Merge pull request #1 from dizzzz/develop
Browse files Browse the repository at this point in the history
Add support HTTP proxy
  • Loading branch information
ljo committed Mar 4, 2014
2 parents 0a0ac7f + 3192440 commit 6daa12f
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 65 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ config/library/expath-pkg.xml
config/library/repo.xml
config/application/expath-pkg.xml
config/application/repo.xml
local.build.properties
11 changes: 10 additions & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# EXIST_HOME
exist.dir=../../dizzzz/exist/
exist.dir=../exist/

# Extension details
module.name=jfreechart
Expand All @@ -9,3 +9,12 @@ module.title=JFreeChart
# Build instructions
javac.target=7
javac.source=7

# Proxy settings
proxy.nonproxyhosts =
proxy.host =
proxy.port = 0
proxy.password =
proxy.user =
proxy.socks.host =
proxy.socks.port = 0
102 changes: 55 additions & 47 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
<property name="web.dir" value="web"/>
<property name="config.dir" value="config"/>

<setproxy nonproxyhosts="${proxy.nonproxyhosts}" proxyhost="${proxy.host}"
proxyport="${proxy.port}" proxypassword="${proxy.password}" proxyuser="${proxy.user}"
socksproxyhost="${proxy.socks.host}" socksproxyport="${proxy.socks.port}"/>


<!-- Setup IVY download manager -->
<path id="ivy.lib.path">
<fileset dir="build/lib" includes="*.jar" erroronmissingdir="false"/>
Expand Down Expand Up @@ -53,48 +58,49 @@
<target name="download" description="Download 3d party JAR files"
xmlns:ivy="antlib:org.apache.ivy.ant">
<ivy:retrieve sync="true" pattern="${java.libs}/[artifact]-[revision](-[classifier]).[ext]"/>
<!-- workaround ivy bug -->
<delete>
<fileset dir="${java.libs}" includes="xml-api*"/>
<fileset dir="${java.libs}" includes="xalan*"/>
</delete>
<!-- workaround ivy bug -->
<delete>
<fileset dir="${java.libs}" includes="xml-api*"/>
<fileset dir="${java.libs}" includes="xalan*"/>
</delete>
</target>

<target name="process" description="Process template files">
<copy file="config/application/expath-pkg.xml.tmpl" tofile="config/application/expath-pkg.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
<copy file="config/application/repo.xml.tmpl" tofile="config/application/repo.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
<copy file="config/library/expath-pkg.xml.tmpl" tofile="config/library/expath-pkg.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
<copy file="config/library/exist.xml.tmpl" tofile="config/library/exist.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
<copy file="config/library/repo.xml.tmpl" tofile="config/library/repo.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
<copy file="config/application/expath-pkg.xml.tmpl"
tofile="config/application/expath-pkg.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
<copy file="config/application/repo.xml.tmpl" tofile="config/application/repo.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
<copy file="config/library/expath-pkg.xml.tmpl" tofile="config/library/expath-pkg.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
<copy file="config/library/exist.xml.tmpl" tofile="config/library/exist.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
<copy file="config/library/repo.xml.tmpl" tofile="config/library/repo.xml">
<filterset>
<filter token="VERSION" value="${module.version}"/>
<filter token="TITLE" value="${module.title}"/>
</filterset>
</copy>
</target>

<target name="prepare" depends="process" description="Create empty directories">
<tstamp/>
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.libs}"/>
<mkdir dir="${java.classes}"/>
Expand All @@ -105,8 +111,8 @@
<delete dir="${build.dir}" includes="*.jar"/>
<delete dir="${build.dir}/classes"/>
<delete dir="${dist.dir}"/>
<delete dir="config/application" includes="*.xml"/>
<delete dir="config/library" includes="*.xml"/>
<delete dir="config/application" includes="*.xml"/>
<delete dir="config/library" includes="*.xml"/>
</target>

<target name="clean-all" depends="clean" description="Reset to clean state">
Expand All @@ -120,12 +126,13 @@
<classpath>
<path refid="classpath"/>
</classpath>
<!-- <compilerarg value="-Xlint"/> -->
<!-- <compilerarg value="-Xlint"/> -->
</javac>
</target>

<target name="jar" depends="compile" description="Create JAR file">
<jar basedir="${java.classes}" jarfile="${build.dir}/exist-${module.name}-${module.version}.jar">
<jar basedir="${java.classes}"
jarfile="${build.dir}/exist-${module.name}-${module.version}.jar">
<manifest>
<attribute name="Project-Name" value="${module.name}"/>
<attribute name="Project-Version" value="${module.version}"/>
Expand All @@ -135,13 +142,13 @@
</target>

<target name="xar" depends="jar" description="Create XAR files">

<!-- create web application -->
<zip destfile="${dist.dir}/${module.name}-showcase-${module.version}.xar">
<fileset dir="${web.dir}"/>
<zipfileset dir="${config.dir}/application" includes="*.xml"/>
</zip>

<!-- create library -->
<zip destfile="${dist.dir}/${module.name}-${module.version}.xar">
<zipfileset dir="${build.dir}" includes="*.jar" prefix="jfreechart"/>
Expand All @@ -151,12 +158,13 @@
<exclude name="*-sources.jar"/>
</zipfileset>
<zipfileset dir="${config.dir}/library" includes="*.xml"/>
</zip>
</zip>
</target>

<target name="install" description="Install jar files into ${exist.dir}/lib/extensions">
<copy file="${build.dir}/exist-${module.name}-${module.version}.jar" todir="${exist.dir}/lib/user"/>

<copy file="${build.dir}/exist-${module.name}-${module.version}.jar"
todir="${exist.dir}/lib/user"/>

<copy todir="${exist.dir}/lib/user">
<fileset dir="${java.libs}" includes="*.jar" excludes="*sources*,*javadoc*"/>
</copy>
Expand Down
34 changes: 17 additions & 17 deletions ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
-->
<ivy-module version="2.0">

<info organisation="org.exist" module="jfreechart"/>
<dependencies>

<dependency org="org.jfree" name="jfreechart" rev="1.0.17" />
<dependency org="org.apache.xmlgraphics" name="batik-svggen" rev="1.7" />
<dependency org="org.apache.xmlgraphics" name="batik-svg-dom" rev="1.7" />
<exclude module="servlet-api"/>
<exclude module="xml-apis"/>
<exclude module="xml-apis-ext"/>
<exclude module="xalan"/>
</dependencies>
<info organisation="org.exist" module="jfreechart"/>
<dependencies>

<dependency org="org.jfree" name="jfreechart" rev="1.0.17"/>

<dependency org="org.apache.xmlgraphics" name="batik-svggen" rev="1.7"/>

<dependency org="org.apache.xmlgraphics" name="batik-svg-dom" rev="1.7"/>

<exclude module="servlet-api"/>

<exclude module="xml-apis"/>
<exclude module="xml-apis-ext"/>
<exclude module="xalan"/>

</dependencies>

</ivy-module>

0 comments on commit 6daa12f

Please sign in to comment.