<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkcGRXc-fyp7ImA9WhdUFUs.&quot;"><id>tag:blogger.com,1999:blog-21031338929693506</id><updated>2011-10-02T17:07:04.957+02:00</updated><category term="linux" /><category term="tptp" /><category term="maven" /><category term="eclipse" /><category term="ubuntu" /><category term="jsf" /><category term="git" /><category term="java" /><title>Christian Kaltepoth's Blog</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://chkal.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://chkal.blogspot.com/" /><author><name>Christian Kaltepoth</name><uri>http://www.blogger.com/profile/05223101449431660192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="29" height="32" src="http://2.bp.blogspot.com/_rf84MFynjwg/TDCiwh4Nu3I/AAAAAAAAAG8/7L-ZxyDftOc/S220/avatar2.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/chkal" /><feedburner:info uri="chkal" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DEQNSXY5eip7ImA9Wx5XEEQ.&quot;"><id>tag:blogger.com,1999:blog-21031338929693506.post-8717207038181465115</id><published>2010-09-06T07:57:00.019+02:00</published><updated>2010-09-10T07:26:38.822+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-10T07:26:38.822+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="maven" /><title>Maven Repositories on GitHub</title><content type="html">&lt;p&gt;
I love &lt;a href="http://git-scm.com/"&gt;git&lt;/a&gt;! And therefore I also love &lt;a href="http://github.com/"&gt;github.com&lt;/a&gt;! I use GitHub very often to publish smaller or even large projects and share them with others. As I mostly use &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt; to build my Java projects, I recently searched for an easy way to publish Maven artifacts via GitHub. I learned that it is in fact very easy! Interested? Read on! :-)
&lt;/p&gt;

&lt;p&gt;
The basic idea of hosting Maven repositories on GitHub is to use &lt;a href="http://pages.github.com/"&gt;GitHub Pages&lt;/a&gt;. This GitHub feature offers a simple but powerful way for creating and hosting web sites on their infrastructure. Fortunately this is all we need to create Maven repositories. I'll explain the process by example. Therefore I'll show you how I created a repository for &lt;a href="http://github.com/chkal/jsf-maven-util"&gt;jsf-maven-util&lt;/a&gt;, one of my recent spare time projects. 
&lt;/p&gt;

&lt;p&gt;
The first step is to create a separate clone of your GitHub repository in a directory next to your primary local repository:
&lt;/p&gt;

&lt;pre class="brush: shell;"&gt;
$ pwd
/home/ck/workspace/jsf-maven-util
$ cd ..
$ git clone git@github.com:chkal/jsf-maven-util.git jsf-maven-util-pages
$ cd jsf-maven-util-pages
&lt;/pre&gt;

&lt;p&gt;
The &lt;i&gt;GitHub Pages&lt;/i&gt; web site must be created as a branch named &lt;i&gt;gh-pages&lt;/i&gt; in your repository. So lets create this branch and empty it. Refer to the &lt;a href="http://pages.github.com/"&gt;GitHub Pages Manual&lt;/a&gt; if you are interested in the exact meaning of these commands.
&lt;/p&gt;

&lt;pre class="brush: shell;"&gt;
$ git symbolic-ref HEAD refs/heads/gh-pages
$ rm .git/index
$ git clean -fdx
&lt;/pre&gt;

&lt;p&gt;
We will place the Maven repository in a subdirectory of this new branch:
&lt;/p&gt;

&lt;pre class="brush: shell;"&gt;
$ mkdir repository
&lt;/pre&gt;

&lt;p&gt;
We also want to have a pretty directory listing. Unfortunately GitHub Pages doesn't have native support for this. So we will create our own directory listing with a simple bash script.
&lt;/p&gt;

&lt;p&gt;
Create a file named &lt;a href="http://github.com/chkal/jsf-maven-util/blob/gh-pages/update-directory-index.sh"&gt;update-directory-index.sh&lt;/a&gt; in the root of the new branch (next to the &lt;i&gt;repository&lt;/i&gt; directory). This script will walk recursively into the &lt;i&gt;repository&lt;/i&gt; directory and create &lt;i&gt;index.html&lt;/i&gt; files in each subdirectory. Please be careful when using this script as it overwrites all exiting &lt;i&gt;index.html&lt;/i&gt; files it finds.
&lt;/p&gt;

