<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/2.4.5" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Joshua Nichols</title>
		<link>http://blogs.gentoo.org/nichoj</link>
		<description></description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=2.4.5"/>
		<ttl>60</ttl>
				<item>
			<title>JRuby on Rails on Gentoo</title>
			<link>http://blogs.gentoo.org/nichoj/2007/05/24/jruby_on_rails_on_gentoo</link>
			<pubDate>Thu, 24 May 2007 20:34:32 +0000</pubDate>			<dc:creator>Joshua Nichols</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">1327@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;After adding &lt;a href=&quot;http://jruby.codehaus.org&quot;&gt;JRuby&lt;/a&gt; 1.0.0 RC2 to the tree, I began poking around using it to run a little blog I've been writing in rails. Surprisingly, the process was quite easy. I just had to package the JDBC wrapper for ActiveRecord.&lt;/p&gt;

&lt;p&gt;So here are the details, assuming you are using mysql:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;# emerge &gt;=jruby-1.0.1_rc2-r1 activerecord-jdbc jdbc-mysql&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;I added quite a few changes to -r1, including the ability to use gems and other ruby packages already installed on the system. To do this, there is now a symlink from /&lt;em&gt;usr/share/jruby/lib/ruby/gems&lt;/em&gt; to &lt;em&gt;/usr/lib/ruby/gems&lt;/em&gt;, and the same for site_ruby as well. If you had an earlier version of jruby, they used to be a separate directories, where you'd have to install gems again. If that's the case, you'll see a warnings, and eventually an error that you need to move /usr/share/jruby/lib/ruby/gems and &lt;em&gt;/usr/share/jruby/lib/ruby/site_ruby&lt;/em&gt; out of the way before you can continue.&lt;/p&gt;

&lt;p&gt;After things have successfully merged, we are ready to add the appropriate configuration. I'm going to assume here that you have already have a rails app to work on, and using mysql for a database. If not, there may be a trillion or so places on the interwebs that explain how to get going.&lt;/p&gt;

&lt;p&gt;First, we add need to add a bit to the &lt;em&gt;config/environment.rb&lt;/em&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;def using_jruby?
  RUBY_PLATFORM =~ /java/
end

if using_jruby? 
  require 'rubygems'
  RAILS_CONNECTION_ADAPTERS = %w(jdbc)
end&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;This can be placed after the &lt;em&gt;require File.join(File.dirname(__FILE__), 'boot')&lt;/em&gt; line. If there's a better place &lt;em&gt;using_jruby?&lt;/em&gt; should be defined, please let me know.&lt;/p&gt;

&lt;p&gt;Now we wander over to &lt;em&gt;config/database.yml&lt;/em&gt;. Here is what was originally there:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;development:
  adapter: mysql
  socket: /var/run/mysqld/mysqld.sock
  database: yourapp_development
  username: root
  password:&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Now we update it to use:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;development:
  &amp;lt;% if using_jruby? %&gt;
  adapter: jdbc
  driver: com.mysql.jdbc.Driver
  url: jdbc:mysql://localhost/yourapp_development
  &amp;lt;% else  %&gt;
  adapter: mysql
  socket: /var/run/mysqld/mysqld.sock
  &amp;lt;% end %&gt;
  database: yourapp_development
  username: root
  password:&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;So, if we're using jruby, we use the JDBC adapter, with the appropriate driver, and point it at the right URL. Otherwise, it'll use what we had before.&lt;/p&gt;

&lt;p&gt;You'll likely also want to apply this to the test and/or production databases.&lt;/p&gt;

&lt;p&gt;One last thing we need to do is make sure that the jruby gets jdbc-mysql on the classpath. The simplistic way to do this would be to just:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;$ export CLASSPATH=$(java-config --classpath jdbc-mysql)&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;That works for testing, but I want something a little more permanent. So now, we use a relatively undocumented feature of java-config.&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;$ mkdir -p ~/.gentoo/java-config-2/launcher.d/
echo CLASSPATH=\$(java-config --classpath jdbc-mysql) \
&gt; ~/.gentoo/java-config-2/launcher.d/jruby&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;/usr/bin/jruby, and most Java applications on Gentoo use a launcher utility we wrote, to help with building classpaths, invoking the right class, and so on. What this snippet did was create some custom configuration for the jruby launcher, which would get used whenever you invoke jruby. In this case, we add jdbc-mysql to the classpath.&lt;/p&gt;

&lt;p&gt;Now we should be all ready to actually use it.&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;$ jruby script/server&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;You should now be able to hit your application at the usual location. Keep in mind that unless you invoke Note: you'll always have to invoke it with jruby, or alternatively, you can update the #! line in script/server to be &quot;#!/usr/bin/env jruby&quot;.&lt;/p&gt;

&lt;p&gt;One issue I have run into is that things freak out when running unit tests, because it &quot;can't find an appropriate driver&quot;, which doesn't make sense when it works fine for development. Here's a snippet:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;$ jruby /usr/bin/rake  test
-----SNIP-----
1) Error:
test_create(BlogPostsControllerTest):
RuntimeError: The driver encountered an error: java.sql.SQLException: No suitable driver
    /usr/share/jruby/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.3.1/lib/active_record/connection_adapters/jdbc_adapter.rb:208:in `initialize'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.3.1/lib/active_record/connection_adapters/jdbc_adapter.rb:10:in `new'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.3.1/lib/active_record/connection_adapters/jdbc_adapter.rb:10:in `jdbc_connection'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection='
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection='
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:247:in `create_fixtures'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:593:in `load_fixtures'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:538:in `setup_with_fixtures'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:575:in `setup'
    ./test/functional/blog_posts_controller_test.rb:17:in `setup'
