<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>XML, XSLT &#38; Java &#187; Mac OS X</title>
	<atom:link href="http://blog.expedimentum.com/kategorien/mac-os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.expedimentum.com</link>
	<description>Texte und Metadaten verarbeiten. Fundstücke und Beispiele</description>
	<lastBuildDate>Thu, 17 May 2012 10:13:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Apache Ant 1.8.2 unter Mac OS X einrichten</title>
		<link>http://blog.expedimentum.com/2011/apache-ant-1-8-2-unter-mac-os-x-einrichten/</link>
		<comments>http://blog.expedimentum.com/2011/apache-ant-1-8-2-unter-mac-os-x-einrichten/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 02:59:33 +0000</pubDate>
		<dc:creator>Stf</dc:creator>
				<category><![CDATA[Apache Ant]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://blog.expedimentum.com/?p=339</guid>
		<description><![CDATA[Weil Ant 1.8.1 im XSLT-Task vergisst, den Classpath auszulesen, funktionieren mit dieser Version keine XSLT-2.0-Stylesheets (näheres siehe Bugzilla). Und weil Apple auch zwei Monate nach Erscheinen von Version 1.8.2 (mit dem Bugfix) noch kein Update durchgeführt hat, musste ich von Hand für Abhilfe sorgen. So geht’s: Ant 1.8.2 herunterladen und entpacken Ich habe den entpackten [...]]]></description>
			<content:encoded><![CDATA[<p>Weil <a href="http://blog.expedimentum.com/glossar/apache-ant/" >Ant</a> 1.8.1 im <a href="http://blog.expedimentum.com/glossar/xslt/" >XSLT</a>-Task vergisst, den Classpath auszulesen, funktionieren mit dieser Version keine XSLT-2.0-Stylesheets (näheres siehe <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=49271">Bugzilla</a>). Und weil Apple auch zwei Monate nach Erscheinen von Version 1.8.2 (mit dem Bugfix) noch kein Update durchgeführt hat, musste ich von Hand für Abhilfe sorgen. So geht’s:</p>
<ol>
<li>Ant 1.8.2 herunterladen und entpacken</li>
<li>Ich habe den entpackten Ordner unter <code>~/Applications</code> abgelegt, gleich neben der alten 1.8.0-Version. Bei mir sieht das dann so aus:<br/><br/>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">localhost:Applications stf$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-F</span> <span style="color: #660033;">-1</span>
Crane-xslstyle-<span style="color: #000000;">20100817</span>-0240z<span style="color: #000000; font-weight: bold;">/</span>
apache-ant-1.8.0<span style="color: #000000; font-weight: bold;">/</span>
apache-ant-1.8.2<span style="color: #000000; font-weight: bold;">/</span>
calabash-0.9.24<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

</li>
<li>Erzeugen eines SymLinks auf den Ant-Ordner. Dazu ein Terminalfenster öffnen und<br/><br/>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> ~<span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>apache-ant-1.8.2 ~<span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>ant</pre></div></div>

<p>eingeben. Durch Umbiegen des SymLinks auf ein anderes Verzeichnis kann man einfach auf andere Ant-Versionen umschalten: auf eine ältere oder später auch auf eine neuere.</li>
<li>Jetzt muss man <code>bash</code> – dem Programm hinter dem Terminalfenster – noch sagen, dass es die neue Ant-Version benutzen soll. Dazu fügt man der PATH-Variablen dem Pfad zum neuen Ant-Verzeichnis hinzu. Ich habe dazu im Benutzerverzeichnis eine Datei <code>./bash_profile</code> angelegt und folgendes hineingeschrieben:<br/><br/>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> running ~<span style="color: #000000; font-weight: bold;">/</span>.bash_profile
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=~<span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>ant<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">ANT_HOME</span>=~<span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>ant</pre></div></div>

<p>Die erste Zeile gibt bei jedem Konsolenstart eine Statusmeldung aus, die zweite Zeile setzt die PATH-Umgebungsvariable, die dritte Zeile sorgt dafür, das Ant seine Dateien findet.<br />
Da verborgene Dateien (mit Punkt am Anfang des Dateinamens) im Finder standardmäßig ausgeblendet werden, habe ich ganz UNIX-like auf der Konsole gearbeitet. Mit<br/><br/></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">pico ~<span style="color: #000000; font-weight: bold;">/</span>.bash_profile</pre></div></div>

<p>wird der Editor geöffnet, Speichern funktioniert über <code>CTRL-o</code>, Verlassen mit <code>CTRL-x</code>.<br/></li>
<li>Eine neues Terminalfenster starten. In der zweiten Zeile sollte jetzt soetwas wie <code>running /Users/stf/.bash_profile</code> stehen. Mit dem Terminal-Kommando<br/>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">set</span></pre></div></div>

<p>lässt sich eine Liste der Umgebunsvariablen ausgeben, hier sollten jetzt für <code>PATH</code> und <code>ANT_HOME</code> die neuen Werte angezeigt werden. Schließlich bringt die Versionsangabe mit</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ant <span style="color: #660033;">-v</span></pre></div></div>

<p>Gewissheit, ob alles geklappt hat.
</li>
</ol>
<p>Meine Helferlein auf diesem Weg waren die beiden unten angegebenen Artikel sowie <code>man ln</code> und <code>man ls</code>.</p>
<p>Hoffen wir, dass Apple bald auf 1.8.2 aktualisiert und zukünftig solche Workarounds nicht mehr notwendig sind …</p>
<p><strong>Quellen:</strong></p>
<ul>
<li><a href="http://stackoverflow.com/questions/4810089/how-to-use-an-alternate-version-of-apache-ant-on-os-x-without-installing-over-exi">Stackoverflow: How to use an alternate version of Apache Ant on OS X without installing over existing version?</a> (englisch)</li>
<li>Cameron Hayne: <a href="http://hayne.net/MacDev/Notes/unixFAQ.html#executionPath">Unix FAQ (for OS X)</a> (englisch) – eine sehr übersichtliche Seite mit dem wichtigsten, was man über UNIX unter Mac OS X wissen muss.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.expedimentum.com/2011/apache-ant-1-8-2-unter-mac-os-x-einrichten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

