<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Toni changed some stuff and mentioned he got a NoClassDefFoundError
    when doing "mvn --version".<br>
    I 've seen that one before in my system.<br>
    <ul>
      <li>Problem</li>
      <ul>
        <li>Your M2_HOME already points to maven-3.0 and your "mvn.sh"
          (or .bat) is still the one from ".../maven-2.2.1/bin/mvn.sh"</li>
        <ul>
          <li>or vica versa<br>
          </li>
          <li>echo $M2_HOME</li>
          <li>echo $PATH</li>
          <ul>
            <li>/home/&lt;username&gt;/opt/build/apache-maven/<b>bin</b>:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin...</li>
            <li>Notice the bin in the maven path!</li>
          </ul>
        </ul>
      </ul>
      <li>Solution</li>
      <ul>
        <li>OR Uninstall maven 2.2.1</li>
        <li>OR make sure M2_HOME is correct and make sure that the maven
          3 bin directory is first on the path</li>
      </ul>
    </ul>
    <br>
    Op 25-11-10 10:36, Geoffrey De Smet schreef:
    <blockquote cite="mid:iclamo$v3s$1@dough.gmane.org" type="cite">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      Hi guys,<br>
      <br>
      I've just upgraded the build on trunk to maven 3. Changes summary:<br>
      <ul>
        <li><b>Requires maven 3.0.0 or higher to build</b></li>
        <ul>
          <li>If you build it with maven 2.2.1 it will fail and tell you
            to get maven 3<br>
          </li>
        </ul>
        <li><b>Version renamed from 5.2.0.SNAPSHOT to 5.2.0-SNAPSHOT</b></li>
        <ul>
          <li>Never the use the inherently wrong &lt;dot&gt;SNAPSHOT
            notation again<br>
          </li>
        </ul>
        <li>Refactored eclipse plugin's ANT build into a maven tycho
          build</li>
        <ul>
          <li>I 'll write a separate mail with info about those changes
            later<br>
          </li>
        </ul>
      </ul>
      <br>
      In maven 3 you 'll see a bunch of warnings, but that's stuff that
      we 've doing wrong a long time already in maven 2 too but we
      didn't know.<br>
      I 'll start looking into these warnings soon.<br>
      If any of your changes create new warnings (and you notice them),
      please read them and deal with them (or ask me)<br>
      and don't just hide them between the other warnings as a surprise
      present for me :)<br>
      Once I am able to deal with most of the current warnings, it
      should be more difficult for new warnings to hide.<br>
      <br>
      <br>
      Here's a quick recipe on how to upgrade to Maven 3 (you probably
      know all this anyway):<br>
      <ul>
        <li>Linux<br>
        </li>
        <ul>
          <li>If you use maven 2.2.1 with yum or apt-get you 'll
            probably want to uninstall that</li>
          <ul>
            <li>Doesn't look like maven 3 is available yet, so
              installation is done the hard way<br>
            </li>
          </ul>
          <li>Download maven 3 tar.gz:</li>
          <ul>
            <li><a moz-do-not-send="true" class="moz-txt-link-freetext"
                href="http://maven.apache.org/download.html">http://maven.apache.org/download.html</a></li>
          </ul>
          <li>Untar to ~/opt/build/</li>
          <li>cd ~/opt/build/</li>
          <ul>
            <li>ln -s apache-maven-3.0 apache-maven</li>
          </ul>
          <li>If you 've done the ln-s trick before, you don't need to
            do this again:<br>
          </li>
          <ul>
            <li>sudo gedit /etc/environment</li>
            <ul>
              <li>PATH="/home/&lt;username&gt;/opt/build/apache-maven/bin:&lt;original

                path&gt;"<br>
              </li>
              <li>M2_HOME="/home/&lt;username&gt;/opt/build/apache-maven"</li>
              <li>MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"</li>
            </ul>
            <li>You can't use $variables in /etc/environment it seems
              (that's also why there's no use of "export
              PATH=$M2_HOME:$PATH")<br>
            </li>
            <ul>
              <li>If you know of a better place than /etc/environment to
                do this, please tell me :)<br>
              </li>
            </ul>
            <li>Reboot (there's probably a better, faster way to flush
              /etc/environment, but I don't know it)<br>
            </li>
          </ul>
        </ul>
        <li>Windows</li>
        <ul>
          <li>Download maven 3 zip:</li>
          <ul>
            <li><a moz-do-not-send="true" class="moz-txt-link-freetext"
                href="http://maven.apache.org/download.html">http://maven.apache.org/download.html</a></li>
          </ul>
          <li>Unzip it to C:\Program Files<br>
          </li>
          <li>Open menu Configuration screen, menu item System</li>
          <ul>
            <li>tab Advanced, button Environment variables</li>
            <ul>
              <li>M2_HOME="C:\Program files\apache-maven-3.0"</li>
              <li>MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"</li>
              <li>PATH="%M2_HOME%\bin:%PATH%"</li>
            </ul>
          </ul>
          <li>Reboot<br>
          </li>
        </ul>
      </ul>
      <pre class="moz-signature" cols="72">-- 
With kind regards,
Geoffrey De Smet</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
With kind regards,
Geoffrey De Smet</pre>
  </body>
</html>