-----SNIP-----
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Lastly, here are some resources that may be useful:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.headius.com/jrubywiki/index.php/Main_Page&quot;&gt;http://www.headius.com/jrubywiki/index.php/Main_Page&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.headius.com/jrubywiki/index.php/JRuby_on_Rails&quot;&gt;http://www.headius.com/jrubywiki/index.php/JRuby_on_Rails&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.headius.com/jrubywiki/index.php/Running_Rails_with_ActiveRecord-JDBC&quot;&gt;http://www.headius.com/jrubywiki/index.php/Running_Rails_with_ActiveRecord-JDBC&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/nichoj/2007/05/24/jruby_on_rails_on_gentoo&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>After adding <a href="http://jruby.codehaus.org">JRuby</a> 1.0.0 RC2 to the tree, I began poking around using it to run a little blog I've been writing in rails. Surprisingly, the process was quite easy. I just had to package the JDBC wrapper for ActiveRecord.</p>

<p>So here are the details, assuming you are using mysql:</p>

<blockquote><pre># emerge >=jruby-1.0.1_rc2-r1 activerecord-jdbc jdbc-mysql</pre></blockquote>

<p>I added quite a few changes to -r1, including the ability to use gems and other ruby packages already installed on the system. To do this, there is now a symlink from /<em>usr/share/jruby/lib/ruby/gems</em> to <em>/usr/lib/ruby/gems</em>, and the same for site_ruby as well. If you had an earlier version of jruby, they used to be a separate directories, where you'd have to install gems again. If that's the case, you'll see a warnings, and eventually an error that you need to move /usr/share/jruby/lib/ruby/gems and <em>/usr/share/jruby/lib/ruby/site_ruby</em> out of the way before you can continue.</p>

<p>After things have successfully merged, we are ready to add the appropriate configuration. I'm going to assume here that you have already have a rails app to work on, and using mysql for a database. If not, there may be a trillion or so places on the interwebs that explain how to get going.</p>

<p>First, we add need to add a bit to the <em>config/environment.rb</em>:</p>

<blockquote><pre>def using_jruby?
  RUBY_PLATFORM =~ /java/
end

if using_jruby? 
  require 'rubygems'
  RAILS_CONNECTION_ADAPTERS = %w(jdbc)
end</pre>
</blockquote>
<p>This can be placed after the <em>require File.join(File.dirname(__FILE__), 'boot')</em> line. If there's a better place <em>using_jruby?</em> should be defined, please let me know.</p>

<p>Now we wander over to <em>config/database.yml</em>. Here is what was originally there:</p>

<blockquote><pre>development:
  adapter: mysql
  socket: /var/run/mysqld/mysqld.sock
  database: yourapp_development
  username: root
  password:</pre></blockquote>

<p>Now we update it to use:</p>
<blockquote><pre>development:
  &lt;% if using_jruby? %>
  adapter: jdbc
  driver: com.mysql.jdbc.Driver
  url: jdbc:mysql://localhost/yourapp_development
  &lt;% else  %>
  adapter: mysql
  socket: /var/run/mysqld/mysqld.sock
  &lt;% end %>
  database: yourapp_development
  username: root
  password:</pre></blockquote>

<p>So, if we're using jruby, we use the JDBC adapter, with the appropriate driver, and point it at the right URL. Otherwise, it'll use what we had before.</p>

<p>You'll likely also want to apply this to the test and/or production databases.</p>

<p>One last thing we need to do is make sure that the jruby gets jdbc-mysql on the classpath. The simplistic way to do this would be to just:</p>

<blockquote><pre>$ export CLASSPATH=$(java-config --classpath jdbc-mysql)</pre></blockquote>

<p>That works for testing, but I want something a little more permanent. So now, we use a relatively undocumented feature of java-config.</p>

<blockquote><pre>$ mkdir -p ~/.gentoo/java-config-2/launcher.d/
echo CLASSPATH=\$(java-config --classpath jdbc-mysql) \
> ~/.gentoo/java-config-2/launcher.d/jruby</pre></blockquote>

<p>/usr/bin/jruby, and most Java applications on Gentoo use a launcher utility we wrote, to help with building classpaths, invoking the right class, and so on. What this snippet did was create some custom configuration for the jruby launcher, which would get used whenever you invoke jruby. In this case, we add jdbc-mysql to the classpath.</p>

<p>Now we should be all ready to actually use it.</p>

<blockquote><pre>$ jruby script/server</pre></blockquote>

<p>You should now be able to hit your application at the usual location. Keep in mind that unless you invoke Note: you'll always have to invoke it with jruby, or alternatively, you can update the #! line in script/server to be "#!/usr/bin/env jruby".</p>

<p>One issue I have run into is that things freak out when running unit tests, because it "can't find an appropriate driver", which doesn't make sense when it works fine for development. Here's a snippet:</p>

