How to make an addon project as a sub-project to another project?

I have created a custom widget addon in a seperate project ant exported it to jar using
eclipse’ Export => Vaadin Add-on Package
. This jar is working fine when I’m using in my main project. But, I have frequent changes in this addon so whenever I make changes to this addon I will have to build the
jar
and refer it to the main project. This seems to be messy!!!. So, I directly referred the addon sources in to my main project’s build path (Build Path => Source) instead of using its
jar
file. But, it is not working after widgetset compilation. How can I rectify this problem? I can’t use maven in my project.
Is it the right way to follow? What I mean to do is I want to keep this addon project as a sub-project to my main project so that I can simply compile and get the changes in the main project.


Here is the screenshot of my eclipse.

Hi Visruth,

I think you need to have the sources in the classpath the GWT compiler (backend of the vaadin plugin) when it runs. When using maven, you can include the source JAR (classifier “sources” in an additional dependency).
When building all modules of a project, you achieve the results you desire. Without maven, maybe a litte bit of automation for creating an equivalent source JAR (i.e. a jar containing .java instead of .class) might heip

Hope I could help - good luck!
Sebastian

Can I achieve it without using jar of my subproject addon in my main project? Plz visit the link given in the question, it’s a screenshot of my projects in eclipse.

Hi Visruth,

I’m with you that including the sources should work - at least if the rest (.gwt.xml, etc.) is set up correctly in both projects. I did that myself and I can’t recall a difference now. I do recall that at least the GWT Devmode launcher (and quite certainly also the superdevmode launcher) have a copy of the source path configuration - hence should be configured/(re)created after the source folders are set up.
But frankly, I’m running out of ideas also - maybe copying to the main once and checking whether it works can bring up more details on where the issues might actually be. As it’s a little hacky anyway, you could also use junction.exe on windows - see sysinternals.com, you’ll be redirected to MSFT techNet to link a folder or package into main.
That said, the only “clean” solution I’m aware of (which does not mean much) is a source jar or including the sources in the jar

Hope I could help (anyway) - good luck!
Sebastian