Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Bad classpath in exported build.xml for dependent plugin?
Bad classpath in exported build.xml for dependent plugin? [message #1359993] Fri, 16 May 2014 15:57 Go to next message
Hernan Gonzalez is currently offline Hernan GonzalezFriend
Messages: 188
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
I'm using Eclipse 4.3
Create an blank plugin "plugin1", then a second plugin "plugin2" that depends on "plugin1" (plugin dependence).

In some class in plugin1 (say, Activator) create a method

public static void sayHi() {
	System.out.println("plugin1 says hi");
}

Create a class in plugin2 that calls that:

public class Class1 {
	@Test
	public void mytest() {
		plugin1.Activator.sayHi();
	}

	public static void main(String[] args) {
		(new Class1()).mytest();
	}
}


Test that it runs ok, as Java app and as Junit test

Then generate a ANT build.xml for plugin2:
plugin2 -> Export -> General -> Ant BuildFiles

Open the generated build.xml and try to run the Class1 target (either as Java app, or a Junit test). It fails java.lang.NoClassDefFoundError: plugin1/Activator

Looking inside the build.xml

  <path id="Plug-in Dependencies.libraryclasspath">
        <pathelement location="${ECLIPSE_HOME}/plugins/org.eclipse.ui_3.105.0.v20130522-1122.jar"/>
        ....
        <pathelement location="../../../../plugin1"/>
 </path>


That last entry looks totally wrong (it misses the "bin/" and it can't imagine what's it's being relative to). If I manually change it to the logical "../plugin1/bin"

        <pathelement location="../..plugin1/bin"/>

then it works ok.

Do you think this a bug?

Re: Bad classpath in exported build.xml for dependent plugin? [message #1379395 is a reply to message #1359993] Sat, 24 May 2014 17:59 Go to previous message
Hernan Gonzalez is currently offline Hernan GonzalezFriend
Messages: 188
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
I filled an issue

https://bugs.eclipse.org/bugs/show_bug.cgi?id=435209
Previous Topic:[Solved] - Problem with toolbar of part - Eclipse 4.2.2
Next Topic:Color and size for menuContribution
Goto Forum:
  


Current Time: Thu Apr 25 01:11:02 GMT 2024

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

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

Back to the top