<blockquote><pre>$ jruby /usr/bin/rake  test
-----SNIP-----
1) Error:
test_create(BlogPostsControllerTest):
RuntimeError: The driver encountered an error: java.sql.SQLException: No suitable driver
    /usr/share/jruby/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.3.1/lib/active_record/connection_adapters/jdbc_adapter.rb:208:in `initialize'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.3.1/lib/active_record/connection_adapters/jdbc_adapter.rb:10:in `new'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.3.1/lib/active_record/connection_adapters/jdbc_adapter.rb:10:in `jdbc_connection'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection='
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection='
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:247:in `create_fixtures'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:593:in `load_fixtures'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:538:in `setup_with_fixtures'
    /usr/share/jruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:575:in `setup'
    ./test/functional/blog_posts_controller_test.rb:17:in `setup'
-----SNIP-----
</pre></blockquote>

<p>Lastly, here are some resources that may be useful:</p>
<ul>
  <li><a href="http://www.headius.com/jrubywiki/index.php/Main_Page">http://www.headius.com/jrubywiki/index.php/Main_Page</a></li>
  <li><a href="http://www.headius.com/jrubywiki/index.php/JRuby_on_Rails">http://www.headius.com/jrubywiki/index.php/JRuby_on_Rails</a></li>
  <li><a href="http://www.headius.com/jrubywiki/index.php/Running_Rails_with_ActiveRecord-JDBC">http://www.headius.com/jrubywiki/index.php/Running_Rails_with_ActiveRecord-JDBC</a></li>
</ul>



<div class="item_footer"><p><small><a href="http://blogs.gentoo.org/nichoj/2007/05/24/jruby_on_rails_on_gentoo">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/nichoj/2007/05/24/jruby_on_rails_on_gentoo#comments</comments>
		</item>
				<item>
			<title>Aiding and abetting the enemy, rails 1.2.2, and #gentoo-ruby</title>
			<link>http://blogs.gentoo.org/nichoj/2007/02/16/aiding_and_abetting_the_enemy_rails_1_2_</link>
			<pubDate>Fri, 16 Feb 2007 00:36:51 +0000</pubDate>			<dc:creator>Joshua Nichols</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">1246@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;I must admit, I've been experimenting with Ruby on Rails with increased frequency of late. Being heavily invested both in Java on the Gentoo and professional fronts, this seems almost like... treachery &lt;img src=&quot;http://blogs.gentoo.org/rsc/smilies/icon_twisted.gif&quot; alt=&quot;&amp;#58;&amp;#62;&quot; class=&quot;middle&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I must say, it has been quite refreshing. It is quite a lovely development platform. I won't go into details about a comparison to developing on the typical Java platform, as I'm sure there are plenty of those on the interblarg already &lt;img src=&quot;http://blogs.gentoo.org/rsc/smilies/icon_smile.gif&quot; alt=&quot;&amp;#58;&amp;#41;&quot; class=&quot;middle&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I decided this past weekend that would try to help out with Ruby on Gentoo, and so joined the ruby herd.&lt;/p&gt;

&lt;p&gt;My first act was to bump dev-ruby/rails from 1.2.1 to 1.2.2. If you happen to be using it in any projects, you'll likely want to update RAILS_GEM_VERSION to 1.2.2 in your config/environment.rb.&lt;/p&gt;

&lt;p&gt;Lastly, pingu and I are trying to get some interest in #gentoo-ruby going. According to &lt;a href=&quot;http://farragut.flameeyes.is-a-geek.org/&quot;&gt;Flameeyes&lt;/a&gt;, people have tried in the past, but apparently it didn't quite stick. Let's give it another try, shall we? If you're working with Ruby on Gentoo, feel free to stop by #gentoo-ruby on irc.freenode.net.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/nichoj/2007/02/16/aiding_and_abetting_the_enemy_rails_1_2_&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I must admit, I've been experimenting with Ruby on Rails with increased frequency of late. Being heavily invested both in Java on the Gentoo and professional fronts, this seems almost like... treachery <img src="http://blogs.gentoo.org/rsc/smilies/icon_twisted.gif" alt="&#58;&#62;" class="middle" /></p>

<p>I must say, it has been quite refreshing. It is quite a lovely development platform. I won't go into details about a comparison to developing on the typical Java platform, as I'm sure there are plenty of those on the interblarg already <img src="http://blogs.gentoo.org/rsc/smilies/icon_smile.gif" alt="&#58;&#41;" class="middle" /></p>

<p>I decided this past weekend that would try to help out with Ruby on Gentoo, and so joined the ruby herd.</p>

<p>My first act was to bump dev-ruby/rails from 1.2.1 to 1.2.2. If you happen to be using it in any projects, you'll likely want to update RAILS_GEM_VERSION to 1.2.2 in your config/environment.rb.</p>

<p>Lastly, pingu and I are trying to get some interest in #gentoo-ruby going. According to <a href="http://farragut.flameeyes.is-a-geek.org/">Flameeyes</a>, people have tried in the past, but apparently it didn't quite stick. Let's give it another try, shall we? If you're working with Ruby on Gentoo, feel free to stop by #gentoo-ruby on irc.freenode.net.</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/nichoj/2007/02/16/aiding_and_abetting_the_enemy_rails_1_2_">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/nichoj/2007/02/16/aiding_and_abetting_the_enemy_rails_1_2_#comments</comments>
		</item>
				<item>
			<title>Update on Xfce 4.4 unmasking</title>
			<link>http://blogs.gentoo.org/nichoj/2007/02/04/update_on_xfce_4_4_unmasking</link>
			<pubDate>Sun, 04 Feb 2007 19:56:38 +0000</pubDate>			<dc:creator>Joshua Nichols</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">1232@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;To follow up my previous post about unmasking Xfce 4.4...&lt;/p&gt;

