blaze icon indicating copy to clipboard operation
blaze copied to clipboard

Maven settings file doesn't seem to be processed - is there an option for that?

Open kimptoc opened this issue 8 years ago • 3 comments

To get through our company firewall etc, we have a Nexus setup.

I can get the eclipse jar using mvn direct, but blaze is not finding it.

Is there a way to get it using the Maven settings file? ( ~/.m2/settings.xml )

Many Thanks

kimptoc avatar Aug 25 '17 15:08 kimptoc

If you get it installed locally to your .m2 directory I think blaze will use it. Otherwise, blaze uses ivy under-the-hood and can download from maven repos, but it won't analyze your maven settings file. It's one of those features that probably should be added, but I've yet to need it. A couple other ideas. The blaze-lite module is very simple and declares what jars will be bundled together. You could quickly fork this repo, modify the blaze-lite/pom.xml to include the eclipse compiler, run "mvn package" and voila you have your own blaze.jar that bundles in the eclipse compiler. I'm not sure how large that dependency is, but we could also include that as part of this project too.

jjlauer avatar Aug 25 '17 15:08 jjlauer

Great. Will try that out.

kimptoc avatar Aug 25 '17 15:08 kimptoc

Had a go, and it works for Java files. https://github.com/kimptoc/blaze/commit/5e678850d1ac733709d3a448405b443a20072861

Trying to make it work for Kotlin now, but getting this error:

$ java -jar blaze-lite/target/blaze-lite-0.16.1-SNAPSHOT.jar examples/hello.kt                                                               
[INFO] Resolving dependencies...
[INFO] Downloading /Users/kimptoc/.m2/repository/com/fizzed/blaze-kotlin/0.16.1-SNAPSHOT/blaze-kotlin-0.16.1-SNAPSHOT.jar ...
[INFO] Downloading /Users/kimptoc/.m2/repository/com/fizzed/blaze-core/0.16.1-SNAPSHOT/blaze-core-0.16.1-SNAPSHOT.jar ...
[INFO] Downloading /Users/kimptoc/.m2/repository/com/fizzed/blaze-ivy/0.16.1-SNAPSHOT/blaze-ivy-0.16.1-SNAPSHOT.jar ...
[INFO] Resolved dependencies in 1390 ms
[INFO] Compiling script...
[ERROR] Unable to find script engine for file extension .kt. Maybe bad file extension or missing dependency?
com.fizzed.blaze.core.BlazeException: Unable to find script engine for file extension .kt. Maybe bad file extension or missing dependency?
        at com.fizzed.blaze.core.Blaze$Builder.compileScript(Blaze.java:305)
        at com.fizzed.blaze.core.Blaze$Builder.build(Blaze.java:322)
        at com.fizzed.blaze.cli.Bootstrap.buildBlaze(Bootstrap.java:204)
        at com.fizzed.blaze.cli.Bootstrap.run(Bootstrap.java:133)
        at com.fizzed.blaze.cli.Bootstrap.run(Bootstrap.java:54)
        at com.fizzed.blaze.cli.Bootstrap.main(Bootstrap.java:42)

I've included all the dependencies from the blaze-kotlin/pom.xml.

kimptoc avatar Aug 25 '17 23:08 kimptoc