activelylazy / Rescripter

An Eclipse plugin that lets you run JavaScript to refactor your Java code
http://www.rescripter.com/
12 stars 1 forks source link

Finished preparing projects for Maven/Jenkins CI #3

Closed codecop closed 13 years ago

codecop commented 13 years ago

Dear Dave, I finished changes to have Rescriptor being build @ Jenkins. I did the following things:

I had to create a new plugin for the jmock dependencies. In fact it's only for the hamcrest 1.2 dependencies, because this plugin needs to be loaded first before the org.junit plugin because org.junit comes with hamcrest 1.1 which does not work in your matchers. That's the new com.rescripter.jmock plugin.

The org.jmock dependency is necessary for tycho to detect that JUnit tests are in the plugin and execute them. Further tycho forced me to create a separate plugin for tests. I checked a bit and this looks like standard for OSGI/RCP development anyway. So we have the com.rescripter.editor.test plugin, which's test get executed by tycho. I moved all your new test classes there, too.

The old test did not work any more (that's a reason I love CI) and I fixed it. The new tests did not work on my Windows environment, so I fixed them, too.

I checked all target plattform and the first to support is 3.5, as plugin jdt.core is not available in 3.4.x So I removed all bundle versions as the plugin works as soon as jdt.core is available. I added code to run the Maven build with 3.5, 3.6 and 3.7 (as profiles).

Now you can add your Rescripter to a Jenkins instance. I use CloudBees (free plan) for mine. It's cool and really easy to set up. I've been using it for quite some time for all of my projects and it's good.

Cheers, Peter

activelylazy commented 13 years ago

Wow! Awesome!! Thanks, Peter.

I'll hopefully get chance to look at this soon - but sounds awesome!

Re: junit, I've been using 4.4 in a lot of my projects, to avoid this annoying bundling of an old version of hamcrest. I thought I'd done that here, too, but maybe not.

re: cloud bees - crikey! Hadn't heard of them, that sounds awesome - will definitely have to investigate. I have a jenkins instance I run locally, but putting it in the cloud would be much better.

If this is gonna have some proper CI I really ought to start writing some proper tests for this stuff... everything so far has been a bit, ahem exploratory. But, with CI there's really no excuse. Must admit, I hadn't heard of tycho either - I'd assumed that building eclipse plugins via maven was basically impossible so didn't bother looking any further. Great stuff!

Cheers, David.

On Wed, Sep 21, 2011 at 3:36 PM, Peter Kofler < reply@reply.github.com>wrote:

Dear Dave, I finished changes to have Rescriptor being build @ Jenkins. I did the following things:

I had to create a new plugin for the jmock dependencies. In fact it's only for the hamcrest 1.2 dependencies, because this plugin needs to be loaded first before the org.junit plugin because org.junit comes with hamcrest 1.1 which does not work in your matchers. That's the new com.rescripter.jmock plugin.

The org.jmock dependency is necessary for tycho to detect that JUnit tests are in the plugin and execute them. Further tycho forced me to create a separate plugin for tests. I checked a bit and this looks like standard for OSGI/RCP development anyway. So we have the com.rescripter.editor.test plugin, which's test get executed by tycho. I moved all your new test classes there, too.

The old test did not work any more (that's a reason I love CI) and I fixed it. The new tests did not work on my Windows environment, so I fixed them, too.

I checked all target plattform and the first to support is 3.5, as plugin jdt.core is not available in 3.4.x So I removed all bundle versions as the plugin works as soon as jdt.core is available. I added code to run the Maven build with 3.5, 3.6 and 3.7 (as profiles).

Now you can add your Rescripter to a Jenkins instance. I use CloudBees (free plan) for mine. It's cool and really easy to set up. I've been using it for quite some time for all of my projects and it's good.

Cheers, Peter

You can merge this Pull Request by running:

git pull https://github.com/codecop/Rescripter master

Or you can view, comment on it, or merge it online at:

https://github.com/activelylazy/Rescripter/pull/3

-- Commit Summary --

  • remove empty plugin.xml
  • create jmock plugin with all extlib (to load hamcrest before org.junit),
  • remove bundle versions, org.eclipse.jdt.core is first in Eclipse 3.5,
  • fix compiler warnings
  • rename Eclipse project for consistency
  • add JavaScript nature to javascript, add Jasmine, move things into
  • set target environment
  • update script to lates version from example

-- File Changes --

M com.rescripter.editor.test/META-INF/MANIFEST.MF (7) M com.rescripter.editor.test/build.properties (3) D com.rescripter.editor.test/plugin.xml (5) R com.rescripter.editor.test/src/com/rescripter/script/ScriptLoaderTest.java (311) R com.rescripter.editor.test/src/com/rescripter/test/matchers/PathMatcher.java (0) R com.rescripter.editor.test/src/com/rescripter/test/resources/MockContainerBuilder.java (188) R com.rescripter.editor.test/src/com/rescripter/test/resources/MockFileBuilder.java (161) M com.rescripter.editor/.classpath (20) M com.rescripter.editor/META-INF/MANIFEST.MF (9) M com.rescripter.editor/build.properties (7) M com.rescripter.editor/src/com/rescripter/script/ScriptRunner.java (153) A com.rescripter.jmock/.classpath (13) A com.rescripter.jmock/.project (28) A com.rescripter.jmock/.settings/org.eclipse.jdt.core.prefs (8) A com.rescripter.jmock/META-INF/MANIFEST.MF (33) A com.rescripter.jmock/build.properties (2) R com.rescripter.jmock/lib/cglib-nodep-2.1_3.jar (0) R com.rescripter.jmock/lib/hamcrest-core-1.2.1.jar (0) R com.rescripter.jmock/lib/hamcrest-library-1.2.1.jar (0) R com.rescripter.jmock/lib/jmock-2.5.1.jar (0) R com.rescripter.jmock/lib/jmock-junit4-2.5.1.jar (0) R com.rescripter.jmock/lib/jmock-legacy-2.5.1.jar (0) R com.rescripter.jmock/lib/objenesis-1.0.jar (0) A com.rescripter.jmock/pom.xml (16) M demo/.classpath (14) A demo/.settings/org.eclipse.jdt.core.prefs (8) M javascript/.project (28) A javascript/.settings/.jsdtscope (6) A javascript/.settings/org.eclipse.wst.jsdt.ui.superType.container (1) A javascript/.settings/org.eclipse.wst.jsdt.ui.superType.name (1) D javascript/jasmine-rescripter.js (50) A javascript/script/jasmine/MIT.LICENSE (20) A javascript/script/jasmine/jasmine.js (2476) A javascript/script/rescripter/jasmine-rescripter.js (64) R javascript/script/rescripter/jasmine-rhino.js (0) M pom.xml (330) M update-site/.project (34)

-- Patch Links --

https://github.com/activelylazy/Rescripter/pull/3.patch https://github.com/activelylazy/Rescripter/pull/3.diff

Reply to this email directly or view it on GitHub: https://github.com/activelylazy/Rescripter/pull/3

David Green Co-founder of the London Software Craftsmanship Communityhttp://www.londonswcraft.com Twitter: @activelylazy Mobile: +44 7903 662 182

activelylazy commented 13 years ago

Wow, tycho is awesome. I like that. Nice work integrating it, quite a lot of changes there.

I've added the feature group & update-site to the parent pom; I think this means I can generate new versions of the plugin directly from maven and just push to publish - which is awesome.

Cheers, David.

On Wed, Sep 21, 2011 at 8:10 PM, David Green dave@activelylazy.co.ukwrote:

Wow! Awesome!! Thanks, Peter.

I'll hopefully get chance to look at this soon - but sounds awesome!

Re: junit, I've been using 4.4 in a lot of my projects, to avoid this annoying bundling of an old version of hamcrest. I thought I'd done that here, too, but maybe not.

re: cloud bees - crikey! Hadn't heard of them, that sounds awesome - will definitely have to investigate. I have a jenkins instance I run locally, but putting it in the cloud would be much better.

If this is gonna have some proper CI I really ought to start writing some proper tests for this stuff... everything so far has been a bit, ahem exploratory. But, with CI there's really no excuse. Must admit, I hadn't heard of tycho either - I'd assumed that building eclipse plugins via maven was basically impossible so didn't bother looking any further. Great stuff!

Cheers, David.

On Wed, Sep 21, 2011 at 3:36 PM, Peter Kofler < reply@reply.github.com>wrote:

Dear Dave, I finished changes to have Rescriptor being build @ Jenkins. I did the following things:

I had to create a new plugin for the jmock dependencies. In fact it's only for the hamcrest 1.2 dependencies, because this plugin needs to be loaded first before the org.junit plugin because org.junit comes with hamcrest 1.1 which does not work in your matchers. That's the new com.rescripter.jmock plugin.

The org.jmock dependency is necessary for tycho to detect that JUnit tests are in the plugin and execute them. Further tycho forced me to create a separate plugin for tests. I checked a bit and this looks like standard for OSGI/RCP development anyway. So we have the com.rescripter.editor.test plugin, which's test get executed by tycho. I moved all your new test classes there, too.

The old test did not work any more (that's a reason I love CI) and I fixed it. The new tests did not work on my Windows environment, so I fixed them, too.

I checked all target plattform and the first to support is 3.5, as plugin jdt.core is not available in 3.4.x So I removed all bundle versions as the plugin works as soon as jdt.core is available. I added code to run the Maven build with 3.5, 3.6 and 3.7 (as profiles).

Now you can add your Rescripter to a Jenkins instance. I use CloudBees (free plan) for mine. It's cool and really easy to set up. I've been using it for quite some time for all of my projects and it's good.

Cheers, Peter

You can merge this Pull Request by running:

git pull https://github.com/codecop/Rescripter master

Or you can view, comment on it, or merge it online at:

https://github.com/activelylazy/Rescripter/pull/3

-- Commit Summary --

  • remove empty plugin.xml
  • create jmock plugin with all extlib (to load hamcrest before org.junit),
  • remove bundle versions, org.eclipse.jdt.core is first in Eclipse 3.5,
  • fix compiler warnings
  • rename Eclipse project for consistency
  • add JavaScript nature to javascript, add Jasmine, move things into
  • set target environment
  • update script to lates version from example

-- File Changes --

M com.rescripter.editor.test/META-INF/MANIFEST.MF (7) M com.rescripter.editor.test/build.properties (3) D com.rescripter.editor.test/plugin.xml (5) R com.rescripter.editor.test/src/com/rescripter/script/ScriptLoaderTest.java (311) R com.rescripter.editor.test/src/com/rescripter/test/matchers/PathMatcher.java (0) R com.rescripter.editor.test/src/com/rescripter/test/resources/MockContainerBuilder.java (188) R com.rescripter.editor.test/src/com/rescripter/test/resources/MockFileBuilder.java (161) M com.rescripter.editor/.classpath (20) M com.rescripter.editor/META-INF/MANIFEST.MF (9) M com.rescripter.editor/build.properties (7) M com.rescripter.editor/src/com/rescripter/script/ScriptRunner.java (153) A com.rescripter.jmock/.classpath (13) A com.rescripter.jmock/.project (28) A com.rescripter.jmock/.settings/org.eclipse.jdt.core.prefs (8) A com.rescripter.jmock/META-INF/MANIFEST.MF (33) A com.rescripter.jmock/build.properties (2) R com.rescripter.jmock/lib/cglib-nodep-2.1_3.jar (0) R com.rescripter.jmock/lib/hamcrest-core-1.2.1.jar (0) R com.rescripter.jmock/lib/hamcrest-library-1.2.1.jar (0) R com.rescripter.jmock/lib/jmock-2.5.1.jar (0) R com.rescripter.jmock/lib/jmock-junit4-2.5.1.jar (0) R com.rescripter.jmock/lib/jmock-legacy-2.5.1.jar (0) R com.rescripter.jmock/lib/objenesis-1.0.jar (0) A com.rescripter.jmock/pom.xml (16) M demo/.classpath (14) A demo/.settings/org.eclipse.jdt.core.prefs (8) M javascript/.project (28) A javascript/.settings/.jsdtscope (6) A javascript/.settings/org.eclipse.wst.jsdt.ui.superType.container (1) A javascript/.settings/org.eclipse.wst.jsdt.ui.superType.name (1) D javascript/jasmine-rescripter.js (50) A javascript/script/jasmine/MIT.LICENSE (20) A javascript/script/jasmine/jasmine.js (2476) A javascript/script/rescripter/jasmine-rescripter.js (64) R javascript/script/rescripter/jasmine-rhino.js (0) M pom.xml (330) M update-site/.project (34)

-- Patch Links --

https://github.com/activelylazy/Rescripter/pull/3.patch https://github.com/activelylazy/Rescripter/pull/3.diff

Reply to this email directly or view it on GitHub: https://github.com/activelylazy/Rescripter/pull/3

David Green Co-founder of the London Software Craftsmanship Communityhttp://www.londonswcraft.com Twitter: @activelylazy Mobile: +44 7903 662 182

David Green Co-founder of the London Software Craftsmanship Communityhttp://www.londonswcraft.com Twitter: @activelylazy Mobile: +44 7903 662 182

activelylazy commented 13 years ago

This is all merged, just closing the open pull request