&lt;p&gt;Since then, I went through the process of upgrading from 4.2 to 4.4. Found a few kinks, mostly with files collisions caused by files moving from one package to another. These have been since worked out.&lt;/p&gt;

&lt;p&gt;The major roadblock now is a number of broken dependencies for a few archs. These issues were conveniently glossed over while things are masked, but making repoman pretty upset the second they are unmasked.&lt;/p&gt;

&lt;p&gt;So right now, all these issues have bugs filed for them, and now we play the waiting game. See the  &lt;a href=&quot;https://bugs.gentoo.org/show_bug.cgi?id=163143&quot;&gt;tracker&lt;/a&gt; for the latest breaking news.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/nichoj/2007/02/04/update_on_xfce_4_4_unmasking&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>To follow up my previous post about unmasking Xfce 4.4...</p>

<p>Since then, I went through the process of upgrading from 4.2 to 4.4. Found a few kinks, mostly with files collisions caused by files moving from one package to another. These have been since worked out.</p>

<p>The major roadblock now is a number of broken dependencies for a few archs. These issues were conveniently glossed over while things are masked, but making repoman pretty upset the second they are unmasked.</p>

<p>So right now, all these issues have bugs filed for them, and now we play the waiting game. See the  <a href="https://bugs.gentoo.org/show_bug.cgi?id=163143">tracker</a> for the latest breaking news.</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/nichoj/2007/02/04/update_on_xfce_4_4_unmasking">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/nichoj/2007/02/04/update_on_xfce_4_4_unmasking#comments</comments>
		</item>
				<item>
			<title>unmask teh Xfce!!!one</title>
			<link>http://blogs.gentoo.org/nichoj/2007/02/01/unmask_teh_xfce_one</link>
			<pubDate>Thu, 01 Feb 2007 03:17:15 +0000</pubDate>			<dc:creator>Joshua Nichols</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">1227@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;The question of when Xfce 4.4 will be unmasked has been coming up with increasing frequency.&lt;/p&gt;

&lt;p&gt;The default answer is... wait, for it, when it's ready &lt;img src=&quot;http://blogs.gentoo.org/rsc/smilies/icon_mrgreen.gif&quot; alt=&quot;&amp;#58;&amp;#62;&amp;#62;&quot; class=&quot;middle&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A more elaborate answer follows:&lt;/p&gt;

&lt;p&gt;We have established a 'tracker' bug &lt;a href=&quot;https://bugs.gentoo.org/show_bug.cgi?id=163143&quot;&gt;here&lt;/a&gt;. The team has been pretty good about keeping on top of bugs that come up with it, as in, there are no known issues currently.&lt;/p&gt;

&lt;p&gt;So that means it's ready, right? Not quite. Below are the outstanding issues I see:&lt;/p&gt;

&lt;p&gt;In making haste to get a 0-day release of 4.4, some corners may have been cut. In particular, some of the xfce-extra packages are lacking the appropriate keywords, even though xfce-base/xfce4-extras depend on them. This is only for new xfce-extra packages, which have been added only relatively recently.&lt;/p&gt;

&lt;p&gt;Icons seemed to have moved around a bit, as in, which packages owns them. This is a bit problematic, as it causes file collisions (enabled by FEATURES=&quot;collision-protect&quot;). While not critical to unmasking, it is pretty key for stabilizing, and the sooner it can be fixed the better.&lt;/p&gt;

&lt;p&gt;The other things I'm concerned about is the upgrade path from 4.2 to 4.4. Some things that were extras in 4.2 are now part of 4.4. As a result, some xfce-extra packages have blockers against them. In other cases, xfce-extra packages haven't been updated for 4.4, or otherwise are no longer maintained. These xfce-extra packages have blockers against them as well. The consequence of these point is that you will have to unmerge the packages that are reported as being blocked.&lt;/p&gt;
&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/nichoj/2007/02/01/unmask_teh_xfce_one&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>The question of when Xfce 4.4 will be unmasked has been coming up with increasing frequency.</p>

<p>The default answer is... wait, for it, when it's ready <img src="http://blogs.gentoo.org/rsc/smilies/icon_mrgreen.gif" alt="&#58;&#62;&#62;" class="middle" /></p>

<p>A more elaborate answer follows:</p>

<p>We have established a 'tracker' bug <a href="https://bugs.gentoo.org/show_bug.cgi?id=163143">here</a>. The team has been pretty good about keeping on top of bugs that come up with it, as in, there are no known issues currently.</p>

<p>So that means it's ready, right? Not quite. Below are the outstanding issues I see:</p>

<p>In making haste to get a 0-day release of 4.4, some corners may have been cut. In particular, some of the xfce-extra packages are lacking the appropriate keywords, even though xfce-base/xfce4-extras depend on them. This is only for new xfce-extra packages, which have been added only relatively recently.</p>

<p>Icons seemed to have moved around a bit, as in, which packages owns them. This is a bit problematic, as it causes file collisions (enabled by FEATURES="collision-protect"). While not critical to unmasking, it is pretty key for stabilizing, and the sooner it can be fixed the better.</p>