&lt;pre class="brush: shell;"&gt;
#!/bin/bash

for DIR in $(find ./repository -type d); do
  (
    echo -e "&amp;lt;html&amp;gt;\n&amp;lt;body&amp;gt;\n&amp;lt;h1&amp;gt;Directory listing&amp;lt;/h1&amp;gt;\n&amp;lt;hr/&amp;gt;\n&amp;lt;pre&amp;gt;"
    ls -1pa "${DIR}" | grep -v "^\./$" | grep -v "^index\.html$" | awk '{ printf "&amp;lt;a href=\"%s\"&amp;gt;%s&amp;lt;/a&amp;gt;\n",$1,$1 }'
    echo -e "&amp;lt;/pre&amp;gt;\n&amp;lt;/body&amp;gt;\n&amp;lt;/html&amp;gt;"
  ) &amp;gt; "${DIR}/index.html"
done
&lt;/pre&gt;

&lt;p&gt;
Congratulations! Your repository is ready. Now you will have to modify the &lt;i&gt;distributionManagement&lt;/i&gt; section of your &lt;i&gt;pom.xml&lt;/i&gt; to let Maven deploy your artifacts to the new repository. Go back to your primary repository clone and edit your &lt;i&gt;pom.xml&lt;/i&gt;:
&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;
&amp;lt;distributionManagement&amp;gt;
  &amp;lt;repository&amp;gt;
    &amp;lt;id&amp;gt;gh-pages&amp;lt;/id&amp;gt;
    &amp;lt;url&amp;gt;file:///${basedir}/../jsf-maven-util-pages/repository/&amp;lt;/url&amp;gt;
  &amp;lt;/repository&amp;gt;
&amp;lt;/distributionManagement&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
Now you are ready to deploy your first artifact to the repository: 
&lt;/p&gt;

&lt;pre class="brush: shell;"&gt;
$ mvn -DperformRelease=true clean deploy
&lt;/pre&gt;

&lt;p&gt;
You will see that Maven copies the artifacts to your local checkout of the GitHub Pages branch. After Maven has finished you'll have to update the directory listings, commit the changes made to the repository and push them to GitHub:
&lt;/p&gt;

&lt;pre class="brush: shell;"&gt;
$ cd ../jsf-maven-util-pages/
$ ./update-directory-index.sh
$ git add -A
$ git commit -m "Deployed my first artifact to GitHub"
$ git push origin gh-pages
&lt;/pre&gt;

&lt;p&gt;
Now let's check the result. Please note that the first publish may take some time to appear on the web server.
&lt;/p&gt;

&lt;div style="text-align: center; font-size: 9pt; font-family: monospace;"&gt;
  &lt;a href="http://chkal.github.com/jsf-maven-util/repository/"&gt;http://chkal.github.com/jsf-maven-util/repository/&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;
Looks great, doesn't it? :-)
&lt;/p&gt;

&lt;p&gt;
If you want to use your repository in another project, just add the following repository entry to the &lt;i&gt;pom.xml&lt;/i&gt;:
&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;
&amp;lt;repository&amp;gt;
  &amp;lt;id&amp;gt;jsf-maven-util-repo&amp;lt;/id&amp;gt;
  &amp;lt;name&amp;gt;jsf-maven-util repository on GitHub&amp;lt;/name&amp;gt;
  &amp;lt;url&amp;gt;http://chkal.github.com/jsf-maven-util/repository/&amp;lt;/url&amp;gt;
