Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Apress committed Oct 12, 2016
0 parents commit 8711c5e
Show file tree
Hide file tree
Showing 772 changed files with 65,987 additions and 0 deletions.
Binary file added 9781430209737.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,27 @@
Freeware License, some rights reserved

Copyright (c) 2008 Jaroslav Tulach

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.


15 changes: 15 additions & 0 deletions README.md
@@ -0,0 +1,15 @@
#Apress Source Code

This repository accompanies [*Practical API Design*](http://www.apress.com/9781430209737) by Jaroslav Tulach (Apress, 2008).

![Cover image](9781430209737.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.
2 changes: 2 additions & 0 deletions apidesign-3abae898011d/.hg_archival.txt
@@ -0,0 +1,2 @@
repo: 32b39aaa68f02c490f8930022dab95497aa0d426
node: 3abae898011d52e499f6ab21571209dc9c44a86a
6 changes: 6 additions & 0 deletions apidesign-3abae898011d/.hgignore
@@ -0,0 +1,6 @@
.*/build/.*
.*/dist/.*
.*/nbproject/private/.*
.*.orig$
.*~$

98 changes: 98 additions & 0 deletions apidesign-3abae898011d/java/ant/build.xml
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="ant" default="default" basedir=".">
<description>Builds, tests, and runs the project ant.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="ant-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<target name="-revision" unless="revision">
<fail unless="snippets.code.dir"/>
<exec dir="${snippets.code.dir}" outputproperty="revision" executable="/bin/sh">
<arg file="${ant.file}/../tip.sh"/>
</exec>
</target>

<target name="snippets" depends="jar,-revision" description="Extracts code snippets">
<fail unless="revision"/>
<fail unless="snippets.dir"/>
<fail unless="snippets.repo"/>
<fail unless="snippets.path"/>
<fail unless="snippets.code.dir"/>

<taskdef name="grepcopy" classname="org.apidesign.infra.ant.GrepCopy" classpath="dist/apidesign-ant-tasks.jar"/>
<grepcopy target="${snippets.dir}" baseurl="${snippets.repo}/file/${revision}/${snippets.path}">
<fileset dir="${snippets.code.dir}">
<include name="**/*"/>
<exclude name="**/build/**/*"/>
<exclude name="**/target/**/*"/>
</fileset>
</grepcopy>
</target>

</project>

0 comments on commit 8711c5e

Please sign in to comment.