<p>The other things I'm concerned about is the upgrade path from 4.2 to 4.4. Some things that were extras in 4.2 are now part of 4.4. As a result, some xfce-extra packages have blockers against them. In other cases, xfce-extra packages haven't been updated for 4.4, or otherwise are no longer maintained. These xfce-extra packages have blockers against them as well. The consequence of these point is that you will have to unmerge the packages that are reported as being blocked.</p>
<div class="item_footer"><p><small><a href="http://blogs.gentoo.org/nichoj/2007/02/01/unmask_teh_xfce_one">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/nichoj/2007/02/01/unmask_teh_xfce_one#comments</comments>
		</item>
				<item>
			<title>XFCE all up in your face</title>
			<link>http://blogs.gentoo.org/nichoj/2007/01/22/xfce_all_up_in_your_face</link>
			<pubDate>Mon, 22 Jan 2007 03:58:47 +0000</pubDate>			<dc:creator>Joshua Nichols</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">1210@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;After being in beta and release candidates for several months, XFCE 4.4 is finally released. Not only that, but ebuilds for them are willing and ready to go. woot.&lt;/p&gt;

&lt;p&gt;All the extra panel plugins and extra utilities have been updated as well. In addition, there have been some new additions for 4.4. Use xfce-base/xfce4-extras to get them all, or choose them piece meal out of xfce-extra/.&lt;/p&gt;

&lt;p&gt;We're also in the process of establishing an XFCE project for reals, instead of just being having a herd. With the creation of a project, you need a project lead. Who will it be? Well, the consensus seems  seems to be your truly.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/nichoj/2007/01/22/xfce_all_up_in_your_face&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>After being in beta and release candidates for several months, XFCE 4.4 is finally released. Not only that, but ebuilds for them are willing and ready to go. woot.</p>

<p>All the extra panel plugins and extra utilities have been updated as well. In addition, there have been some new additions for 4.4. Use xfce-base/xfce4-extras to get them all, or choose them piece meal out of xfce-extra/.</p>

<p>We're also in the process of establishing an XFCE project for reals, instead of just being having a herd. With the creation of a project, you need a project lead. Who will it be? Well, the consensus seems  seems to be your truly.</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/nichoj/2007/01/22/xfce_all_up_in_your_face">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/nichoj/2007/01/22/xfce_all_up_in_your_face#comments</comments>
		</item>
				<item>
			<title>Dealing with libraries that like breaking their APIs</title>
			<link>http://blogs.gentoo.org/nichoj/2007/01/14/dealing_with_libraries_that_like_breakin</link>
			<pubDate>Sun, 14 Jan 2007 06:48:33 +0000</pubDate>			<dc:creator>Joshua Nichols</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">1188@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;I'm currently working on making use of a &lt;a href=&quot;http://groovy.codehaus.org/&quot;&gt;Groovy&lt;/a&gt; on a project of mine which uses &lt;a href=&quot;http://www.hibernate.org&quot;&gt;Hibernate&lt;/a&gt; and &lt;a href=&quot;http://www.springframework.org&quot;&gt;Spring&lt;/a&gt; among other things.&lt;/p&gt;

&lt;p&gt;My code wasn't particularly well tested in terms of unit tests. By this, of course, I mean there were no unit tests.&lt;/p&gt;

&lt;p&gt;So like a good code monkey, I decided to get some unit tests going, verify they work, then move code over to use Groovy. The benefit here being that by having these tests, I can verify that things still work as expected after the migration.&lt;/p&gt;

&lt;p&gt;I figured on trying out &lt;a href=&quot;http://rmock.sourceforge.net&quot;&gt;rMock&lt;/a&gt;, one of the many mocking libraries out there for Java. I get my first test case written, cross my fingers, and hit the run button (this is in Eclipse)... and what do I get, but the infamous red bar. NoClassDefFound... WTFBBQ?!? For whatever reason, it wasn't finding certain classes from dev-java/asm.&lt;/p&gt;

&lt;p&gt;I won't go into further detail about how I found this problem, and found the cause, but here are my findings (versions here refer to slots):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dev-java/groovy uses dev-java/asm-2.2&lt;/li&gt;
&lt;li&gt;dev-java/hibernate uses dev-java/cglib-2.1&lt;/li&gt;
&lt;li&gt;dev-java/rmock uses dev-java/cglib-2.1&lt;/li&gt;
&lt;li&gt;dev-java/cglib-2.1 uses dev-java/asm-1.5&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The issue here is that asm apparently changed it's API quite a bit between 1.x and 2.x. This problem seems to have cropped up a few times at least according to google (search for 'NoClassDefFoundError: org/objectweb/asm/CodeVisitor').&lt;/p&gt;

&lt;p&gt;The asm tutorial even goes so far as to the changes... kind of. See &lt;a href=&quot;http://asm.objectweb.org/doc/tutorial-asm-2.0.html&quot;&gt;here&lt;/a&gt; under the &quot;Changes in the ASM 2.0 API Since ASM 1.x&quot; section. A few things bother me about this.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I don't see why the major changes, like renamed classes, and changed method signatures, couldn't have been deprecated at first, and do some twiddling to proxy calls to deprecated things to the newer ones.&lt;/li&gt;
&lt;li&gt;The line that goes like &quot;In general, it would be a good idea to run tool like JDiff and review the differences between the ASM 1.x and 2.0 APIs.&quot; Maybe it's just me, but this seems a bit presumptious. I mean, while such a tool is probably useful, it is far from thorough. It might point out where the API changed, but would have no clue as to the significance of those changes, or how you would account for them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A question that might come out is why would rmock expose this problem, when hibernate is using the same version of asm? Presumably it is because hibernate isn't exercising the parts of the cglib API that use the offending parts of asm, so I must have lucked out before now.&lt;/p&gt;

