lgrignon / jsweet-maven-plugin

JSweet maven plugin providing build and clean operations of JSweet sources
Apache License 2.0
18 stars 20 forks source link

Cannot specify a special PATH to run node from #22

Closed onigoetz closed 7 years ago

onigoetz commented 7 years ago

Hi,

thanks for this maven plugin, it's very useful to us.

Sadly, we have a small issue with it in our CI environment. In this environment we don't have node/npm installed, but we use the maven-frontend-plugin to install node/npm upon build.

Is it possible to add an option to add something to the PATH by redefining : org.jsweet.util.ProcessUtil.EXTRA_PATH ?

Because it seems to do exactly what I need : (https://github.com/cincheo/jsweet/blob/40cb6d3597ef57ed318cf36dd212c5497a493dec/candy-generator/src/main/java/org/jsweet/util/ProcessUtil.java#L74)

I can't modify the PATH outside of maven's run so that's not an option for me sadly.

I can provide the pull request if you accept such change.

lgrignon commented 7 years ago

Hello, I think this is a really good idea. Indeed we need a suitable solution for CI, especially when Node can't be installed on the build environment, which will IMO occur often.

I will take a look later today.

Which version of the jsweet-maven-plugin are you running?

Thanks for your suggestion!

onigoetz commented 7 years ago

Hi, thanks

We are currently running the version 1.1.1 of the plugin

lgrignon commented 7 years ago

Ok, you will probably have to migrate to 1.2.0-SNAPSHOT, which is not a bad thing because there were several fixes included in 1.2

renaudpawlak commented 7 years ago

@lgrignon you mean 1.2.0 and not 1.2.0-SNAPSHOT right? That raises the question of how to version an update of the maven plugin on a given version of JSweet...

onigoetz commented 7 years ago

Sure, I have no problem migrating to 1.2.0 when it's out.

lgrignon commented 7 years ago

@renaudpawlak As we discussed, it will be 1.2.1-SNAPSHOT

@onigoetz If you want to migrate, 1.2.0 is out for a long time, I gave you the wrong next version, it is: 1.2.1-SNAPSHOT Please do not worry about the SNAPSHOT for this version, there are no development in progress except for the enhancement you proposed. The actual next version in preparation is 2.0.0 ;)

lgrignon commented 7 years ago

@onigoetz Could you please try, I just deployed the jsweet-maven-plugin 1.2.2-SNAPSHOT The extraPath option should do the trick: https://github.com/lgrignon/jsweet-maven-plugin/tree/1.2.1

We should integrate it better in the 2.0.0 version.

Thanks again for your suggestion, please close if it solves your issue.

onigoetz commented 7 years ago

Hello, it seems it works fine with the latest code.

Thanks for the quick response.