blob: 501546a13686bae605065fb4b6f2f45d528899c1 [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>9.4&nbsp;Migration</title><link rel="stylesheet" href="css/stylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Virgo Tools Guide"><link rel="up" href="ch09.html" title="9.&nbsp;Installation and Release Notes"><link rel="prev" href="ch09s03.html" title="9.3&nbsp;Known Issues"><link rel="next" href="ch09s05.html" title="9.5&nbsp;Maven plugin"><!--Begin Google Analytics code--><script type="text/javascript">
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"));
</script><script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2728886-3");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">9.4&nbsp;Migration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch09s03.html">Prev</a>&nbsp;</td><th width="60%" align="center">9.&nbsp;Installation and Release Notes</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch09s05.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Migration"></a>9.4&nbsp;Migration</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="From_Pre_M2_to_M4"></a>From Pre M2 to M4</h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="Server_Versions"></a>Server Versions</h4></div></div></div><p>The good news: We have done away with the need for managing multiple server versions. This also means that we won't have to support multiple WebTools Server Runtimes and Servers which will make adding new servers and variants much easier. See
<a class="ulink" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=373453" target="_top">https://bugs.eclipse.org/bugs/show_bug.cgi?id=373453</a> for more details.
</p><p>The bad news: Any Server Runtimes that you already created for Virgo Server 3.5 will not work -- and you will see nasty exceptions if you try to use them. But since pre-M4 Virgo Tooling didn't work with Virgo Server 3.5
<span class="italic">anyway</span>, this should be a moot issue for most people.
</p><p>What to do: If you have an existing (i.e., created using Virgo IDE installed before 10 March 2012) Virgo Server 3.5 Runtime defined, just delete it and replace it with a new Virgo Runtime in
<span class="italic">Preferences:Server:Runtime Environments</span>. You'll see that the correct version is discovered automatically. Then, open any Servers that uses the old runtime and select the new one from the Runtime Environment popup menu.
</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="From_Spring_Source_and_Virgo_2.x_Tooling"></a>From Spring Source and Virgo 2.x Tooling</h3></div></div></div><p>Moving from the old tooling to the new requires some changes to your existing projects, these are documented here. </p><p>The Bundlor .settings file has a new name (
<span class="italic">com.springsource.server.ide.bundlor.core.prefs</span> -&amp;gt;
<span class="italic">org.eclipse.virgo.ide.bundlor.core.prefs</span>) and the property keys in it have new names as well. Currently these just need to be changed manually (replace
<span class="italic">com.springsource.server</span> by
<span class="italic">org.eclipse.virgo</span>)
<span class="bold"><strong>or use the project properties pane to create new settings and delete the old one.</strong></span> (recommended)
</p><p>The Bundle Dependencies classpath entry has a new name (
<span class="italic">com.springsource.server.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER</span> -&amp;gt;
<span class="italic">org.eclipse.virgo.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER</span>). This can be changed manually (in the .classpath file) or in the Java Build Path section of the project properties.
</p><p>The attributes used to mark folders as test folders have been renamed (
<span class="italic">com.springsource.server.ide.jdt.core.test.classpathentry</span> -&amp;gt;
<span class="italic">org.eclipse.virgo.ide.jdt.core.test.classpathentry</span>). This can be changed manually (in the .classpath file).
</p><p>The PAR and Bundle nature have been renamed (
<span class="italic">com.springsource.server.ide.facet.core.bundlenature</span> -&amp;gt;
<span class="italic">org.eclipse.virgo.ide.facet.core.bundlenature</span> and (
<span class="italic">com.springsource.server.ide.facet.core.parnature</span> -&amp;gt;
<span class="italic">org.eclipse.virgo.ide.facet.core.parnature</span>)). This can be changed manually (in the .project file).
</p><p>The format and name of a PAR project changed. Rename
<span class="italic">.settings/com.springsource.server.ide.runtime.core.par.xml</span> to
<span class="italic">.settings/org.eclipse.virgo.ide.runtime.core.par.xml</span>. Inside the file rename occurences of
<span class="italic">com.springsource.server</span> to
<span class="italic">org.eclipse.virgo</span>.
</p><p>
<span class="bold"><strong>Snapshot build change:</strong></span> We've made a change in our tooling that will require modifying the org.eclipse.virgo.ide.runtime.core.par.xml file so that it points to the correct par.ecore URI. Rename
<span class="italic">xmlns:com.springsource.server.ide.par="
<a class="ulink" href="http:///com/springsource/server/ide/par.ecore&amp;quot" target="_top">http:///com/springsource/server/ide/par.ecore&amp;quot</a>;
</span> to
<span class="italic">"xmlns:org.eclipse.virgo.ide.par="
<a class="ulink" href="http://eclipse.org/virgo/par.ecore&amp;quot" target="_top">http://eclipse.org/virgo/par.ecore&amp;quot</a>;
</span>
</p><p>Inside the WST settings file (
<span class="italic">.settings/org.eclipse.wst.common.project.facet.core.xml</span>) rename occurences of
<span class="italic">com.springsource.server.bundle</span> to
<span class="italic">org.eclipse.virgo.server.bundle</span> and occurences of
<span class="italic">com.springsource.server.par</span> to
<span class="italic">org.eclipse.virgo.server.par</span>.
</p><p>Most/all of the conversion should be done by the following script (it has only see marginal testing, use at your own risk):
&lt; pre&gt;#!/bin/sh</p><div class="orderedlist"><ol type="1"><li><p>NOTE1: Run this at your own risk&amp;nbsp;:)</p></li><li><p>NOTE2: I should quote more dots in sed expressions but I'm lazy.</p></li><li><p>TODO: Delete old com.springsource files after conversion</p></li></ol></div><p>if
<a class="ulink" href="&amp;amp;nbsp;!" target="_top">-d &amp;quot;$1&amp;quot; </a>; then
</p><div class="literallayout"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&amp;quot;Please&nbsp;point&nbsp;me&nbsp;at&nbsp;an&nbsp;eclipse&nbsp;project&amp;quot;&amp;amp;nbsp;;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit&nbsp;1<br>
</p></div><p>fi</p><div class="orderedlist"><ol type="1"><li><p>Bundlor settings</p></li></ol></div><p>f="$1/.settings/com.springsource.server.ide.bundlor.core.prefs"
[ -f "$f" ] &amp;amp;&amp;amp; (</p><div class="literallayout"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&amp;quot;$1:&nbsp;Converting&nbsp;bundlor&nbsp;preferences&amp;quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed&nbsp;-e&nbsp;'s/com\.springsource\.server/org.eclipse.virgo/g'&nbsp;&amp;quot;$f&amp;quot;&nbsp;&amp;amp;gt;&nbsp;&amp;quot;$(echo&nbsp;$f&nbsp;|&nbsp;sed&nbsp;-e&nbsp;s/com.springsource.server/org.eclipse.virgo/)&amp;quot;<br>
</p></div><p>)</p><div class="orderedlist"><ol type="1"><li><p>convert PAR</p></li></ol></div><p>f="$1/.settings/com.springsource.server.ide.runtime.core.par.xml"
[ -f "$f" ] &amp;amp;&amp;amp; (</p><div class="literallayout"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&amp;quot;$1:&nbsp;Converting&nbsp;PAR&nbsp;project&nbsp;dependencies&amp;quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed&nbsp;-e&nbsp;'s/com\.springsource\.server/org.eclipse.virgo/g'&nbsp;&amp;quot;$f&amp;quot;&nbsp;&amp;amp;gt;&nbsp;&amp;quot;$(echo&nbsp;$f&nbsp;|&nbsp;sed&nbsp;-e&nbsp;s/com.springsource.server/org.eclipse.virgo/)&amp;quot;<br>
</p></div><p>)</p><div class="orderedlist"><ol type="1"><li><p>Fix classpaths </p></li></ol></div><p>f="$1/.classpath"
[ -f "$f" ] &amp;amp;&amp;amp; (</p><div class="literallayout"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&amp;quot;$1:&nbsp;Converting&nbsp;classpath&nbsp;containers&nbsp;and&nbsp;entries&amp;quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed&nbsp;-i&nbsp;\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-e&nbsp;'s/com.springsource.server.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER/org.eclipse.virgo.ide.jdt.core.MANIFEST_CLASSPATH_CONTAINER/g'&nbsp;\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-e&nbsp;'s/com.springsource.server.ide.jdt.core.test.classpathentry/org.eclipse.virgo.ide.jdt.core.test.classpathentry/g'&nbsp;\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;quot;$f&amp;quot;<br>
</p></div><p>)</p><div class="orderedlist"><ol type="1"><li><p>Fix natures..</p></li></ol></div><p>f="$1/.project"
[ -f "$f" ] &amp;amp;&amp;amp; (</p><div class="literallayout"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&amp;quot;$1:&nbsp;Converting&nbsp;project&nbsp;natures&amp;quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed&nbsp;-i&nbsp;\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-e&nbsp;'s/com.springsource.server.ide.facet.core.bundlenature/org.eclipse.virgo.ide.facet.core.bundlenature/g'&nbsp;\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-e&nbsp;'s/com.springsource.server.ide.facet.core.parnature/org.eclipse.virgo.ide.facet.core.parnature/g'&nbsp;\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;quot;$f&amp;quot;<br>
</p></div><p>)</p><div class="orderedlist"><ol type="1"><li><p>Fix the wst file, could also replace runtime name here</p></li></ol></div><p>f="$1/.settings/org.eclipse.wst.common.project.facet.core.xml"
[ -f "$f" ] &amp;amp;&amp;amp; (</p><div class="literallayout"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&amp;quot;$1:&nbsp;Converting&nbsp;org.eclipse.wst.common.project.facet.core.xml&amp;quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sed&nbsp;-i&nbsp;\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-e&nbsp;'s/com.springsource.server.bundle/org.eclipse.virgo.server.bundle/g'&nbsp;&nbsp;\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-e&nbsp;'s/com.springsource.server.par/org.eclipse.virgo.server.par/g'&nbsp;&nbsp;\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;quot;$f&amp;quot;<br>
</p></div><p>)</p><p>&lt;/pre&gt;</p></div></div><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript">
_lf_cid = "LF_48be82fa";
_lf_remora();
</script><!--End LoopFuse code--><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch09s03.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch09.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch09s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">9.3&nbsp;Known Issues&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;9.5&nbsp;Maven plugin</td></tr></table></div></body></html>