<?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>Shizzle &#187; apache</title>
	<atom:link href="http://lenni.info/blog/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://lenni.info/blog</link>
	<description>My little notebook</description>
	<lastBuildDate>Wed, 09 May 2012 16:46:38 +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>How to find out if you are running Apache mpm-prefork or mpm-worker</title>
		<link>http://lenni.info/blog/2011/12/how-to-find-out-if-you-are-running-apache-mpm-prefork-or-mpm-worker/</link>
		<comments>http://lenni.info/blog/2011/12/how-to-find-out-if-you-are-running-apache-mpm-prefork-or-mpm-worker/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 09:17:24 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=574</guid>
		<description><![CDATA[I struggled with this today whilst trying to figure out Apache&#8217;s config options. On Ubuntu you can do the following: $ dpkg --get-selections &#124;grep apache apache2 install apache2-mpm-prefork install apache2-prefork-dev install apache2-utils install apache2.2-bin install apache2.2-common install libapache2-mod-php5 install libapache2-mod-wsgi install This tells me that I have mpm-prefork.]]></description>
			<content:encoded><![CDATA[<p>I struggled with this today whilst trying to figure out Apache&#8217;s config options.</p>
<p>On Ubuntu you can do the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">--get-selections</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> apache
apache2						<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2-mpm-prefork				<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2-prefork-dev				<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2-utils					<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2.2-bin					<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2.2-common				<span style="color: #c20cb9; font-weight: bold;">install</span>
libapache2-mod-php5				<span style="color: #c20cb9; font-weight: bold;">install</span>
libapache2-mod-wsgi				<span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>This tells me that I have mpm-prefork.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2011/12/how-to-find-out-if-you-are-running-apache-mpm-prefork-or-mpm-worker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mavens&#8217;s &#8220;The artifact has no valid ranges&#8221;</title>
		<link>http://lenni.info/blog/2009/10/mavenss-the-artifact-has-no-valid-ranges/</link>
		<comments>http://lenni.info/blog/2009/10/mavenss-the-artifact-has-no-valid-ranges/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 07:10:05 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=189</guid>
		<description><![CDATA[I have just learned to use the really great Java build and project management tool Maven. It makes managing large projects with dozens of components a lot easier and its build configuration is simpler and less imperative compared to Ant, since it relies a lot on convention over configuration. Basically, Maven knows that pretty much [...]]]></description>
			<content:encoded><![CDATA[<p>I have just learned to use the really great Java build and project management tool <a href="http://maven.apache.org/">Maven</a>. It makes managing large projects with dozens of components a lot easier and its build configuration is simpler and less imperative compared to Ant, since it relies a lot on convention over configuration. Basically, Maven knows that pretty much every project needs to be</p>
<ul>
<li>compiled</li>
<li>JavaDoc&#8217;d</li>
<li>unit tested</li>
</ul>
<p>These things don&#8217;t need to be declared and are automatically done by Maven. Maven&#8217;s great advantage over Ant is it&#8217;s ability to handle the dependencies of your project, ie. the old &#8220;Hunt the JAR&#8221; game is a thing of the past as Maven will simply download whatever libraries or frameworks you will need. Most of the time your build will run smoothly and Maven will spit out a nice JAR or WAR without problems.</p>
<h3>The curious error message</h3>
<p>However, if there are build errors they tend to be on the cryptic side. &#8220;The artifact has no valid ranges&#8221; is one of those. Basically it means that you <em>do have</em> a valid range, however you have defined two (or more) <em>different version ranges of an artifact</em> in a fixed way. Most likely you haven&#8217;t defined those dependencies in the same project but through a transitive dependency.</p>
<p>Let&#8217;s have an example. Your project <em>my-app</em>, depends on an artifact <em>super-framework</em> at version 1.0, and only 1.0, nothing else. <em>my-app</em> also depends on another of your apps called<em> my-app2</em>. <em>my-app2</em> has a dependency on <em>super-framework</em> but only for versions 0.5 to 0.9. This means that you have incompatible version ranges and you need to resolve this. You will have to edit <em>my-app</em> or <em>my-app2</em> and change their version ranges for <em>super-framework</em>.</p>
<p>This took me a little while to figure out myself since the error kinda suggests to look in the wrong place. The range is perfectly valid, it&#8217;s just that there is too many of them.</p>
<h3>Debugging this message</h3>
<p>That is a little tricky. You can try running Maven with the -X flag, which will show a running log of how the version is chosen. Also, sometimes the Maven plugin for Eclipse can give you some clues, but sometimes it is way off.</p>
<p>One word of advice though, it seems to matter in which order you include your dependencies in the the POM file. So, if you include a dependency on</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">super-framework [0.5,1.5)</pre></div></div>

<p>it will fetch the latest available version, say 1.1.</p>
<p>If you then have a transitive dependency further down that includes</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;">super-framework [0.5, 1.0)</pre></div></div>

<p>Maven will generate this misleading error, since it will not select anything other than the 1.1 it already has, even though it could just select 0.9 without producing a version conflict. If you swap the order, weirdly, it works.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2009/10/mavenss-the-artifact-has-no-valid-ranges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

