Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » My DSL plugin install fails
My DSL plugin install fails [message #1417313] Fri, 05 September 2014 06:38 Go to next message
Aruna Kalagnanam is currently offline Aruna KalagnanamFriend
Messages: 3
Registered: August 2014
Junior Member
Hello,

I created an Xtext project for the definition of a custom DSL. I built the DSL into a plugin package using Buckminster.

I would like to install this newly created DSL plugin into an Eclipse installation. I wrote an ANT script to use P2 director to do that, which effectively does the installations of org.mydsl.sdk.feature.group, org.eclipse.xtext.sdk.feature.group, org.eclipse.emf.sdk.feature.group into the {ECLIPSE_HOME}\plugins directory.

I get no errors, the ANT script finishes. I restarted Eclipse, created a new project and created a file with my DSL's extension, Eclipse does not recognize and associate Xtext nature to this project.

If I install the plugin through the "Install new software" process, the Xtext nature is recognized and it works.

What is going wrong with the use of p2.director ?

I have pasted my ANT target for reference :

<target name="install" description="description">
<java fork="true" logError="true" classname="org.eclipse.core.launcher.Main" failonerror="true">
<classpath>
<fileset dir="${ant.home}/../">
<include name="org.eclipse.equinox.launcher_*.jar" />
</fileset>
</classpath>
<arg value='-nosplash' />
<arg value="-application"/>
<arg value="org.eclipse.equinox.p2.director"/>
<arg value="-repository"/>
<arg value="file:/C:/Users/kalaa1/AppData/Local/Temp/buckminster/build/org.example.first.model.site_1.0.0-eclipse.feature/site.p2/, http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/, http://download.eclipse.org/releases/kepler"/>
<arg value="-destination"/>
<arg value="${PLUGINSHOME}"/>
<arg value="-installIU"/>
<arg value="org.example.first.model.sdk.feature.group, org.eclipse.xtext.sdk.feature.group, org.eclipse.emf.sdk.feature.group"/>
<jvmarg line=" -Xms256m -Xmx1024m" />
</java>
<echo message="Finished installing the plugins successfully"/>
</target>
Re: My DSL plugin install fails [message #1417335 is a reply to message #1417313] Fri, 05 September 2014 07:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

did you try to inspect the state of the plugins via "host osgi console" in the console view


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: My DSL plugin install fails [message #1417354 is a reply to message #1417313] Fri, 05 September 2014 08:35 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 05/09/2014 08:38, Aruna Kalagnanam wrote:
> Hello,
> I created an Xtext project for the definition of a custom DSL. I built
> the DSL into a plugin package using Buckminster.
> I would like to install this newly created DSL plugin into an Eclipse
> installation. I wrote an ANT script to use P2 director to do that, which
> effectively does the installations of org.mydsl.sdk.feature.group,
> org.eclipse.xtext.sdk.feature.group, org.eclipse.emf.sdk.feature.group
> into the {ECLIPSE_HOME}\plugins directory.
> I get no errors, the ANT script finishes. I restarted Eclipse, created a
> new project and created a file with my DSL's extension, Eclipse does not
> recognize and associate Xtext nature to this project.
> If I install the plugin through the "Install new software" process, the
> Xtext nature is recognized and it works.
> What is going wrong with the use of p2.director ?
> I have pasted my ANT target for reference :
>
> <target name="install" description="description">
> <java fork="true" logError="true"
> classname="org.eclipse.core.launcher.Main" failonerror="true">
> <classpath>
> <fileset dir="${ant.home}/../">
> <include name="org.eclipse.equinox.launcher_*.jar" />
> </fileset>
> </classpath>
> <arg value='-nosplash' />
> <arg value="-application"/>
> <arg value="org.eclipse.equinox.p2.director"/>
> <arg value="-repository"/>
> <arg
> value="file:/C:/Users/kalaa1/AppData/Local/Temp/buckminster/build/org.example.first.model.site_1.0.0-eclipse.feature/site.p2/,
> http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/,
> http://download.eclipse.org/releases/kepler"/>
> <arg value="-destination"/>
> <arg value="${PLUGINSHOME}"/>
> <arg value="-installIU"/>
> <arg value="org.example.first.model.sdk.feature.group,
> org.eclipse.xtext.sdk.feature.group, org.eclipse.emf.sdk.feature.group"/>
> <jvmarg line=" -Xms256m -Xmx1024m" />
> </java>
> <echo message="Finished installing the plugins successfully"/>
> </target>

PLUGINSHOME sounds suspicious: -destination must be the path of the
eclipse installation, not the path of 'plugins' inside the eclipse
installation

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: My DSL plugin install fails [message #1417384 is a reply to message #1417335] Fri, 05 September 2014 09:47 Go to previous message
Aruna Kalagnanam is currently offline Aruna KalagnanamFriend
Messages: 3
Registered: August 2014
Junior Member
I invoked the OSGi console and gave "host osgi console", I get a "gogo: CommandNotFoundException: Command not found: host" error.

I tried a couple of things: instead of giving a feature install, I gave individual plugin ids for installation. Even with that when I check the installed plugins via About Eclipse Platform-> Installation Details, I cannot see my plugins.

I'm flummoxed. What am I missing ?
Previous Topic:Errors while running Xtext Junit from command line
Next Topic:Unit Test for DSL with dependent DSL
Goto Forum:
  


Current Time: Thu Apr 25 01:55:00 GMT 2024

Powered by FUDForum. Page generated in 0.03030 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top