Installing Eclipse RCP Plugins - java

I have an Eclipse RCP application that I would like to install a plugin into. I know the plugin works with the application, and with older versions of the application I could just drop the plugin JAR into plugins/ folder and it would be available next time I loaded the application.
However, with the current version, the JAR doesn't seem to get picked up when I put it in the plugins/ folder. I've tried running the application with the --clean flag, but that doesn't help.
How do I tell the application that I want to install the plugin?
Update: Got it working by adding the plugin to the config.ini - I've not needed to do that before, previously it would just be picked up when I placed it in the plugins/ folder. Is there a configuration option that disables the detection of new plugins from the plugins/ folder?

#Fredrik basically says it: You need to put the plugin in the "dropins" folder, the sister directory to the plugins directory. Then restart. I usually run eclipse -clean just to be safe. If there's a problem with the plugin, you will need to using the p2 debugger as mentioned in https://stackoverflow.com/a/12480978/2295812

Got it working by adding the plugin to the config.ini - I've not needed to do that before, previously it would just be picked up when I placed it in the plugins/ folder. Is there a configuration option that disables the detection of new plugins from the plugins/ folder?

Related

How can I remove eclipse completely?

I have removed the .eclipse folder, .p2 and the eclipse folder from user->local. But somehow when I am running eclipse its creating a workspace folder at the predefined location which I defined during first use. Do I also have to remove the gradle folder or How can I remove it completely it's so annoying.
Create one fresh work space, then open the workspce in eclipse it will create the new workspace configuration.
Due to the fact that you can start Eclipse even after deleting the .p2 folder, I conclude that you installed Eclipse as a ZIP package and not via the Eclipse Installer.
The predefined location of the workspace is stored inside the configuration area which is by default the subdirectory configuration of the Eclipse installation directory.
The Eclipse Java IDE uses in addition to the directories already mentioned by you, for Maven the .m2 and for Git the git subdirectories of the user directory by default. Additionally installed plug-ins might have used further directories.

Why might eclipse not export maven libraries that are included in classpath?

I have a fine running project that uses Maven for dependency management. The project itself is run by eclipse (Run As...).
In the project menu > Deployment Assembly, I have included the MAVEN_REPO.
Problem: when I run the project, everything gets copied correctly to war/WEB-INF/lib.
BUT I'm constantly getting an error that PersistenceProvider cannot be found.
IF I copy manually all libraries from deployed war dir to src/main/webapp/WEB-INF/lib, and then restart the application, everthing works fine!
So I can conclude that my jpa/hibernate config in general is fine.
But how can I come over the need to add all libraries manually to the src lib folder?
So, when you do 'Run As - Web Applicaiton' eclipse/google plugin uses the War directory path you specify. To change this, you right click on your project, and select properties. Then under the google drop down, select 'Web Applicaiton'. There, you can edit the 'WAR directory' path. this is probably set to src/main/webapp, which is NOT what you want.
When maven builds your war, it takes all built class files and libraries, and packages them into the target directory. This is the directory you want to use as the 'War directory'. This will be something like '/target/myappname-1.0.0'
Sidenote: If you are using gwt/maven, you'll probably want to use the command 'mvn gwt:run' versus running using the google/eclipse plugin. This allows maven to do some work (like resolve dependencies) before the dev server is run.

Adding plain Java project as a classpath to an eclipse plugin

I have a plain Java project (not a plugin project) which I want to add to a classpath of a eclipse plugin which I am developing. But in web projects I can add that project as a build path and it works fine. But I tried same thing in eclipse plugin, I am able to compile successfully, but at run time I am getting java.lang.ClassNotFoundException.
I know OSGi quite well and I know how to add OSGi into an classpath (using export-packages) but what I want is to add Standard, non-osgi project into an classpath, so that I wont' get runtime errors. Is there anyway I can achieve this?
I can export project as a jar file or make it as a plugin project and it would work fine. But that's not my option currently because, still that API is in pre-alpha stage, and there would be lot of changes going on. So I am trying to avoid pain of exporting it as jar file everytime. Is there any option for me other than this?
I have a similar situation: I want non-OSGi Maven dependencies integrated into the classpath of my plugin. I succeeded with a roundabout solution, which I think is the best I could get.
I have a build step outside of Eclipse where I copy the class files of the dependency into the plugin's lib folder. The lib folder is specified in MANIFEST.MF as an entry in Bundle-ClassPath and (here comes the hack) as a source folder in build.properties. That was the only way to make the plugin work both when launched from within Eclipse and when exported.

Overwrite jar files when re-installing and eclipse plugin

I am developing an eclipse plugin and facing a deployment problem:
After zipping the whole eclipse plugin and installing it on eclipse using Help--> Install New Software--> from archive file, once I would like to uninstall it through Help --> About Eclipse Platform --> Installation Details --> Installed Software --> Uninstall..., the old jar files will remain under eclipse/plugins folder. And when I try to install a new version of the eclipse plugin, the previous jar files are not overwritten by the new ones.
Is anything wrong within my process? does anyone has an idea about deploying eclipse plugins properly? thanks!!!
To get rid of the old plugins you have to clear the Installation History. Go to Help | About Eclipse | Installation Details | Installation History and select all the old stuff. Then click delete and restart. Now install the new plugin.
The other way to achieve this is by copying the corresponding directory (or jar) from the source eclipse install plugins/ or/and features/ directory to the target eclipse install plugin/ or/and features/ directory

JAR files not being included with Android Ant build

It seems like there are many different answers to this question, none of which work for me!
When I build my android app with eclipse, everything works fine. My JAR file is located in the /libs directory of my project, as recommended.
I am using SDK r15 (the latest android sdk available).
When I run ant debug, the apk file is built. However upon running the file in the emulator, a force quit is thrown. From LogCat, I see errors consistent with the JAR file not being compiled.
Many of the answers I see here, refer to older versions of the SDK. Also many refer to files which no longer exist. For example, android_rules.xml no longer exists in the ../tools/ant/ directory. Instead I see only a build.xml.
Has anyone solved this issue for the latest android.
Not I MUST use ant (not eclipse) for this build..
If you use ant to build your android project, just add your jar to the libs project. Eclipse will need you to add it through the project properties wizard. Maven should have some archteyp for that but I don't know it.
An extra jar file needs to be both added through dex and apkbuilder, that's not that easy to do it buy hand, you would be more confortable using ant tools coming with the android sdk, they are pretty well done and provide intersting features like adding jars, build a project for debug and release, testing,etc..
add your jar to a folder named libs and run ant compile from the project basedir.

Categories

Resources