Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Creating an update site with the sdk(using an external plugin project)
Creating an update site with the sdk [message #1266397] Fri, 07 March 2014 11:45 Go to next message
Philip Schledermann is currently offline Philip SchledermannFriend
Messages: 5
Registered: December 2013
Junior Member
Hi,

I've encountered some problems while creating an update site for the Editor that is created by Xtext. My editor uses an external jar that was inserted using a "plugin project".
The UI runs as an eclipse built flawlessly, but when creating an update site by using the sdk project i got stuck.
The SDK project depends on this external PluginProject, but when creating the update site, it reports in the logs that "org.junit" wasn't found. The external project is depending on this, but it is added to the build path in it's plugin project.

I tried addding junit to the plugins with no effort. In the logs there is still the ERROR: "The import org.junit cannot be resolved".

I will be really happy if someone has a hint for me.

Thank You, Philip
Re: Creating an update site with the sdk [message #1266418 is a reply to message #1266397] Fri, 07 March 2014 12:27 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

Quote:
while creating an update site for the Editor that is created by Xtext

What kind of build technology are you using?

Quote:
My editor uses an external jar that was inserted using a "plugin project".

And your external jar is an osgi bundle? What do you mean with ".. using "plugin project""?

Quote:
I tried addding junit to the plugins with no effort

To the SDK feature plugins?



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Creating an update site with the sdk [message #1266680 is a reply to message #1266418] Fri, 07 March 2014 20:38 Go to previous messageGo to next message
Philip Schledermann is currently offline Philip SchledermannFriend
Messages: 5
Registered: December 2013
Junior Member
Hi Dennis,

thank you for your reply. I don't know exactly whot you mean by "build technology". I'm on Xtext 2.4.3 and I'm trying to create a simple update site for the xtext project using the xtext sdk project that was created by the xtext wizard.

This external jar was a problem I posted about before. http://www.eclipse.org/forums/index.php/mv/msg/632212/1225361/#msg_1225361
It was suggestet to make a "plugin project" from this jar and add a dependency to this.
I did this and it worked really fine.

The external project (jar or plugin project) has some dependencies, that include "junit".

While searching for the locations where I have to add these depencies, I tried adding them to the "Plug-ins and Fragments" Tab in the feature.xml file of the sdk project. But this didn't helped.

Maybe there is also something wrong with my external project (as the plugin project), but this hasn't showed up during runtime yet.
I added all required libraries to this plugin project, maybe there is also a better way?

Thank you for your help, regards Philip
Re: Creating an update site with the sdk [message #1268208 is a reply to message #1266680] Mon, 10 March 2014 07:32 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

Could you maybe attach a full log here? Or even better a reduced example workspace?


+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Creating an update site with the sdk [message #1268267 is a reply to message #1268208] Mon, 10 March 2014 09:21 Go to previous messageGo to next message
Philip Schledermann is currently offline Philip SchledermannFriend
Messages: 5
Registered: December 2013
Junior Member
I tried to rebuild the update site: this was inside the log zip in the "plugin projects" (external jar) folder:
# 10.03.14 10:04:43 MEZ
# Eclipse Compiler for Java(TM) v20130604-1421, 3.9.0, Copyright IBM Corp 2000, 2013. All rights reserved.
----------
1. ERROR in C:\Users\Philip\workspace\***path_to_directory***\CapitalizationTest.java (at line 3)
	import static org.junit.Assert.assertTrue;
	              ^^^^^^^^^
The import org.junit cannot be resolved
----------

Of course all test methods are undefined, therefore i reduced them to the last error message:
359. ERROR in C:\Users\Philip\workspace\***path_to_directory***\semantics\Util.java (at line 47)
	assertEquals(constraints.length, formulas.size());
	^^^^^^^^^^^^
The method assertEquals(int, int) is undefined for the type Util
----------
359 problems (321 errors, 38 warnings)

The warnings are only for some "function is never used locally".

The build.properties from this "plugin project" looks like:
source.. = .
output.. = .
bin.includes = META-INF/,\
               XYZProcessor.bat,\
               build/,\
               doc/,\
               edu/,\
               etc/,\
               examples/,\
               src.includes =,\
               commons-cli-1.2.jar,\
               commons-lang3-3.1.jar,\
               log4j-1.2.17.jar,\
               junit.jar

("XYZ" is only a placeholder)

The function I tried to use for deploying in the SDK Project is the "Export Wizard". In the "Exporting" section in the Overview Tab.

The only problem seems the testing part of the external project, so a workaround might be, not packaging the testing directory. Because I'm not using this part of the external project in my xtext project.

[Updated on: Mon, 10 March 2014 09:26]

Report message to a moderator

Re: Creating an update site with the sdk [message #1268281 is a reply to message #1268267] Mon, 10 March 2014 09:44 Go to previous message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

I see... PDE Build.
First of all, it doesn't seems to be a problem with the Xtext SDK or Xtext at all.

Second, your build.properties file looks bogus to me.

bin.includes - describes whats in the binary jar
src.includes - describes whats in source jar (which is irrelevant during precompile)

in your case " src.includes =,\" is a part of bin includes, which is wrong. Try to remove this entry from bin.includes.
Do you get any warnings in the build.properties editor?

One more, org.junit eclipse bundle is already a jared jar, and it's also avaiable as osgi bundle. All you need is to add this dependency in the MANIFEST-MF of your "plugin project".

Require-Bundle: org.junit



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Generating c code with xtext
Next Topic:Headless build with Ant and PDE tools
Goto Forum:
  


Current Time: Fri Mar 29 10:23:06 GMT 2024

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

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

Back to the top