'build.js' Javascript wrapper for Ant + ShavenMaven

9 views
Skip to first unread message

1s1...@gmail.com

unread,
Dec 6, 2014, 4:17:46 AM12/6/14
to shave...@googlegroups.com
I had found ShavenMaven recently, and today I found 'Bake'.  Bake is a wrapper for ant that allows the project to be defined enirely in a Javascript file ( 'build.js' being the analog of 'build.xml' ).  Javascript seems to make a lot of sense for this purpose, since it's included in the JDK (unlike gradle, sbt, etc.)

Bake hadn't been updated in several years so I cleaned a few things and updated to the latest 'ant'.  Everything worked as it described.

https://github.com/automenta/bake

I remembered shavenmaven and thought it would be a great addition to its features.  For example, by just including the shavenmaven dependency strings as additional parameters in the .js file.

BTW for ordinary build.xml usage, can ShavenMaven parse the dependency strings from additional parameter tags in build.xml.?


Daniel Worthington-Bodart

unread,
Dec 6, 2014, 3:30:08 PM12/6/14
to shave...@googlegroups.com
Hey that looks pretty cool, thanks for letting me know.

I don't currently support passing the dependencies as an argument but I could probably do the classic standard in option with a file name of "-" if that might help. 

Dan

--
You received this message because you are subscribed to the Google Groups "shavenmaven" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shavenmaven...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SeH H

unread,
Dec 6, 2014, 5:42:33 PM12/6/14
to shave...@googlegroups.com
Yes that could work.  I was thinking to load shavenmaven on the classpath and access it directly through the JS engine, similar to how Bake accesses ant by loading ant.jar.

Daniel Worthington-Bodart

unread,
Dec 7, 2014, 3:49:14 AM12/7/14
to shave...@googlegroups.com

Oh, if you don't mind going direct then you can pass the arguments directly. Something like:

new Dependencies(supportedArtifacts().toArtifacts(lines), System.out).update(libFolder);

Where lines is a sequence of dependency urls and libFolder is the directory to put the libs. Obviously replace System.out if you want the log to go somewhere else

Ideally lines should just be an iterable of Strings but currently it's a sequence class

SeH H

unread,
Dec 7, 2014, 8:45:54 AM12/7/14
to shave...@googlegroups.com
Thanks, yeah that should work.  I'll report how it goes when I try

Has anyone tried used proguard to produce a minified shavenmaven .jar?  If so, what kind of savings can be expected?  The latest 'ant' is about 2mb, shavenmaven is ~2.1mb.  i'm wondering what the minimum size a combination of both would cost for a self-contained build manager.


Daniel Worthington-Bodart

unread,
Dec 7, 2014, 12:32:58 PM12/7/14
to shave...@googlegroups.com

Proguard would make SM pretty dam small I bet

Reply all
Reply to author
Forward
0 new messages