&amp;lt;/repository&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
As you can see deploying Maven artifacts to GitHub is very simple. You can also use a similar approach to publish your Maven generated project site to GitHub. But that's a different story.... :-)
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21031338929693506-8717207038181465115?l=chkal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://chkal.blogspot.com/feeds/8717207038181465115/comments/default" title="Kommentare zum Post" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=21031338929693506&amp;postID=8717207038181465115" title="4 Kommentare" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/8717207038181465115?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/8717207038181465115?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/chkal/~3/dDrWB_C5EPY/maven-repositories-on-github.html" title="Maven Repositories on GitHub" /><author><name>Christian Kaltepoth</name><uri>http://www.blogger.com/profile/05223101449431660192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="29" height="32" src="http://2.bp.blogspot.com/_rf84MFynjwg/TDCiwh4Nu3I/AAAAAAAAAG8/7L-ZxyDftOc/S220/avatar2.jpg" /></author><thr:total>4</thr:total><feedburner:origLink>http://chkal.blogspot.com/2010/09/maven-repositories-on-github.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUMRX0-eip7ImA9WxFaF0o.&quot;"><id>tag:blogger.com,1999:blog-21031338929693506.post-7131038163117873054</id><published>2010-07-20T07:58:00.013+02:00</published><updated>2010-07-22T07:58:04.352+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-22T07:58:04.352+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="maven" /><category scheme="http://www.blogger.com/atom/ns#" term="jsf" /><title>Display Maven artifact versions in JSF pages</title><content type="html">&lt;p&gt;
I was recently confronted with the task of displaying the version of a JSF project in its page title. As the version was already contained in the project's &lt;i&gt;pom.xml&lt;/i&gt; and I didn't want to duplicate this information in another file, I searched for a simple way to display the &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt; artifact's version in the JSF page.
&lt;/p&gt;

&lt;p&gt;
As there was no easy way to do this, I created a small library for this usecase and named it &lt;a href="http://github.com/chkal/jsf-maven-util"&gt;jsf-maven-util&lt;/a&gt;. The main idea of it is to supply a JSF managed bean that lazily checks for &lt;i&gt;pom.properties&lt;/i&gt; files of Maven artifacts on the classpath. These files are created during the &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt; packaging process and are stored in the &lt;i&gt;META-INF/maven/&lt;/i&gt; directory of the output archive. 
&lt;/p&gt;

&lt;p&gt;
The library is very easy to use. A bean named &lt;i&gt;maven&lt;/i&gt; is automatically placed in the &lt;i&gt;application&lt;/i&gt; scope of your webapp. It contains a map which you can use to get the version of an artifact by using the groupId and artifactId (colon-separated) as the key.
&lt;/p&gt;

&lt;p&gt;
This example shows how to display the version of a web application in its page title.
&lt;/p&gt;

&lt;pre class="brush: xml; wrap-lines: false;"&gt;
&amp;lt;head&amp;gt;
  &amp;lt;title&amp;gt;
    My Application #{maven.version['com.example.myapp:myapp-webapp']}
  &amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;  
&lt;/pre&gt;

&lt;p&gt;
You can also display the version of any of your project's dependencies as long as it includes a &lt;i&gt;pom.properties&lt;/i&gt; in its archive:
&lt;/p&gt;

&lt;pre class="brush: xml; wrap-lines: false;"&gt;
&amp;lt;p&amp;gt;
  powered by Weld #{maven.version['org.jboss.weld:weld-core']}  
&amp;lt;/p&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
If you are interested in using this feature in your own project, add the following repository to your &lt;i&gt;pom.xml&lt;/i&gt;:
&lt;/p&gt;

&lt;pre class="brush: xml; wrap-lines: false;"&gt;
&amp;lt;repository&amp;gt;
  &amp;lt;id&amp;gt;jsf-maven-util-repo&amp;lt;/id&amp;gt;
  &amp;lt;name&amp;gt;jsf-maven-util Repository&amp;lt;/name&amp;gt;
  &amp;lt;url&amp;gt;http://chkal.github.com/jsf-maven-util/repository/&amp;lt;/url&amp;gt;
&amp;lt;/repository&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
Then add the following dependency to your project:
&lt;/p&gt;

