npm => maven artifact as a service, anyone?

61 views
Skip to first unread message

Joe Barnes

unread,
Mar 6, 2015, 8:36:53 AM3/6/15
to lif...@googlegroups.com
A few months ago on twitter I pitched around an idea to build a service that will convert npm artifacts into maven artifacts.  The idea is that JVM-based projects should be able to manage javascript dependencies using the same mechanisms (i.e. maven) as the JVM dependencies.  It will be a proxy for npm since it is a widely-adopted JS package manager.  This would allow the maven artifacts to stay in sync with the pipeline that most community JS efforts are releasing their libraries.

Most people I have spoken with have shown much enthusiasm for using such a service.  I'd love to hear back from everyone regarding your interest in using it.  I'd rather not build something no one would care to use.

Other than gauging the usefulness of the service, I am just looking for people interested in contributing.  I'm starting in the Lift community because I plan to write it with Lift (although if you look at the existing repo, I first flirted with using Spray).  

I have purchased the npmaven.org domain name and started the npmaven Google group.  If this is an effort you are interested in, please apply for membership to the group.  Let others know who may be interested.

Joe

Vasya Novikov

unread,
Mar 6, 2015, 10:01:18 AM3/6/15
to lif...@googlegroups.com, barn...@gmail.com
Please explain, how does your idea differ from "webjars" technology?

http://www.webjars.org/

Am I correct that "webjars" only converts libraries from a list, while
you plan to auto-repackage NPM to jar ?


On 2015-03-06 16:36, Joe Barnes wrote:
> A few months ago on twitter I pitched around an idea to build a service
> that will convert npm artifacts into maven artifacts. The idea is that
> JVM-based projects should be able to manage javascript dependencies using
> the same mechanisms (i.e. maven) as the JVM dependencies. It will be a
> proxy for npm since it is a widely-adopted JS package manager. This would
> allow the maven artifacts to stay in sync with the pipeline that most
> community JS efforts are releasing their libraries.
>
> Most people I have spoken with have shown much enthusiasm for using such a
> service. I'd love to hear back from everyone regarding your interest in
> using it. I'd rather not build something no one would care to use.
>
> Other than gauging the usefulness of the service, I am just looking for
> people interested in contributing. I'm starting in the Lift community
> because I plan to write it with Lift (although if you look at the existing
> repo, I first flirted with using Spray).
>
> I have purchased the npmaven.org domain name and started the npmaven Google
> group <https://groups.google.com/forum/#!forum/npmaven/>. If this is an
> effort you are interested in, please apply for membership to the group.
> Let others know who may be interested.
>
> Joe
>

--
Vasya Novikov

Joe Barnes

unread,
Mar 6, 2015, 10:07:28 AM3/6/15
to Vasya Novikov, lif...@googlegroups.com
Right, my plan is to have something completely automated.  The folks at webjars are having to package all those things manually (Well, I'm sure they've written scripts and such to handle that).  But my idea is something that is just a converter on top of npm.  No changes are ever needed to update the service when a new asset is available.

Joe

Matt Farmer

unread,
Mar 6, 2015, 10:21:16 AM3/6/15
to Lift
What kind of scenarios do you see benefiting from this? Maybe my imagination is failing me, but I’m not sure I see how this would fit into my build chain. Normally if I’m pulling something in from npm it’s a tool I need on the command line. If this isn’t npm then it wouldn’t be working the same way… unless it will be invoking npm behind the scenes.


Matt Farmer Blog | Twitter

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

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

Joe Barnes

unread,
Mar 6, 2015, 10:24:39 AM3/6/15
to lif...@googlegroups.com
A simple one is angularjs.  I just want it available for me to serve in my pages.

As for tooling, I've not thought it that far.  However, I can readily see sbt plugins which pull such npm jars and run the tooling in nashorn.

Joe


You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/jW3EtcJocH0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.

Vasya Novikov

unread,
Mar 6, 2015, 10:28:18 AM3/6/15
to lif...@googlegroups.com, Joe Barnes
That sounds pretty cool! I think it may be very convenient to have that.

Subscribed.
--
Vasya Novikov

Joe Barnes

unread,
Mar 6, 2015, 10:31:08 AM3/6/15
to Vasya Novikov, lif...@googlegroups.com
Thanks!  I'm actually looking at your roboCup project at the moment to get this running with embedded Jetty so I can Heroku it up. :)

Tim Nelson

unread,
Mar 6, 2015, 10:34:06 AM3/6/15
to lif...@googlegroups.com
They're packaging client libs in npm now? I thought that was mostly for server side libs.

Personally, I want to try sbt-bower [1]  that uses the new sbt-js-engine plugin. But, I'll definitely check out your project if you go ahead with it.

Tim

Joe Barnes

unread,
Mar 6, 2015, 10:39:05 AM3/6/15
to lif...@googlegroups.com
Tim,

What client libs would you be interested in?  Angular and jquery are certainly there. 

Joe

Matt Farmer

unread,
Mar 6, 2015, 12:29:56 PM3/6/15
to Lift
Yeah, so bower is really more client-focused. Angular and jQuery are in NPM, I think, because they can be useful server-side. But for elemica-suggest, as an example, I publish that on bower but not on npm.

Either way, this is interesting.


Matt Farmer Blog | Twitter

Joe Barnes

unread,
Mar 6, 2015, 3:13:47 PM3/6/15
to lif...@googlegroups.com
FWIW, I don't necessarily see why it should stop at npm.  Doing bower seems to make sense too, given what you guys are suggesting.  Perhaps I should have picked a less npm-centric name.  I'm only committed to one year of the domain name. :)

BTW, one of the impetuses for this idea was a conversation that you, Antonio, and I had regarding the sbt-resource-management plugin.  I would like to use this npmaven idea for supplying the coffeescript compiler to an sbt plugin.

Joe

ti com

unread,
Mar 9, 2015, 1:18:23 PM3/9/15
to liftweb

Have you seen pulp?

Joe Barnes

unread,
Mar 9, 2015, 1:51:15 PM3/9/15
to lif...@googlegroups.com
No, I haven't. Can you send a link?  A quick google yielded several results which may be relevant :)

Joe

ti com

unread,
Mar 10, 2015, 6:14:10 PM3/10/15
to liftweb

Joe Barnes

unread,
Mar 10, 2015, 10:15:27 PM3/10/15
to lif...@googlegroups.com
That looks interesting.  I don't know if it solves the same problem I'm shooting for with npmaven.org, but it is interesting nonetheless.

So for those who are interested, I have a walking skeleton up now.  Add something along these lines to your build, and you'll get jars full o' js goodies:

resolvers += "npmaven" at "http://repo.npmaven.org/repo/npm"
libraryDependencies
++= { Seq(
 
"org.npmaven" %  "angular" % "1.3.14" % "runtime",
 
"org.npmaven" %  "d3" % "3.5.5" % "runtime"
}

It should work for any module and version available at npmjs.com.  Let me know what you think!

Joe

ti com

unread,
Mar 11, 2015, 4:24:45 PM3/11/15
to liftweb

Yeah it doesn't solve it but maybe could be help ful as a platform. It is pluggable in many ways. So maybe the npm=>jar could plug into it

ti com

unread,
Mar 23, 2015, 2:36:32 PM3/23/15
to liftweb

Joe Barnes

unread,
Mar 23, 2015, 2:56:04 PM3/23/15
to lif...@googlegroups.com
Yep, I've gotten with James on twitter.  He has been talking to us about npmaven and whether or not it is even needed now.

Joe

Reply all
Reply to author
Forward
0 new messages