Add Plugin dependency which is not installed in Eclipse - java

I am creating an Eclipse plugin for creating a perspective and I need to include a Typescript support for the perspective.
For this, I decided to use the open source project on Github for typescript.java given in this link.
I have packaged the maven project and got the jars and I have placed the jars in the folder called lib in my Eclipse Plug-in project and added the same jars in the classpath of the plugin but still, my project is not detecting the jars and not providing me with the support for Typescript.
I cannot add the Typescript jars to the dependencies section because it is not installed in eclipse so it is not detecting the plug-ins.
This is how my project structure looks like:
Project Structure
This is my build.properties file.
Please help me with this problem.

Related

How to get bundles and jars depended by Eclipse plugin project

I am using maven to build my Eclipse RCP applications. I got confused by how to resolve dependencies. I read the documentation of Tycho. It just explain how to build but no much about how to resolve dependencies. How to use maven download bundles to my target platform folder? And how to import ordinary jar packages such as thumbnailator which is not packaged to OSGi bundle? I added dependency in pom.xml, but can not import package in my MANIFEST.MF.
Everything you use in a RCP must be in packaged in a plugin.
You may have to write a simple plug-in to include any jars you have which are not plug-ins.

Convert Java/Dynamic web project to maven project using Maven Command line

I want to convert a Java/Dynamic web project to a Maven project. I use Eclipse IDE to develop Java applications.
One of the straight forward options available to me is to use 'Convert to Maven project' in Eclipse. But there are situations where I cannot use that option since the Maven plugin doesn't work in some networks like my Work environment.
So I want to know a Maven command (on Command Line) that would help me convert my Eclipse-built Java Web App to a Maven project.
Thank you in advance, Happy learning.
The Eclipse feature "Convert to Maven Project" works on projects that already have an appropriate POM. A project that was initially created by Eclipse doesn't have that POM.
So what you must do, is simply create a POM with packaging type WAR, then put it into the root of the project.
You also have to take care of the source directories. The Maven standard way is to have all sources under these four directories:
src/main/java
src/main/resources
src/test/java
src/test/resources
Eclipse simply stores everything under src. So you either change your file and directory structure, or you change the appropriate <build> parameters in the POM. I suggest the former.
The "Convert to Maven Project" feature does more than adding the Maven nature to the Eclipse build settings. It also creates and configures the Eclipse project meta files (the files .project and .classpath and the folder .settings). Therefore I suggest to delete them first in your project directory, so Eclipse can start on a clean project.
Afterwards you simply can convert your project with the above mentioned feature. It should create the meta files, and - as it is a web project (packaging type WAR) - it also should add the appropriate natures that let Eclipse show the project as a web project.

installing swtChart RCP/SWT- java.lang.ClassNotFoundException: org.swtchart.Chart

I need your help. I want to add the swtChart to my RCP project but it´s not working! I understood that I have to add the org.swtchart_0.9.0.v20140219 to my lib folder and then configure it in built path, in fact, I can see that the code is compiling and I can see the class Chart in org.swtchart, so I don´t understand why the error message is "java.lang.ClassNotFoundException: org.swtchart.Chart". Are there something else to do when installing an external plugin. Sorry I`m new in RCP/SWT.
Thanks a lot!
Just adding a jar to the Java Build Path is not correct for an Eclipse plugin.
The swtchart jar is an Eclipse plugin so for an RCP you should add the swtchart plugin to your Target Platform and make your plugin depend on the swtchart plugin.
You should then include the swtchart plugin in the plugins that are included in the RCP build (if you are using a .product file this means including the swtchart plugin in the Dependencies)
You can also just use swtchart as a jar in your plugin. In this case you must use the MANIFEST.MF editor to add the jar to the plugin Classpath (on the Runtime tab). You must also include the jar in the build - the Build tab of the manifest editor.

Including jars in project path from ivy in Eclipse

I have a java project in eclipse and I'm using ivy dependency manager outside of eclipse, so I have directory structures full of various jar files. Is there a simple way to point my eclipse project's path to the ivy dirs and pick up all the jars?
I'm trying to avoid pulling out each individual jar into my eclipse project directory and hope there's a better way.
There is an ivy plugin for eclipse:
http://ant.apache.org/ivy/ivyde/
A whackier idea is to use groovy to generate the Eclipse .project and .classpath files:
Using Apache Ivy with netbeans

How to include maven built library into your project in eclipse?

I am a novice and don't have much idea. So I have a library that is built with Maven and I want to include this library in my java project in Eclipse, how do I do this? I am using Eclipse juno on MacOSx. I want to run one of the modules in this library, so the source code is provided for this module but how do i run this?
If you are not using maven, you have to download the jar and the sources of that jar (In your case, you can download the zip file provided on the website you mention : http://code.google.com/p/cleartk/downloads/list ) and put it somewhere on your computer.
Then you have to set the build path of your project in Eclipse :
Right-click on your project -> Properties -> Java Build Path
Then you can click on the Libraries tab and Add External Jars so you can point to the jar you downloaded.
In this tab, you can attach the sources of this jar to have access to the source code in Eclipse (and eventually set breakpoint).

Categories

Resources