&lt;p&gt;Regretfully, this seems somewhat common in the Java world. Maybe not very common, or even common, but common enough that they stick out in my mind, causing a handful of angst and frustration.&lt;/p&gt;

&lt;p&gt;There is some good news though. cglib-2.2_beta1 seems to have been updated to use the asm-2.x's API. Another bit of fortune is that it's unlikely that anything in the tree will run into this particular snaggle, just code monkeys like me using these various libraries.&lt;/p&gt;

&lt;p&gt;For the record, I don't get the ClassDefNotFound anymore, but instead I get a lovely NullPointerException from down in Groovy. Oh well, one step forward, one step back.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/nichoj/2007/01/14/dealing_with_libraries_that_like_breakin&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I'm currently working on making use of a <a href="http://groovy.codehaus.org/">Groovy</a> on a project of mine which uses <a href="http://www.hibernate.org">Hibernate</a> and <a href="http://www.springframework.org">Spring</a> among other things.</p>

<p>My code wasn't particularly well tested in terms of unit tests. By this, of course, I mean there were no unit tests.</p>

<p>So like a good code monkey, I decided to get some unit tests going, verify they work, then move code over to use Groovy. The benefit here being that by having these tests, I can verify that things still work as expected after the migration.</p>

<p>I figured on trying out <a href="http://rmock.sourceforge.net">rMock</a>, one of the many mocking libraries out there for Java. I get my first test case written, cross my fingers, and hit the run button (this is in Eclipse)... and what do I get, but the infamous red bar. NoClassDefFound... WTFBBQ?!? For whatever reason, it wasn't finding certain classes from dev-java/asm.</p>

<p>I won't go into further detail about how I found this problem, and found the cause, but here are my findings (versions here refer to slots):</p>

<ul>
<li>dev-java/groovy uses dev-java/asm-2.2</li>
<li>dev-java/hibernate uses dev-java/cglib-2.1</li>
<li>dev-java/rmock uses dev-java/cglib-2.1</li>
<li>dev-java/cglib-2.1 uses dev-java/asm-1.5</li>
</ul>

<p>The issue here is that asm apparently changed it's API quite a bit between 1.x and 2.x. This problem seems to have cropped up a few times at least according to google (search for 'NoClassDefFoundError: org/objectweb/asm/CodeVisitor').</p>

<p>The asm tutorial even goes so far as to the changes... kind of. See <a href="http://asm.objectweb.org/doc/tutorial-asm-2.0.html">here</a> under the "Changes in the ASM 2.0 API Since ASM 1.x" section. A few things bother me about this.</p>
<ul>
<li>I don't see why the major changes, like renamed classes, and changed method signatures, couldn't have been deprecated at first, and do some twiddling to proxy calls to deprecated things to the newer ones.</li>
<li>The line that goes like "In general, it would be a good idea to run tool like JDiff and review the differences between the ASM 1.x and 2.0 APIs." Maybe it's just me, but this seems a bit presumptious. I mean, while such a tool is probably useful, it is far from thorough. It might point out where the API changed, but would have no clue as to the significance of those changes, or how you would account for them.</li>
</ul>

<p>A question that might come out is why would rmock expose this problem, when hibernate is using the same version of asm? Presumably it is because hibernate isn't exercising the parts of the cglib API that use the offending parts of asm, so I must have lucked out before now.</p>

<p>Regretfully, this seems somewhat common in the Java world. Maybe not very common, or even common, but common enough that they stick out in my mind, causing a handful of angst and frustration.</p>

<p>There is some good news though. cglib-2.2_beta1 seems to have been updated to use the asm-2.x's API. Another bit of fortune is that it's unlikely that anything in the tree will run into this particular snaggle, just code monkeys like me using these various libraries.</p>

<p>For the record, I don't get the ClassDefNotFound anymore, but instead I get a lovely NullPointerException from down in Groovy. Oh well, one step forward, one step back.</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/nichoj/2007/01/14/dealing_with_libraries_that_like_breakin">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/nichoj/2007/01/14/dealing_with_libraries_that_like_breakin#comments</comments>
		</item>
				<item>
			<title>Java gets Groovier</title>
			<link>http://blogs.gentoo.org/nichoj/2007/01/11/java_gets_groovier</link>
			<pubDate>Thu, 11 Jan 2007 04:03:44 +0000</pubDate>			<dc:creator>Joshua Nichols</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">1177@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;This news is a bit belated by a few days but.... over the weekend, I spent some time getting the recently released &lt;a href=&quot;http://groovy.codehaus.org&quot;&gt;Groovy 1.0&lt;/a&gt; into the tree.&lt;/p&gt;

