Build upgraded to maven 3 on trunk

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Build upgraded to maven 3 on trunk

ge0ffrey
Administrator
Hi guys,

I've just upgraded the build on trunk to maven 3. Changes summary:
  • Requires maven 3.0.0 or higher to build
    • If you build it with maven 2.2.1 it will fail and tell you to get maven 3
  • Version renamed from 5.2.0.SNAPSHOT to 5.2.0-SNAPSHOT
    • Never the use the inherently wrong <dot>SNAPSHOT notation again
  • Refactored eclipse plugin's ANT build into a maven tycho build
    • I 'll write a separate mail with info about those changes later

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.
I 'll start looking into these warnings soon.
If any of your changes create new warnings (and you notice them), please read them and deal with them (or ask me)
and don't just hide them between the other warnings as a surprise present for me :)
Once I am able to deal with most of the current warnings, it should be more difficult for new warnings to hide.


Here's a quick recipe on how to upgrade to Maven 3 (you probably know all this anyway):
  • Linux
    • If you use maven 2.2.1 with yum or apt-get you 'll probably want to uninstall that
      • Doesn't look like maven 3 is available yet, so installation is done the hard way
    • Download maven 3 tar.gz:
    • Untar to ~/opt/build/
    • cd ~/opt/build/
      • ln -s apache-maven-3.0 apache-maven
    • If you 've done the ln-s trick before, you don't need to do this again:
      • sudo gedit /etc/environment
        • PATH="/home/<username>/opt/build/apache-maven/bin:<original path>"
        • M2_HOME="/home/<username>/opt/build/apache-maven"
        • MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
      • You can't use $variables in /etc/environment it seems (that's also why there's no use of "export PATH=$M2_HOME:$PATH")
        • If you know of a better place than /etc/environment to do this, please tell me :)
      • Reboot (there's probably a better, faster way to flush /etc/environment, but I don't know it)
  • Windows
    • Download maven 3 zip:
    • Unzip it to C:\Program Files
    • Open menu Configuration screen, menu item System
      • tab Advanced, button Environment variables
        • M2_HOME="C:\Program files\apache-maven-3.0"
        • MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
        • PATH="%M2_HOME%\bin:%PATH%"
    • Reboot
-- 
With kind regards,
Geoffrey De Smet

_______________________________________________
rules-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-dev
Reply | Threaded
Open this post in threaded view
|

Re: Build upgraded to maven 3 on trunk => mvn NoClassDefFoundError problem

ge0ffrey
Administrator
Toni changed some stuff and mentioned he got a NoClassDefFoundError when doing "mvn --version".
I 've seen that one before in my system.
  • Problem
    • 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"
      • or vica versa
      • echo $M2_HOME
      • echo $PATH
        • /home/<username>/opt/build/apache-maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin...
        • Notice the bin in the maven path!
  • Solution
    • OR Uninstall maven 2.2.1
    • OR make sure M2_HOME is correct and make sure that the maven 3 bin directory is first on the path

Op 25-11-10 10:36, Geoffrey De Smet schreef:
Hi guys,

I've just upgraded the build on trunk to maven 3. Changes summary:
  • Requires maven 3.0.0 or higher to build
    • If you build it with maven 2.2.1 it will fail and tell you to get maven 3
  • Version renamed from 5.2.0.SNAPSHOT to 5.2.0-SNAPSHOT
    • Never the use the inherently wrong <dot>SNAPSHOT notation again
  • Refactored eclipse plugin's ANT build into a maven tycho build
    • I 'll write a separate mail with info about those changes later

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.
I 'll start looking into these warnings soon.
If any of your changes create new warnings (and you notice them), please read them and deal with them (or ask me)
and don't just hide them between the other warnings as a surprise present for me :)
Once I am able to deal with most of the current warnings, it should be more difficult for new warnings to hide.