&lt;pre class="brush: xml; wrap-lines: false;"&gt;
&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;de.chkal.jsf&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;jsf-maven-util&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;1.1&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
I pushed the source to a &lt;a href="http://github.com/chkal/jsf-maven-util"&gt;GitHub&lt;/a&gt; repository. Let me know if you have any issues.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21031338929693506-7131038163117873054?l=chkal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://chkal.blogspot.com/feeds/7131038163117873054/comments/default" title="Kommentare zum Post" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=21031338929693506&amp;postID=7131038163117873054" title="1 Kommentare" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/7131038163117873054?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/7131038163117873054?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/chkal/~3/1YXQdt7KUtw/display-maven-artifact-versions-in-jsf.html" title="Display Maven artifact versions in JSF pages" /><author><name>Christian Kaltepoth</name><uri>http://www.blogger.com/profile/05223101449431660192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="29" height="32" src="http://2.bp.blogspot.com/_rf84MFynjwg/TDCiwh4Nu3I/AAAAAAAAAG8/7L-ZxyDftOc/S220/avatar2.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://chkal.blogspot.com/2010/07/display-maven-artifact-versions-in-jsf.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EBSHo7eyp7ImA9WxNWEko.&quot;"><id>tag:blogger.com,1999:blog-21031338929693506.post-3759695807572073649</id><published>2009-10-11T16:30:00.003+02:00</published><updated>2009-10-11T16:34:19.403+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-11T16:34:19.403+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="maven" /><title>Google Analytics and Maven Project Sites</title><content type="html">&lt;p&gt;
I recently looked for a way to integrate the &lt;a href="http://www.google.com/analytics/"&gt;Google Analytics&lt;/a&gt; tracking code into the project site of my current spare time project &lt;a href="http://www.criteria4jpa.org/"&gt;Criteria4JPA&lt;/a&gt;. I'm using the &lt;a href="http://maven.apache.org/plugins/maven-site-plugin/"&gt;Maven Site Plugin&lt;/a&gt; to automatically build the project page because it makes the process of creating a site very easy.
&lt;/p&gt;

&lt;p&gt;
After some time I realized that there seems to be no easy way to do this. Somebody on the maven-user list &lt;a href="http://mail-archives.apache.org/mod_mbox/maven-users/200706.mbox/%3C7281ca710706291341v41a82017h25b76a314fc8b4bc@mail.gmail.com%3E"&gt;proposed&lt;/a&gt; to create a copy of the original site template and modify it to include the necessary JavaScript in the page header. But I think that this solution is much to complicated for such a simple job. I also found an &lt;a href="http://jira.codehaus.org/browse/MSITE-161"&gt;existing JIRA issue&lt;/a&gt; describing the problem but it is still unresolved.
&lt;/p&gt;

&lt;p&gt;
But after much more searching I discovered a very simple and elegant way to get the Google Analytics tracking code into the maven site. I found the hint on the doxia-dev mailing list. Someone talked about a &lt;a href="http://www.nabble.com/head-element-in-site.xml--td12537293.html"&gt;mysterious &amp;lt;head&amp;gt; element&lt;/a&gt; that can be used in the site.xml descriptor. The JIRA issue &lt;a href="http://jira.codehaus.org/browse/DOXIA-150"&gt;DOXIA-150&lt;/a&gt; seemed to prove the existence of this feature.
&lt;/p&gt;

&lt;p&gt;
I tried it and it worked. See the site.xml file of &lt;a href="http://www.criteria4jpa.org/"&gt;Criteria4JPA&lt;/a&gt; for an example:
&lt;/p&gt;

&lt;pre class="brush: xml; wrap-lines: false;"&gt;
&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;
&amp;lt;project name="Criteria4JPA"&amp;gt;

  &amp;lt;body&amp;gt;

    &amp;lt;head&amp;gt;
      &amp;lt;!-- Google Analytics - Start --&amp;gt;
      &amp;lt;script type="text/javascript"&amp;gt;
      var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
      document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
      &amp;lt;/script&amp;gt;
      &amp;lt;script type="text/javascript"&amp;gt;
      try {
      var pageTracker = _gat._getTracker("UA-1234567-8");
      pageTracker._trackPageview();
      } catch(err) {}&amp;lt;/script&amp;gt;      
      &amp;lt;!-- Google Analytics - End --&amp;gt;
    &amp;lt;/head&amp;gt;

    &amp;lt;!-- more stuff --&amp;gt;

  &amp;lt;/body&amp;gt;
