1

I have several launch configurations that I am adding to source control by saving the .launch file to my project. The project is a spring MVC webapp.

The launch files have VM arguments and classpath entries that depend on where the vFabric tc Server is installed, and where the JVM is installed. I would like to share these launch configs with my team so I was wondering how I can replace those full paths with eclipse variables so that the configs can be used by anyone, regardless of where springsource tool suite is installed.

Are there the requisite variables, and what are they? Thanks in advance. The full .launch file is given as

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.vmware.server.tc.launchConfiguration">
<booleanAttribute key="com.springsource.sts.server.insight.ui.insightConfigured" value="true"/>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;C:/Users/Chris/Documents/springsource/vfabric-tc-server-developer-2.7.0.RELEASE/spring-insight-instance/bin/insight-bootstrap-tcserver-1.8.3.RELEASE.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_05&quot; path=&quot;2&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;C:/Users/Chris/Documents/springsource/vfabric-tc-server-developer-2.7.0.RELEASE/tomcat-7.0.27.A.RELEASE/bin/bootstrap.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;C:/Users/Chris/Documents/springsource/vfabric-tc-server-developer-2.7.0.RELEASE/tomcat-7.0.27.A.RELEASE/bin/tomcat-juli.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;C:/Program Files/Java/jdk1.7.0_05/lib/tools.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;C:/Users/Chris/Documents/springsource/vfabric-tc-server-developer-2.7.0.RELEASE/spring-insight-instance/lib/aspectjweaver-1.6.12.M2.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#13;&#10;"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_05"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="start"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcatalina.base=&quot;C:\Users\Chris\Documents\springsource\vfabric-tc-server-developer-2.7.0.RELEASE\spring-insight-instance&quot; -Dcatalina.home=&quot;C:\Users\Chris\Documents\springsource\vfabric-tc-server-developer-2.7.0.RELEASE\tomcat-7.0.27.A.RELEASE&quot; -Dwtp.deploy=&quot;C:\Users\Chris\Documents\springsource\vfabric-tc-server-developer-2.7.0.RELEASE\spring-insight-instance\wtpwebapps&quot; -Djava.endorsed.dirs=&quot;C:\Users\Chris\Documents\springsource\vfabric-tc-server-developer-2.7.0.RELEASE\tomcat-7.0.27.A.RELEASE\endorsed&quot; -Daspectj.overweaving=true -Djava.awt.headless=true -Dgemfire.disableShutdownHook=true -Dinsight.base=&quot;C:\Users\Chris\Documents\springsource\vfabric-tc-server-developer-2.7.0.RELEASE\spring-insight-instance\insight&quot; -Xmx1024m -XX:MaxPermSize=256m -Xss192k"/>
<stringAttribute key="server-id" value="VMware vFabric tc Server Developer Edition     v2.7"/>
</launchConfiguration>
chris-b
  • 11
  • 2

1 Answers1

0

In Eclipse classpath variables are configured in Window -> Preferences -> Java -> Build Path -> Classpath Variables. Once you have the appropriate variables configured there, follow the instructions provided here.

Hope this helps.

Community
  • 1
  • 1
Stefan Buynov
  • 389
  • 1
  • 7