Here's a quick recipe on how to upgrade to Maven 3 (you probably know all this anyway):
  • Linux
    • If you use maven 2.2.1 with yum or apt-get you 'll probably want to uninstall that
      • Doesn't look like maven 3 is available yet, so installation is done the hard way
    • Download maven 3 tar.gz:
    • Untar to ~/opt/build/
    • cd ~/opt/build/
      • ln -s apache-maven-3.0 apache-maven
    • If you 've done the ln-s trick before, you don't need to do this again:
      • sudo gedit /etc/environment
        • PATH="/home/<username>/opt/build/apache-maven/bin:<original path>"
        • M2_HOME="/home/<username>/opt/build/apache-maven"
        • MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
      • You can't use $variables in /etc/environment it seems (that's also why there's no use of "export PATH=$M2_HOME:$PATH")
        • If you know of a better place than /etc/environment to do this, please tell me :)
      • Reboot (there's probably a better, faster way to flush /etc/environment, but I don't know it)
  • Windows
    • Download maven 3 zip:
    • Unzip it to C:\Program Files
    • Open menu Configuration screen, menu item System
      • tab Advanced, button Environment variables
        • M2_HOME="C:\Program files\apache-maven-3.0"
        • MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
        • PATH="%M2_HOME%\bin:%PATH%"
    • Reboot
-- 
With kind regards,
Geoffrey De Smet
_______________________________________________ rules-dev mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/rules-dev

-- 
With kind regards,
Geoffrey De Smet

_______________________________________________
rules-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-dev
Reply | Threaded
Open this post in threaded view
|

Re: Build upgraded to maven 3 on trunk

Edson Tirelli-3
In reply to this post by ge0ffrey
   Geoffrey,

   Thanks or moving this forward. Just one comment:

> Version renamed from 5.2.0.SNAPSHOT to 5.2.0-SNAPSHOT
> Never the use the inherently wrong <dot>SNAPSHOT notation again

   I am no expert on this, but the reason we moved from - to .
notation was that - was an invalid character on OSGi/Eclipse bundles,
if I remember Mark's explanation correctly. Is this no longer the
case?

   Edson

2010/11/25 Geoffrey De Smet <[hidden email]>:

> Hi guys,
>
> I've just upgraded the build on trunk to maven 3. Changes summary:
>
> Requires maven 3.0.0 or higher to build
>
> If you build it with maven 2.2.1 it will fail and tell you to get maven 3
>
> Version renamed from 5.2.0.SNAPSHOT to 5.2.0-SNAPSHOT
>
> Never the use the inherently wrong <dot>SNAPSHOT notation again
>
> Refactored eclipse plugin's ANT build into a maven tycho build
>
> I 'll write a separate mail with info about those changes later
>
> 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.
> I 'll start looking into these warnings soon.
> If any of your changes create new warnings (and you notice them), please
> read them and deal with them (or ask me)
> and don't just hide them between the other warnings as a surprise present
> for me :)
> Once I am able to deal with most of the current warnings, it should be more
> difficult for new warnings to hide.
>
>
> Here's a quick recipe on how to upgrade to Maven 3 (you probably know all
> this anyway):
>
> Linux
>
> If you use maven 2.2.1 with yum or apt-get you 'll probably want to
> uninstall that
>
> Doesn't look like maven 3 is available yet, so installation is done the hard
> way
>
> Download maven 3 tar.gz:
>
> http://maven.apache.org/download.html
>
> Untar to ~/opt/build/
> cd ~/opt/build/
>
> ln -s apache-maven-3.0 apache-maven
>
> If you 've done the ln-s trick before, you don't need to do this again:
>
> sudo gedit /etc/environment
>
> PATH="/home/<username>/opt/build/apache-maven/bin:<original path>"
> M2_HOME="/home/<username>/opt/build/apache-maven"
> MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
>
> You can't use $variables in /etc/environment it seems (that's also why
> there's no use of "export PATH=$M2_HOME:$PATH")
>
> If you know of a better place than /etc/environment to do this, please tell
> me :)
>
> Reboot (there's probably a better, faster way to flush /etc/environment, but
> I don't know it)
>
> Windows
>
> Download maven 3 zip:
>
> http://maven.apache.org/download.html
>
> Unzip it to C:\Program Files
> Open menu Configuration screen, menu item System
>
> tab Advanced, button Environment variables
>
> M2_HOME="C:\Program files\apache-maven-3.0"
> MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
> PATH="%M2_HOME%\bin:%PATH%"
>
> Reboot
>
> --
> With kind regards,
> Geoffrey De Smet
>
> _______________________________________________
> rules-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>



--
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com

_______________________________________________
rules-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-dev
Reply | Threaded
Open this post in threaded view
|

Re: Build upgraded to maven 3 on trunk

ge0ffrey
Administrator
Yes, the old ant build for the eclipse plugins in OSGi couldn't cope
with the - character.
The tycho plugin fixes that :)
Actually, maven 3 couldn't cope with the . character decently (because
maven never completely treated the snapshots as snapshots).
So that give a chicken and egg problem, that's why I did both changes at
the same time (maven 3 + tychonization)