&amp;lt;/project&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
As you can see adding the tracking code is very easy. Just place a &amp;lt;head&amp;gt; element inside the body and copy the Google Analytics code in there. The default JavaScript code you get from Google Analytics is already correctly escaped so you can copy and paste it into the XML descriptor without problems.
&lt;/p&gt;

&lt;p&gt;
I don't know for sure which versions of Maven, Doxia and the Site Plugin are required for this but I can confirm that Maven 2.2.0 together with the Maven Site Plugin 2.0-beta-7 works.
&lt;/p&gt;

&lt;p&gt;
Happy tracking... :-)
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21031338929693506-3759695807572073649?l=chkal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://chkal.blogspot.com/feeds/3759695807572073649/comments/default" title="Kommentare zum Post" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=21031338929693506&amp;postID=3759695807572073649" title="3 Kommentare" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/3759695807572073649?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/3759695807572073649?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/chkal/~3/k2svkTeq-9c/google-analytics-and-maven-project.html" title="Google Analytics and Maven Project Sites" /><author><name>Christian Kaltepoth</name><uri>http://www.blogger.com/profile/05223101449431660192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="29" height="32" src="http://2.bp.blogspot.com/_rf84MFynjwg/TDCiwh4Nu3I/AAAAAAAAAG8/7L-ZxyDftOc/S220/avatar2.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://chkal.blogspot.com/2009/10/google-analytics-and-maven-project.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EHQnw5fSp7ImA9WxNWEko.&quot;"><id>tag:blogger.com,1999:blog-21031338929693506.post-7596639698549875484</id><published>2009-06-11T12:11:00.016+02:00</published><updated>2009-10-11T16:33:53.225+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-11T16:33:53.225+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="tptp" /><title>Eclipse TPTP Profiler and Ubuntu Linux - Problems and Solutions</title><content type="html">&lt;p&gt;
I recently tried to setup the &lt;a title="Eclipse TPTP Profiler" target="_blank" href="http://www.eclipse.org/tptp/"&gt;Eclipse TPTP Profiler&lt;/a&gt; on my two Linux boxes (Ubuntu 7.04 "Feisty Fawn" and 8.10 "Intrepid Ibex"). I thought this would only require installing some plugins from the Ganymede update site. I learned that the installation can be more complex on Linux systems.
&lt;/p&gt;

&lt;p&gt;
The most problematic part of the TPTP Profiler installation was setting up the &lt;i&gt;Agent Controller&lt;/i&gt;. The Agent Controller is a native binary and as we all know native code does not follow the philosophy "compile once, run everywhere"! :-)
&lt;/p&gt;

