wocommunity / wolips

wolips
53 stars 53 forks source link

Eclipse 4.4 compatibility #109

Closed Wolfy42 closed 10 years ago

Wolfy42 commented 10 years ago

The current version of wolips is not working in Eclipse 4.4 (Luna). See the commits for the changes necessary to be able to use in in the current version of eclipse.

With the changes in the commits the plugins are working, but there are open issues:

pascalrobert commented 10 years ago

I get the HashMap error when trying to compile with Ant version 1.9.3 compiled on December 23 2013:

[javac] /var/lib/jenkins/jobs/WOLips44/workspace/woproject-ant-tasks/src/java/org/objectstyle/woproject/ant/FrameworkSet.java:126: error: constructor ExternalFrameworkModel in class ExternalFrameworkModel cannot be applied to given types;
[javac]       this.frameworkModel = new ExternalFrameworkModel(getProject().getProperties());
[javac]                             ^
[javac]   required: Map<Object,Object>
[javac]   found: Hashtable<String,Object>
[javac]   reason: actual argument Hashtable<String,Object> cannot be converted to Map<Object,Object> by method invocation conversion
Wolfy42 commented 10 years ago

I got the same error. I've migrated my code locally to be able to compile against the current ant-version. So it seems this migration is also necessary to fix the 4.3-build. Shall I add a commit to this pull-request which adds support for this ant-version?

pascalrobert commented 10 years ago

Yes, please add the commit.

Wolfy42 commented 10 years ago

Added commit which fixes the compile error against the current version of ant. Tested with Ant version 1.9.4.

Wolfy42 commented 10 years ago

This commit fixes the reading of the MiscTemplates folder for the IncrementalBuilder. The old approach was trying to convert a "bundleresource"-Uri (e.g. "bundleresource:/(...)/MiscTemplates/") into a file. This is not working for eclipse 4.4.

This approach installs the org.objectstyle.wolips.templateengine plugin (which constains the MiscTeamplates-Folder) as folder instead of as jar. This was changed with the flag unpack for the plugin in the feature-specification.

During runtime it uses the OSGI-Framework-classes to read the folder out of the plugin.

konradkg-zz commented 10 years ago

I've built it and installed with no problems (via instructions on http://wiki.wocommunity.org/display/WOL/Building+WOLips),

but when trying to create new Application from wizard fails with:

The selected wizard could not be started. Plug-in "org.objectstyle.wolips.wizards" was unable to instantiate class "org.objectstyle.wolips.wizards.WOApplicationWizard". java.lang.NullPointerException

Also adding new componet to existing app do not work (wizard opens, but nothing happens after confirming it). Maybe just my build is wrong (done from Wolfy42 repo, eclipse_4_4 branch). If you provide your build / update page, i will test it once again.

Wolfy42 commented 10 years ago

I could reproduce the bug with the Wizards. The last commit fixed it. Please try again with an updated build. I cannot reproduce the bug with the creation of new WOComponents. This is working for me.

I've seen that the wocommunity is working on a build (http://jenkins.wocommunity.org/job/WOLips44/). Once it is running we can test with the same build. I was just building locally for my tests.

elemgee commented 10 years ago

I was able to get a clean build with a clean Eclipse 4.4 installation used as home. The only dependencies were the eclipse plugins for JRebel and JProfiler along with ant 1.9.4 (as mentioned above)

I exercised this on a clean install of 4.4 and the wizards, components, models all are behaving as expected. The WOComponent wizard and component editor are working as expected for me.

Thanks for doing this.

elemgee commented 10 years ago

I'm working with some existing projects and having the following error related to the apache velocity ResourceManager

Errors occurred during the build.
Errors running builder 'WOLips Incremental Builder' on project 'VAUI8'.
The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.

On two earlier frameworks, removing the JRebel "nature" and then re-applying it fixed this error, but on the UI framework that I have in this project, it is not going away. This is the first framework where this error has repeated on multiple clean and build cycles.

Wolfy42 commented 10 years ago

I was able to reproduce this error on "Eclipse IDE for Java EE Developers".

The "org.objectstyle.wolips.thirdparty.velocity" plugin contains a velocity.jar The problem is that the JavaEE eclipse is bundled with the m2e-integration which has a "org.eclipse.m2e.archetype.common" which also contains and uses a Velocity-jar. There seems to be a classloading problem which also occures in other plugins (see https://github.com/whitesource/whitesource-bamboo-agent/issues/9).

After removing the "org.eclipse.m2e.archetype.common" it is working, but m2e is not working anymore. Maybe the mentioned workaround in the linked issue will also help here.

konradkg-zz commented 10 years ago

After pulling last commit, wizards works perfect. I think it's good enaught to merge it to official 4.4 build.

Big thanks Wolfgang. Now java 8 world is open for WO apps :>

konradkg-zz commented 10 years ago

About velocity issue, downgrading to m2e version 1.4 (Update site: http://download.eclipse.org/technology/m2e/releases/1.4) is also workaround - no problems with clean-build cycle.

Wolfy42 commented 10 years ago

After applying the change which was mentioned in the linked issue (of the whitesource-bamboo-agent) I was able to use wolips together with m2e. Applied changes to all calls to the velocity-engine.

pascalrobert commented 10 years ago

FYI, I'm getting the exception for line 239 on my machine at work, which have a way smaller history of WO/WOLips on it. I'm on the last commit in branch Wolfy42-eclipse_4_4

java.lang.NullPointerException at org.objectstyle.wolips.builder.internal.WOIncrementalBuilder.createInfoPlist(WOIncrementalBuilder.java:239) at org.objectstyle.wolips.builder.internal.WOIncrementalBuilder.invokeOldBuilder(WOIncrementalBuilder.java:191) at org.objectstyle.wolips.core.resources.internal.build.Builder.invokeOldBuilder(Builder.java:214) at org.objectstyle.wolips.core.resources.internal.build.Builder.build(Builder.java:131) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)