Op 25-11-10 16:38, Edson Tirelli schreef:

>     Geoffrey,
>
>     Thanks or moving this forward. Just one comment:
>
>> Version renamed from 5.2.0.SNAPSHOT to 5.2.0-SNAPSHOT
>> Never the use the inherently wrong<dot>SNAPSHOT notation again
>     I am no expert on this, but the reason we moved from - to .
> notation was that - was an invalid character on OSGi/Eclipse bundles,
> if I remember Mark's explanation correctly. Is this no longer the
> case?
>
>     Edson
>
> 2010/11/25 Geoffrey De Smet<[hidden email]>:
>> Hi guys,
>>
>> I've just upgraded the build on trunk to maven 3. Changes summary:
>>
>> Requires maven 3.0.0 or higher to build
>>
>> If you build it with maven 2.2.1 it will fail and tell you to get maven 3
>>
>> Version renamed from 5.2.0.SNAPSHOT to 5.2.0-SNAPSHOT
>>
>> Never the use the inherently wrong<dot>SNAPSHOT notation again
>>
>> Refactored eclipse plugin's ANT build into a maven tycho build
>>
>> I 'll write a separate mail with info about those changes later
>>
>> 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.
>> I 'll start looking into these warnings soon.
>> If any of your changes create new warnings (and you notice them), please
>> read them and deal with them (or ask me)
>> and don't just hide them between the other warnings as a surprise present
>> for me :)
>> Once I am able to deal with most of the current warnings, it should be more
>> difficult for new warnings to hide.
>>
>>
>> Here's a quick recipe on how to upgrade to Maven 3 (you probably know all
>> this anyway):
>>
>> Linux
>>
>> If you use maven 2.2.1 with yum or apt-get you 'll probably want to
>> uninstall that
>>
>> Doesn't look like maven 3 is available yet, so installation is done the hard
>> way
>>
>> Download maven 3 tar.gz:
>>
>> http://maven.apache.org/download.html
>>
>> Untar to ~/opt/build/
>> cd ~/opt/build/
>>
>> ln -s apache-maven-3.0 apache-maven
>>
>> If you 've done the ln-s trick before, you don't need to do this again:
>>
>> sudo gedit /etc/environment
>>
>> PATH="/home/<username>/opt/build/apache-maven/bin:<original path>"
>> M2_HOME="/home/<username>/opt/build/apache-maven"
>> MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
>>
>> You can't use $variables in /etc/environment it seems (that's also why
>> there's no use of "export PATH=$M2_HOME:$PATH")
>>
>> If you know of a better place than /etc/environment to do this, please tell
>> me :)
>>
>> Reboot (there's probably a better, faster way to flush /etc/environment, but
>> I don't know it)
>>
>> Windows
>>
>> Download maven 3 zip:
>>
>> http://maven.apache.org/download.html
>>
>> Unzip it to C:\Program Files
>> Open menu Configuration screen, menu item System
>>
>> tab Advanced, button Environment variables
>>
>> M2_HOME="C:\Program files\apache-maven-3.0"
>> MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
>> PATH="%M2_HOME%\bin:%PATH%"
>>
>> Reboot
>>
>> --
>> With kind regards,
>> Geoffrey De Smet
>>
>> _______________________________________________
>> rules-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>>
>
>

--
With kind regards,
Geoffrey De Smet


_______________________________________________
rules-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-dev
Reply | Threaded
Open this post in threaded view
|

Re: Build upgraded to maven 3 on trunk => Prefer maven 3.0.1

ge0ffrey
Administrator
Maven 3.0.1 is just out, so prefer that over maven 3.0.0.
I 'll get hudson to upgrade to maven 3.0.1
and - for sake of consistency - also enforce that minimal version on
trunk in a few days.
Sorry if you 've just installed 3.0.0, but with the ln -s trick it's
just a matter of:

Download maven 3.0.1 tar.gz:
   http://maven.apache.org/download.html
Untar to ~/opt/build/

cd ~/opt/build/
rm apache-maven
ln -s apache-maven-3.0.1 apache-maven



Op 25-11-10 16:54, Geoffrey De Smet schreef:

> Yes, the old ant build for the eclipse plugins in OSGi couldn't cope
> with the - character.
> The tycho plugin fixes that :)
> Actually, maven 3 couldn't cope with the . character decently (because
> maven never completely treated the snapshots as snapshots).
> So that give a chicken and egg problem, that's why I did both changes at
> the same time (maven 3 + tychonization)
>
> Op 25-11-10 16:38, Edson Tirelli schreef:
>>      Geoffrey,
>>
>>      Thanks or moving this forward. Just one comment:
>>
>>> Version renamed from 5.2.0.SNAPSHOT to 5.2.0-SNAPSHOT
>>> Never the use the inherently wrong<dot>SNAPSHOT notation again
>>      I am no expert on this, but the reason we moved from - to .
>> notation was that - was an invalid character on OSGi/Eclipse bundles,
>> if I remember Mark's explanation correctly. Is this no longer the
>> case?
>>
>>      Edson
>>
>> 2010/11/25 Geoffrey De Smet<[hidden email]>:
>>> Hi guys,
>>>
>>> I've just upgraded the build on trunk to maven 3. Changes summary:
>>>
>>> Requires maven 3.0.0 or higher to build
>>>
>>> If you build it with maven 2.2.1 it will fail and tell you to get maven 3
>>>
>>> Version renamed from 5.2.0.SNAPSHOT to 5.2.0-SNAPSHOT
>>>
>>> Never the use the inherently wrong<dot>SNAPSHOT notation again
>>>
>>> Refactored eclipse plugin's ANT build into a maven tycho build
>>>
>>> I 'll write a separate mail with info about those changes later
>>>
>>> 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.
>>> I 'll start looking into these warnings soon.
>>> If any of your changes create new warnings (and you notice them), please
>>> read them and deal with them (or ask me)
>>> and don't just hide them between the other warnings as a surprise present
>>> for me :)
>>> Once I am able to deal with most of the current warnings, it should be more
>>> difficult for new warnings to hide.
>>>
>>>
>>> Here's a quick recipe on how to upgrade to Maven 3 (you probably know all
>>> this anyway):
>>>
>>> Linux
>>>
>>> If you use maven 2.2.1 with yum or apt-get you 'll probably want to
>>> uninstall that
>>>
>>> Doesn't look like maven 3 is available yet, so installation is done the hard
>>> way
>>>
>>> Download maven 3 tar.gz:
>>>
>>> http://maven.apache.org/download.html
>>>
>>> Untar to ~/opt/build/
>>> cd ~/opt/build/
>>>
>>> ln -s apache-maven-3.0 apache-maven
>>>
>>> If you 've done the ln-s trick before, you don't need to do this again:
>>>
>>> sudo gedit /etc/environment
>>>
>>> PATH="/home/<username>/opt/build/apache-maven/bin:<original path>"
>>> M2_HOME="/home/<username>/opt/build/apache-maven"
>>> MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
>>>
>>> You can't use $variables in /etc/environment it seems (that's also why
>>> there's no use of "export PATH=$M2_HOME:$PATH")
>>>
>>> If you know of a better place than /etc/environment to do this, please tell
>>> me :)
>>>
>>> Reboot (there's probably a better, faster way to flush /etc/environment, but
>>> I don't know it)
>>>
>>> Windows
>>>
>>> Download maven 3 zip:
>>>
>>> http://maven.apache.org/download.html
>>>
>>> Unzip it to C:\Program Files
>>> Open menu Configuration screen, menu item System
>>>
>>> tab Advanced, button Environment variables
>>>
>>> M2_HOME="C:\Program files\apache-maven-3.0"
>>> MAVEN_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
>>> PATH="%M2_HOME%\bin:%PATH%"
>>>
>>> Reboot
>>>
>>> --
>>> With kind regards,
>>> Geoffrey De Smet
>>>
>>> _______________________________________________
>>> rules-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>>
>>>
>>

--
With kind regards,
Geoffrey De Smet


_______________________________________________
rules-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-dev