&lt;p&gt;In case you hadn't heard about it, Groovy is, among other things, a dynamic language that runs on the the Java VM. Some interesting data points about it:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It's dynamic, for reals.&lt;/li&gt;
  &lt;li&gt;It's about 98% syntax compatible with Java code (I made that number up, but really, it's pretty durn close).&lt;/li&gt;
  &lt;li&gt;Java bytecode gets generated at runtime, no need to compile.&lt;/li&gt;
  &lt;li&gt;Groovy can generate Java bytecode to your typical .class files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A consequence of these points is that you can easily migrate from Java to Groovy, and have your project running exactly as it was. Then slowly, you can get into the swing of things, and take advantage of everything that Groovy has to offer as you get the hang of it.&lt;/p&gt;

&lt;p&gt;One fear I've noticed of Java developers of jumping into a more dynamic language like python or ruby is late binding. You can't really be sure the type of your objects until runtime. Sure, you can read the documentation (assuming it's up to date) or peek at the code to be sure. With Java, binding occurs at compile time, so you can be sure that foo method expects a Bar, or that Bar has the aieeeee() method. I suspect some of this comes from defensive coding, where you become concerned about how your code will be (ab)used by others. &lt;/p&gt;

&lt;p&gt;To combat this, a coworker and I have this idea... You use Java to define interfaces for the, uh, interfaces you care about. You can then use Groovy to implement these interfaces. By doing this, you get the best of both worlds: clients of your code get their strongly typed interface, and you get to do implementations with a more expressive syntax.&lt;/p&gt;

&lt;p&gt;Overall, I've been pretty impressed with Groovy so far. Granted, I haven't used it as deeply as possible yet, but it certainly has a lot of potential.&lt;/p&gt;

&lt;p&gt;In case any of this sounds interesting, here's some resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;a href=&quot;http://groovy.codehaus.org&quot;&gt;Groovy homepage&lt;/a&gt;, get your documentation on&lt;/li&gt;
&lt;li&gt;The recently released &lt;a href=&quot;http://www.amazon.com/gp/product/1932394842&quot;&gt;Groovy in Action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://thediscoblog.com/&quot;&gt;The Disco Blog&lt;/a&gt;, by Andrew Glover, one of the authors of above mentioned book.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And in other Java dynamicism news, I've added the freshly minted &lt;a href=&quot;http://jruby.codehaus.org&quot;&gt;JRuby 0.9.2&lt;/a&gt; to the tree this past weekend as well. I haven't played with it yet, so I can't speak much on its behalf other than it's an implementation of Ruby written on the Java VM. Perhaps that can be the topic for a future blog post.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/nichoj/2007/01/11/java_gets_groovier&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>This news is a bit belated by a few days but.... over the weekend, I spent some time getting the recently released <a href="http://groovy.codehaus.org">Groovy 1.0</a> into the tree.</p>

<p>In case you hadn't heard about it, Groovy is, among other things, a dynamic language that runs on the the Java VM. Some interesting data points about it:</p>

<ul>
  <li>It's dynamic, for reals.</li>
  <li>It's about 98% syntax compatible with Java code (I made that number up, but really, it's pretty durn close).</li>
  <li>Java bytecode gets generated at runtime, no need to compile.</li>
  <li>Groovy can generate Java bytecode to your typical .class files</li>
</ul>

<p>A consequence of these points is that you can easily migrate from Java to Groovy, and have your project running exactly as it was. Then slowly, you can get into the swing of things, and take advantage of everything that Groovy has to offer as you get the hang of it.</p>

