Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 7, 2016
0 parents
commit e376704
Showing
428 changed files
with
27,159 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Freeware License, some rights reserved | ||
|
||
Copyright (c) 2006 Matthew Moodie | ||
|
||
Permission is hereby granted, free of charge, to anyone obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to work with the Software within the limits of freeware distribution and fair use. | ||
This includes the rights to use, copy, and modify the Software for personal use. | ||
Users are also allowed and encouraged to submit corrections and modifications | ||
to the Software for the benefit of other users. | ||
|
||
It is not allowed to reuse, modify, or redistribute the Software for | ||
commercial use in any way, or for a user�s educational materials such as books | ||
or blog articles without prior permission from the copyright holder. | ||
|
||
The above copyright notice and this permission notice need to be included | ||
in all copies or substantial portions of the software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#Apress Source Code | ||
|
||
This repository accompanies [*Pro Apache Ant*](http://www.apress.com/9781590595596) by Matthew Moodie (Apress, 2006). | ||
|
||
![Cover image](9781590595596.jpg) | ||
|
||
Download the files as a zip using the green button, or clone the repository to your machine using Git. | ||
|
||
##Releases | ||
|
||
Release v1.0 corresponds to the code in the published book, without corrections or updates. | ||
|
||
##Contributions | ||
|
||
See the file Contributing.md for more information on how you can contribute to this repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<project name="Apache Ant Book Project" | ||
basedir="." | ||
default="build-dtd"> | ||
|
||
<description> | ||
Apache Ant book example project. The main targets are listed below. | ||
</description> | ||
|
||
<target name="build-dtd" description="Create an Ant DTD"> | ||
<antstructure output="./project.dtd"/> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
property.example=Local File | ||
property.file.example=build.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
property.example=Default File | ||
property.file.example=build.properties.default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
server.name=localhost | ||
server.port=8080 | ||
server.scheme=http | ||
server.manager.name=manager | ||
|
||
server.url=${server.scheme}://${server.name}:${server.port}/${server.manager.name}/ | ||
|
||
j2ee.home=C:/j2ee | ||
catalina.home=C:/jakarta-tomcat | ||
|
||
j2ee.jar=${j2ee.home}/lib/j2ee.jar | ||
jsp.jar=${catalina.home}/common/lib/jsp-api.jar | ||
servlet.jar=${catalina.home}/common/lib/servlet-api.jar | ||
mysql.jar=${catalina.home}/common/lib/mysql.jar | ||
|
||
build.classpath=${mysql.jar};${j2ee.jar};${jsp.jar};${servlet.jar} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project name="Apache Ant Properties Project" basedir="."> | ||
|
||
<target name="properties.built-in"> | ||
<echo message="The base directory: ${basedir}"/> | ||
<echo message="This file: ${ant.file}"/> | ||
<echo message="Ant version: ${ant.version}"/> | ||
<echo message="Project name: ${ant.project.name}"/> | ||
<echo message="Java version: ${ant.java.version}"/> | ||
</target> | ||
|
||
<target name="build.path"> | ||
<echo message="File: ${basedir}${file.separator}build.xml"/> | ||
<echo message="Path: ${basedir}${file.separator}build.xml${path.separator}${basedir}${file.separator}build.properties"/> | ||
</target> | ||
|
||
<target name="build.path.unix"> | ||
<echo message="File: ${basedir}/build.xml"/> | ||
<echo message="Path: ${basedir}/build.xml;${basedir}/build.properties"/> | ||
</target> | ||
|
||
<!-- | ||
<target name="properties.custom"> | ||
<property name="build.no" value="1.1"/> | ||
<echo message="Build no. = ${build.no}"/> | ||
</target> | ||
--> | ||
|
||
<!-- | ||
<target name="properties.custom"> | ||
<property name="fs" value="${file.separator}"/> | ||
<property name="ps" value="${path.separator}"/> | ||
<echo message="File: ${basedir}${fs}build.xml"/> | ||
<echo message="Path: ${basedir}${fs}build.xml${ps}${basedir}${fs}build.properties"/> | ||
</target> | ||
--> | ||
|
||
<!-- | ||
<target name="properties.custom"> | ||
<property name="project.dtd" location="project.dtd"/> | ||
<echo message="Location of project.dtd: ${project.dtd}"/> | ||
</target> | ||
--> | ||
|
||
<target name="properties.custom"> | ||
<!-- Windows users should leave this line uncommented --> | ||
<property name="build.path" | ||
value="${basedir}/build.xml:${basedir}/build.properties"/> | ||
|
||
<!-- Unix users should remove the above line | ||
and uncomment the below line --> | ||
<!-- | ||
<property name="build.path" | ||
value="${basedir}\build.xml;${basedir}\build.properties"/> | ||
--> | ||
|
||
<path id="build.path.id"> | ||
<pathelement path="${build.path}"/> | ||
</path> | ||
|
||
<property name="build.path.property" refid="build.path.id"/> | ||
|
||
<!-- The converted string that Ant uses as a path --> | ||
<echo message="Converted string: ${build.path.property}"/> | ||
|
||
<!-- The unconverted string, which Ant treats as a string --> | ||
<echo message="Path: ${build.path}"/> | ||
</target> | ||
|
||
<target name="properties.environment"> | ||
<property environment="env"/> | ||
<echo message="Built on: ${env.OS} ${env.PROCESSOR_ARCHITECTURE}"/> | ||
<echo message="ANT_HOME: ${env.ant_home}"/> | ||
</target> | ||
|
||
<target name="properties.localfile"> | ||
|
||
<property file="build.properties"/> | ||
|
||
<path id="build.classpath.id"> | ||
<pathelement path="${build.classpath}"/> | ||
</path> | ||
|
||
<property name="build.classpath.property" refid="build.classpath.id"/> | ||
|
||
<echo message="Server URL: ${server.url}"/> | ||
<echo message="Build classpath: ${build.classpath}"/> | ||
<echo message="Build classpath converted: ${build.classpath.property}"/> | ||
</target> | ||
|
||
<target name="properties.localfile.prefix"> | ||
|
||
<property file="build.properties" prefix="imported"/> | ||
|
||
<path id="build.classpath.id"> | ||
<pathelement path="${imported.build.classpath}"/> | ||
</path> | ||
|
||
<property name="build.classpath.property" refid="build.classpath.id"/> | ||
|
||
<echo message="Server URL: ${imported.server.url}"/> | ||
<echo message="Build classpath: ${imported.build.classpath}"/> | ||
<echo message="Build classpath converted: ${build.classpath.property}"/> | ||
</target> | ||
|
||
<target name="properties.resourcefile"> | ||
|
||
<!-- | ||
<property resource="build.res.properties" classpath="./lib"/> | ||
--> | ||
|
||
<property resource="build.res.properties"> | ||
<classpath path="./lib"/> | ||
</property> | ||
|
||
<path id="build.classpath.id"> | ||
<pathelement path="${build.classpath}"/> | ||
</path> | ||
|
||
<property name="build.classpath.property" refid="build.classpath.id"/> | ||
|
||
<echo message="Server URL: ${server.url}"/> | ||
<echo message="Build classpath: ${build.classpath}"/> | ||
<echo message="Build classpath converted: ${build.classpath.property}"/> | ||
</target> | ||
|
||
<target name="properties.url"> | ||
|
||
<property url="http://localhost:8080/antBook/properties/build.properties"/> | ||
|
||
<path id="build.classpath.id"> | ||
<pathelement path="${build.classpath}"/> | ||
</path> | ||
|
||
<property name="build.classpath.property" refid="build.classpath.id"/> | ||
|
||
<echo message="Server URL: ${server.url}"/> | ||
<echo message="Build classpath: ${build.classpath}"/> | ||
<echo message="Build classpath converted: ${build.classpath.property}"/> | ||
</target> | ||
|
||
<property file="build.properties"/> | ||
<property file="build.properties.default"/> | ||
<property name="property.example" value="Global"/> | ||
|
||
<target name="print-global"> | ||
<echo message="In print-global"/> | ||
<echo message="The value of property.example is: ${property.example}"/> | ||
</target> | ||
|
||
<target name="print-target" depends="print-global"> | ||
<property name="property.example" value="Target"/> | ||
|
||
<echo message="In print-target"/> | ||
<echo message="The value of property.example is: ${property.example}"/> | ||
</target> | ||
|
||
<target name="print-file" depends="print-target"> | ||
<property name="property.file.example" value="build.xml"/> | ||
|
||
<echo message="In print-file"/> | ||
<echo> | ||
The value of property.file.example is: ${property.file.example} | ||
</echo> | ||
</target> | ||
|
||
<fileset dir="." id="uptodate.id"> | ||
<include name="src/jstl/One.java"/> | ||
</fileset> | ||
|
||
<property name="jstl.src" value="jstl"/> | ||
<property name="jstl.jar" value="jstl.jar"/> | ||
|
||
<condition property="jstl.src.exists"> | ||
<available file="${jstl.src}" filepath="./src"/> | ||
</condition> | ||
|
||
<condition property="jstl.jar.exists"> | ||
<available file="${jstl.jar}" filepath="./lib"/> | ||
</condition> | ||
|
||
<condition property="uptodate"> | ||
<uptodate> | ||
<srcfiles refid="uptodate.id"/> | ||
<mapper type="merge" to="./One.java"/> | ||
</uptodate> | ||
</condition> | ||
|
||
<target name="checkout-jstl" unless="jstl.src.exists"> | ||
<echo message="Checking out ${jstl.jar}"/> | ||
</target> | ||
|
||
<target name="build-jstl" depends="checkout-jstl" unless="jstl.jar.exists"> | ||
<echo message="Building ${jstl.jar}"/> | ||
</target> | ||
|
||
<target name="compile" if="uptodate"> | ||
<echo message="File changed: ${uptodate}"/> | ||
</target> | ||
|
||
<condition property="is.windows"> | ||
<os family="windows"/> | ||
</condition> | ||
|
||
<condition property="is.unix"> | ||
<os family="unix"/> | ||
</condition> | ||
|
||
<target name="do-windows" if="is.windows"> | ||
<echo message="This is Windows"/> | ||
</target> | ||
|
||
<target name="do-unix" if="is.unix"> | ||
<echo message="This is Unix"/> | ||
</target> | ||
|
||
<condition property="is.fileset"> | ||
<isreference refid="uptodate.id" type="fileset"/> | ||
</condition> | ||
|
||
<target name="fileset-prepare"> | ||
<echo message="Value of is.fileset = ${is.fileset}"/> | ||
</target> | ||
|
||
</project> |
Oops, something went wrong.