&lt;p&gt;
After installing the the features "TPTP Tracing and Profiling Tools Project" and "TPTP Profiling for Web applications" from the Ganymede update site I restarted Eclipse and tried to profile a simple web application via "Profile as -&amp;gt; Profile on Server". Unfortunately this failed with:&lt;/p&gt;
&lt;p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
[Error: FATAL ERROR: JPIAgent can't load ACCollector]
&lt;/pre&gt;


&lt;h3&gt;Basic troubleshooting procedure&lt;/h3&gt;

&lt;p&gt;
To debug such problems I recommend to try starting the Agent Controller directly from the command line. This way you can easily find problems related to the agent controller. I decided to start the Agent Controller binary &lt;i&gt;ACServer&lt;/i&gt; instead of the startup shell script &lt;i&gt;ACStart.sh&lt;/i&gt;, because I didn't figure out which way Eclipse uses to execute the Agent Controller.
&lt;/p&gt;

&lt;p&gt;
To start the Agent Controller from the command line you must find the directory of the Agent Controller bundle. For my Ganymede installation the process looks like this:
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
$ cd plugins/org.eclipse.tptp.platform.ac.linux_*/agent_controller/bin
$ ./ACServer
./ACServer: error while loading shared libraries: libtptpUtils.so.4: cannot open shared object file: No such file or directory
&lt;/pre&gt;

&lt;p&gt;
Your first try will probably fail like in this example because of a missing shared library. The library &lt;i&gt;libtptpUtils&lt;/i&gt; residents in the library directory of the agent controller. Eclipse will take care of setting the corresponding paths but as we are trying to start the Agent Controller from the command line, we have to perform this step to temporarily fix this problem for our test:
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
$ export LD_LIBRARY_PATH=../lib
&lt;/pre&gt;

&lt;p&gt;
If you are lucky, the Agent Controller now starts without any problems. But on my systems the execution failed for different reasons described in the following sections.
&lt;/p&gt;


&lt;h3&gt;Broken symlinks&lt;/h3&gt;

&lt;p&gt;
There seems to be a problem with symlink creation during the installation of the Agent Controller bundle. This bug showed up with Ubuntu 7.04 but not with Ubuntu 8.10.
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
$ ./ACServer
./ACServer: error while loading shared libraries: libtptpUtils.so.4: cannot open shared object file: File too short
&lt;/pre&gt;

&lt;p&gt;
On my system there was a regular file named &lt;i&gt;libtptpUtils.so.4&lt;/i&gt; which contained only the string &lt;i&gt;libtptpUtils.so.4.5.0&lt;/i&gt;. Instead of creating symlinks the installation process seemed to create regular files which contain the name of the referenced file.
&lt;/p&gt;

&lt;p&gt;
I fixed the problem by manually removing the broken files and creating the symlinks:
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
$ rm libtptpUtils.so libtptpUtils.so.4
$ ln -s libtptpUtils.so.4.5.0 libtptpUtils.so.4
$ ln -s libtptpUtils.so.4 libtptpUtils.so

$ rm libxerces-c.so libxerces-c.so.26
$ ln -s libxerces-c.so.26.0 libxerces-c.so.26
$ ln -s libxerces-c.so.26 libxerces-c.so

$ rm libxerces-depdom.so libxerces-depdom.so.26
$ ln -s libxerces-depdom.so.26.0 libxerces-depdom.so.26
$ ln -s libxerces-depdom.so.26 libxerces-depdom.so

$ rm libtransportSupport.so libtransportSupport.so.4
$ ln -s libtransportSupport.so.4.5.0 libtransportSupport.so.4
$ ln -s libtransportSupport.so.4 libtransportSupport.so
&lt;/pre&gt;

&lt;p&gt;
Surprisingly this problem only showed up on my first try getting Eclipse and the TPTP Profiler to work. I tried to reproduce the problem with a clean Eclipse installation while working on this blog post. But the second time all symlinks were created successfully. This makes me suspect that the bug is fixed in the current TPTP releases.
&lt;/p&gt;


&lt;h3&gt;Missing shared libraries&lt;/h3&gt;

&lt;p&gt;
The Ubuntu 8.10 box showed another problem, that didn't occur on my old Ubuntu 7.04 installation:
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
$./ACServer
./ACServer: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
&lt;/pre&gt;

&lt;p&gt;
The Agent Controller requires an old libstdc++ library that wasn't installed on Ubuntu 8.10. Fixing this problem depends on the Linux
distribution and its version. For Ubuntu 7.10 the library is
contained in the "libstdc++2.10-glibc2.2" package, which was already installed. Ubuntu 8.10 is lacking a
package containing this file. I fixed the problem by manually
downloading a package from an older Ubuntu release:
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
$ cd /tmp
$ wget "http://de.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-2.95/libstdc++2.10-glibc2.2_2.95.4-24_i386.deb"
$ sudo dpkg -i libstdc++2.10-glibc2.2_2.95.4-24_i386.deb
&lt;/pre&gt;

&lt;p&gt;
Depending on your system there might by other libraries missing. The following list contains all shared library dependenies of the Agent Controller binary:
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
$ ldd ACServer
&amp;nbsp;&amp;nbsp; linux-gate.so.1 =&amp;gt;&amp;nbsp; (0xffffe000)
&amp;nbsp;&amp;nbsp; libtptpUtils.so.4 =&amp;gt; ../lib/libtptpUtils.so.4 (0xb7f72000)
&amp;nbsp;&amp;nbsp; libtptpLogUtils.so.4 =&amp;gt; ../lib/libtptpLogUtils.so.4 (0xb7f65000)
&amp;nbsp;&amp;nbsp; libtptpConfig.so.4 =&amp;gt; ../lib/libtptpConfig.so.4 (0xb7f4b000)
&amp;nbsp;&amp;nbsp; libprocessControlUtil.so.4 =&amp;gt; ../lib/libprocessControlUtil.so.4 (0xb7f46000)
&amp;nbsp;&amp;nbsp; libxerces-c.so.26 =&amp;gt; ../lib/libxerces-c.so.26 (0xb7b3f000)
&amp;nbsp;&amp;nbsp; libpthread.so.0 =&amp;gt; /lib/tls/i686/cmov/libpthread.so.0 (0xb7b12000)
&amp;nbsp;&amp;nbsp; libc.so.6 =&amp;gt; /lib/tls/i686/cmov/libc.so.6 (0xb79d1000)
&amp;nbsp;&amp;nbsp; libdl.so.2 =&amp;gt; /lib/tls/i686/cmov/libdl.so.2 (0xb79cd000)
&amp;nbsp;&amp;nbsp; libuuid.so.1 =&amp;gt; /lib/libuuid.so.1 (0xb79ca000)
&amp;nbsp;&amp;nbsp; libstdc++-libc6.2-2.so.3 =&amp;gt; /usr/lib/libstdc++-libc6.2-2.so.3 (0xb7982000)
&amp;nbsp;&amp;nbsp; libm.so.6 =&amp;gt; /lib/tls/i686/cmov/libm.so.6 (0xb795a000)
&amp;nbsp;&amp;nbsp; /lib/ld-linux.so.2 (0xb7f95000)
&lt;/pre&gt;

&lt;p&gt;
If some of these libraries are missing on your system you will have to find and install the corresponding packages. A Good place to start searching for packages is the &lt;a target="_blank" title="Ubuntu Packages Search" href="http://packages.ubuntu.com/" id="w_8e"&gt;Ubuntu Packages Search&lt;/a&gt;, the &lt;a target="_blank" title="Debian Package Search" href="http://www.debian.org/distrib/packages" id="imvv"&gt;Debian Package Search&lt;/a&gt;, the &lt;a target="_blank" title="Fedora Package Database" href="https://admin.fedoraproject.org/pkgdb/" id="y6tx"&gt;Fedora Package Database&lt;/a&gt; or other distribution's package directories.
&lt;/p&gt;


&lt;h3&gt;Missing TEMP environment variable&lt;/h3&gt;

&lt;p&gt;
This problem was the easiest to solve. The Agent Controller complains about the missing environment variable TEMP.
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
$ ./ACServer
The TEMP environment variable does not point to a valid directory.
Agent Controller will not start.
&lt;/pre&gt;

&lt;p&gt;
As already hinted this problem can be solved easily. Just put this line in your &lt;i&gt;.bashrc&lt;/i&gt; file:
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
export TEMP=/tmp
&lt;/pre&gt;

&lt;p&gt;
It should be mentioned that I did not test whether Eclipse takes care of setting this variable for the Agent Controller process. But it does certainly no harm to set it manually.
&lt;/p&gt;


&lt;h3&gt;Finally...&lt;/h3&gt;

&lt;p&gt;
If you don't stumble across other problems the Agent Controller should now start normally. In this case you won't see any output on the console.
&lt;/p&gt;

&lt;pre class="brush: plain; gutter: false;"&gt;
$ ./ACServer
&amp;lt;no console output&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
Now you can stop the Agent Controller by hitting CTRL+C and retry profiling an application in Eclipse. On my system profiling in Eclipse now worked as expected.
&lt;/p&gt;


&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;
The installation of the TPTP Profiler can be very problematic on a Linux box. I have presented solutions for the different problems I was confronted with. By reading this short blog post everyone should get an idea of the most common problems regarding the Agent Controller and which way to go to solve them.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21031338929693506-7596639698549875484?l=chkal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://chkal.blogspot.com/feeds/7596639698549875484/comments/default" title="Kommentare zum Post" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=21031338929693506&amp;postID=7596639698549875484" title="0 Kommentare" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/7596639698549875484?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/7596639698549875484?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/chkal/~3/IC7QtG8jk94/eclipse-tptp-profiler-and-ubuntu-linux.html" title="Eclipse TPTP Profiler and Ubuntu Linux - Problems and Solutions" /><author><name>Christian Kaltepoth</name><uri>http://www.blogger.com/profile/05223101449431660192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="29" height="32" src="http://2.bp.blogspot.com/_rf84MFynjwg/TDCiwh4Nu3I/AAAAAAAAAG8/7L-ZxyDftOc/S220/avatar2.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://chkal.blogspot.com/2009/06/eclipse-tptp-profiler-and-ubuntu-linux.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MDRHw6eyp7ImA9WxVbE08.&quot;"><id>tag:blogger.com,1999:blog-21031338929693506.post-8059482008529377875</id><published>2009-03-28T14:23:00.020+01:00</published><updated>2009-03-29T14:24:35.213+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-29T14:24:35.213+02:00</app:edited><title>Welcome to my blog</title><content type="html">&lt;p&gt;
Welcome to my first blog post. My name is Christian Kaltepoth and I'm a enthusiastic java developer, tech junkie, &lt;a target="_blank" title="twitter" href="http://twitter.com/chkal"&gt;twitter&lt;/a&gt; fan and &lt;a target="_blank" title="android" href="http://www.android.com/"&gt;android&lt;/a&gt; addict.
&lt;/p&gt;

&lt;p&gt;
I've chosen &lt;a target="_blank" title="blogger.com" href="http://www.blogger.com"&gt;blogger.com&lt;/a&gt; for my blog. Initially I thought about installing some blog software on my own server. But this would have meant that I would have to maintain the blog myself. And to be honest, I spend my time preferably with other things than installing security patches or messing with PHP stuff.
&lt;/p&gt;

&lt;p&gt;
Now it's time to test my blog in matter of syntax highlighting. Here is some Java code:
&lt;/p&gt;

&lt;pre class="brush: java"&gt;
class MyClass {

  /**
   * my main method
  */
  public static void main(String args[]) {

    // let's say hello
    System.out.println("Hello World!");

  }

}
&lt;/pre&gt;

&lt;p&gt;
And perhaps I will have to post some XML snippets too:
&lt;/p&gt;

&lt;pre class="brush: xml"&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;note&amp;gt;
  &amp;lt;to&amp;gt;Christian&amp;lt;/to&amp;gt;
  &amp;lt;heading&amp;gt;Reminder&amp;lt;/heading&amp;gt;
  &amp;lt;text&amp;gt;Write your first blog post!&amp;lt;/text&amp;gt;
&amp;lt;/note&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
And now we are already at the end of the first post. At the moment I am preparing an article on installing &lt;a target="_blank" title="Eclipse TPTP" href="http://www.eclipse.org/tptp/"&gt;Eclipse TPTP&lt;/a&gt; on Linux. So stay tuned...
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21031338929693506-8059482008529377875?l=chkal.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://chkal.blogspot.com/feeds/8059482008529377875/comments/default" title="Kommentare zum Post" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=21031338929693506&amp;postID=8059482008529377875" title="1 Kommentare" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/8059482008529377875?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/21031338929693506/posts/default/8059482008529377875?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/chkal/~3/wLP0cmJwGQg/welcome-to-my-blog.html" title="Welcome to my blog" /><author><name>Christian Kaltepoth</name><uri>http://www.blogger.com/profile/05223101449431660192</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="29" height="32" src="http://2.bp.blogspot.com/_rf84MFynjwg/TDCiwh4Nu3I/AAAAAAAAAG8/7L-ZxyDftOc/S220/avatar2.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://chkal.blogspot.com/2009/03/welcome-to-my-blog.html</feedburner:origLink></entry></feed>