<p>One fear I've noticed of Java developers of jumping into a more dynamic language like python or ruby is late binding. You can't really be sure the type of your objects until runtime. Sure, you can read the documentation (assuming it's up to date) or peek at the code to be sure. With Java, binding occurs at compile time, so you can be sure that foo method expects a Bar, or that Bar has the aieeeee() method. I suspect some of this comes from defensive coding, where you become concerned about how your code will be (ab)used by others. </p>

<p>To combat this, a coworker and I have this idea... You use Java to define interfaces for the, uh, interfaces you care about. You can then use Groovy to implement these interfaces. By doing this, you get the best of both worlds: clients of your code get their strongly typed interface, and you get to do implementations with a more expressive syntax.</p>

<p>Overall, I've been pretty impressed with Groovy so far. Granted, I haven't used it as deeply as possible yet, but it certainly has a lot of potential.</p>

<p>In case any of this sounds interesting, here's some resources:</p>

<ul>
<li>The <a href="http://groovy.codehaus.org">Groovy homepage</a>, get your documentation on</li>
<li>The recently released <a href="http://www.amazon.com/gp/product/1932394842">Groovy in Action</a></li>
<li><a href="http://thediscoblog.com/">The Disco Blog</a>, by Andrew Glover, one of the authors of above mentioned book.</li>
</ul>

<p>And in other Java dynamicism news, I've added the freshly minted <a href="http://jruby.codehaus.org">JRuby 0.9.2</a> to the tree this past weekend as well. I haven't played with it yet, so I can't speak much on its behalf other than it's an implementation of Ruby written on the Java VM. Perhaps that can be the topic for a future blog post.</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/nichoj/2007/01/11/java_gets_groovier">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/nichoj/2007/01/11/java_gets_groovier#comments</comments>
		</item>
				<item>
			<title>Musings of the current state of open source Java</title>
			<link>http://blogs.gentoo.org/nichoj/2006/10/20/musings_of_the_current_state_of_open_sou</link>
			<pubDate>Fri, 20 Oct 2006 05:44:42 +0000</pubDate>			<dc:creator>Joshua Nichols</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">1029@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;[Note: I'm actually referring to open source Java software and libraries, not Java itself]&lt;/p&gt;

&lt;p&gt;I've been maintaining and working with Java packages for pretty close to a year and a half now. And I hate to say it, but it is only becoming more apparent that things are less than ideal.&lt;/p&gt;

&lt;p&gt;Sure, there are a multitude of projects out there, great projects. Eclipse, Tomcat, Netbeans, Azureus, all of the Apache Jakarta project, and many more. For a developer, it's great.&lt;/p&gt;

&lt;p&gt;For a packager... it's not so nice of a picture. Builds packages vary from project to project with some kind of unholy glow. While there are some defactor standards out ther e, ie using ant or maven, it ain't pretty.&lt;/p&gt;

&lt;p&gt;How do you build your javadocs? Is the target named doc, docs, javadocs, javadoc, or api?&lt;br /&gt;
How do you manage your dependencies on third party libraries? Include every jar under the sun, bundle the source in with your own, or download the from the interweb?&lt;/p&gt;

&lt;p&gt;The latter of these is particularly irksome. As I said, the standard practice is generally to include all your dependencies. I recall reading an O'Reilly book on ant at some point, and they actually encourage this behavior. I seem to think they said something along the lines of &quot;You can't trust your user to use the right dependencies, so you should include them so that things will definitely work.&quot;&lt;/p&gt;

&lt;p&gt;I'm fairly sure most of this be traced back to influences of the Windows world. I mean, there really isn't a concept of dependencies on other packages. You just distribute your application in a giant blob, and be done with it.&lt;/p&gt;

&lt;p&gt;While I'm sure it's convenient if your developing the application or distributing a single blob to a user, it certainly is a pain to package.&lt;/p&gt;

&lt;p&gt;So for all the dependencies, we want to package the dependencies, and then package the dependencies' dependencies, and so on. Then we want to make the application use our copy of the dependency that we just packaged. Easy enough, right?&lt;/p&gt;

&lt;p&gt;Not quite. Here are a few of the many problems we come up against all too regularly:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;The API of the dependencies are unstable, as in, they break between minor revisions.&lt;/li&gt;
  &lt;li&gt;The dependency has been patched in fun and exciting ways that are specific to the application.&lt;/li&gt;
  &lt;li&gt;The origin of the dependency is unknown, and no upstream can be found.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Quite dreary, eh?&lt;/p&gt;

&lt;p&gt;Fortunately, it is not always this bad. There are, of course, good applications and libraries which are sane enough to package. Maven, in some senses, has been helping improve things, by standardizing the way things are being built, and by providing a standard mechanism for getting dependencies. A step in the right direction, at the very least.&lt;/p&gt;

&lt;p&gt;Stay tuned next time for some ideas for addressing these concerns...&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/nichoj/2006/10/20/musings_of_the_current_state_of_open_sou&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>[Note: I'm actually referring to open source Java software and libraries, not Java itself]</p>

<p>I've been maintaining and working with Java packages for pretty close to a year and a half now. And I hate to say it, but it is only becoming more apparent that things are less than ideal.</p>

<p>Sure, there are a multitude of projects out there, great projects. Eclipse, Tomcat, Netbeans, Azureus, all of the Apache Jakarta project, and many more. For a developer, it's great.</p>

<p>For a packager... it's not so nice of a picture. Builds packages vary from project to project with some kind of unholy glow. While there are some defactor standards out ther e, ie using ant or maven, it ain't pretty.</p>

<p>How do you build your javadocs? Is the target named doc, docs, javadocs, javadoc, or api?<br />
How do you manage your dependencies on third party libraries? Include every jar under the sun, bundle the source in with your own, or download the from the interweb?</p>

<p>The latter of these is particularly irksome. As I said, the standard practice is generally to include all your dependencies. I recall reading an O'Reilly book on ant at some point, and they actually encourage this behavior. I seem to think they said something along the lines of "You can't trust your user to use the right dependencies, so you should include them so that things will definitely work."</p>

<p>I'm fairly sure most of this be traced back to influences of the Windows world. I mean, there really isn't a concept of dependencies on other packages. You just distribute your application in a giant blob, and be done with it.</p>

<p>While I'm sure it's convenient if your developing the application or distributing a single blob to a user, it certainly is a pain to package.</p>

<p>So for all the dependencies, we want to package the dependencies, and then package the dependencies' dependencies, and so on. Then we want to make the application use our copy of the dependency that we just packaged. Easy enough, right?</p>

<p>Not quite. Here are a few of the many problems we come up against all too regularly:</p>
<ol>
  <li>The API of the dependencies are unstable, as in, they break between minor revisions.</li>
  <li>The dependency has been patched in fun and exciting ways that are specific to the application.</li>
  <li>The origin of the dependency is unknown, and no upstream can be found.</li>
</ol>

<p>Quite dreary, eh?</p>

<p>Fortunately, it is not always this bad. There are, of course, good applications and libraries which are sane enough to package. Maven, in some senses, has been helping improve things, by standardizing the way things are being built, and by providing a standard mechanism for getting dependencies. A step in the right direction, at the very least.</p>

<p>Stay tuned next time for some ideas for addressing these concerns...</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/nichoj/2006/10/20/musings_of_the_current_state_of_open_sou">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/nichoj/2006/10/20/musings_of_the_current_state_of_open_sou#comments</comments>
		</item>
			</channel>
</rss>
