Upgrade eclipse 3.5(Galileo) JUnit - eclipse

I would like to upgrade the JUnit version of my Eclipse Galileo (on windows) to JUnit 4.8.1 instead of the included JUnit 4.5. There does not appear to be a plugin update to use the new version or a way to change the location of the JUnit 4 jars. How can I update to the new version and/or use a JUnit jar not under the eclipse install directory?

For plain java projects
You could add the junit.jar you want to use as a file in your project, add it to the build path, and remove the eclipse defined junit library from the build path (assuming it was there).
For plugin projects
You can do as above or, create a new plugin from the junit 4.8 jar and add it to your test plugin's dependencies.

Note: Eclipse Galileo 3.5.2 (just released today), and Eclipse Helios 3.6M5 (to be released) have JUnit4.8 in them.
See this Planning Meeting Notes from last January, 27th.
Darn... As The OP Andrew comments, the latest Eclipse 3.5.2 still got a JUnit4.5.
As stevendick adds: it shouldn't make it in the 3.5 release cycle, but should probably make it in the last 3.6Mx releases.

Related

Configuration when upgrading from Indigo to Luna Eclipse

I'm trying to upgrade my eclipse from Indigo to Luna (I know that Luna is not the newest but my company does not have a license for a newer version for now).
My tool uses the eclipse Indigo and depends on it. One of the previous developers wrote some notes on how to upgrade:
We will need the following:
execution eclipse installation.
target eclipse installation
an eclipse SDK tarball to run the unit tests
Change the following places in the build plug-in file:
Version of org.ecilpse.pdebuild (pdeBuildPluginVersion=Version)
Version of org.eclipse.equinox.launcher (equinoxLauncherPluginVersion= Version)
Execution eclipse location (eclipseLocation=Path)
Eclipse SDK tar ball (sdkTarBall=PATH-TO/eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz)
I don't understand which versions should be in the pdeBuildPluginVersion and in the equinoxLauncherPluginVersion fields - Where from I should get the needed information?
Also, what is the "Eclipse SDK tar ball" and where should I find it?
You can download old Eclipse SDK versions from the Eclipse Project archive here. Choose your release and then download the Eclipe SDK tar.gz for your platform.
You find out the versions of the plugins by looking in the plugins directory of your Eclipse and finding the plugins, which might be something like:
org.eclipse.pde.build_3.9.0.v20140415-2029
org.eclipse.equinox.launcher_1.3.0.v20140415-2008
The version is the part following the '_' character

run as testNG is missing

The option runAs->TestNG on xml file is missing somehow on my eclipse,
I tried to install the eclipse from scratch and now I have Version: 2018-12 (4.10.0).
Also I have latest JDK and JRE testNG is installed as far as I see and when I want to install them again I have a problem.
All the threads that i saw till now nothing helped me and i tried all the solution as i wrote maybe you have any idea
the only solution i founded till now is that i need to install eclipse from scratch and convert the same project again to TestNG and to copy the old XML to the new one, if its the latest eclipse than to download the beta version of TestNG
There is an issue with the TestNG plugin and Eclipse 2018-12 (https://github.com/cbeust/testng-eclipse/issues/408). You can use the current beta version from https://github.com/cbeust/testng-eclipse.
If the picture above of your installed software is the current state of your Eclipse 2018-12 setup, it cannot be a clean install. The version 6.14.x of the TestNG plugin is not compatible with 2018-12. It is not possible to install the plugin with Eclipse. Either the existing Eclipse directories are reused or the plugin directories have been added manually. It is important to remove them. After that, it should be possible to install the version 7 beta of the TestNG plugin.
It should look like this:
With this setup, you will get your context menu entry for TestNG:

how come an Eclipse plugin that targets Eclipse version 3.5 works with Juno but not Indigo or Kepler?

I developed an Eclipse plugin using Juno (version 4.2) and specified in the plugin.xml file that it is supposed to target Eclipse version 3.5.
However, when I copy the jar file to the "dropins" folder of Eclipse Indigo (previous version) or Eclipse Kepler (current version), it is listed as an installed plugin, but doesn't load on startup.
Could it be that the particular instances of Kepler/Indigo that I tried the plugin on are missing at least one of the plugin's dependencies?
The <?eclipse version="3.5"?> tag in plugin.xml file does not specifies what version of Eclipse you want to target. It just specifies the version of plugin.xml syntax that you wish to use. Newer versions of Eclipse will support old syntax, but not the other way around.
What really controls the version of Eclipse that your plugin supports are the dependencies specified in plugin MANIFEST.MF files and feature dependencies in feature.xml files. A common problem is being unable to meet the version constraint specified in one of those dependencies.
The trouble with using dropins folder installation method is that you don't see the problem that documents why your plugin could not be activated. Instead, use the "install additional software" wizard in Eclipse and you will see the issue when it refuses to install into one of your target configurations.

Unable to create new junit test case in helios

I'm currently using the Eclipse Helios IDK and have the newest JRE (1.6) installed. I have added both the 4.8 and 4.9 versions of the junit jar to the build path. However, whenever I right click>new there is not an option to create a junit test case like you would expect. Even after going to other>java and every other directory within other I couldn't find the option to create a test case. Do I need to get a plugin in order to initialize these .jar files?
Thanks for any help in advance!
By default (and in my Helios, too) JUnit Test Case should be available even if no JUnit jar is in your classpath. Eclipse then asks to add the JUnit jar to the classpath.
Try removing the jars and start the "New.." wizard again.

Eclipse update problem?

Please take a look here:
alt text http://img16.imageshack.us/img16/2810/errrp.jpg
Why i got that error when i'm trying to update my Eclipse Galileo to the newest Eclipse M6 Helios?
I'm using the update URL from here:
http://eclipsesource.com/blogs/2010/03/14/eclipse-3-6-m6-helios-available-for-download/
Is this a bug? If not, what can i do?
Please help. Thanks!
Can you try the upgrade process after re-launching eclipse with the -clean option?
Do you confirm you are using the http://download.eclipse.org/eclipse/updates/3.6milestones/ update site address?
What version of eclipse are you using (3.5, 3.5.1, 3.5.2?) and what extra plugin did you installed?
For instance, if you have installed Scala for Eclipse, you could not upgrade AspectJ which could block the upgrade process. (see this thread for illustration)
To summarize the 3-days span and 15 comments below:
An easiest path to solve this would be:
have a fresh installation of Eclipse, especially the Java EE Helios package (see Helios packages)
with an eclipse.ini including a -data /path/to/existing workspace
( That way, you have 2 Eclipse referencing the same Eclipse projects. You can launch one or the other, and if the new one does not work, you can still revert to the old one. This is safer than trying modifying extensively -- through the update process -- your current Eclipse)
add the GlassFish plugin for Eclipse
(download both the plugin and feature jar files, quit Eclipse, then copy the unzipped contents of the first into the plugins directory and the second into the features directory of your Eclipse installation)
Check you Java EE JDK if needed
And here you go: you should be able to see a GlassFish Server and integrate it as a target runtime there.