Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery Availability on Maven Repositories

I noticed that there are a few Maven plugins for Eclipse that support JavaScript development. The problem with using these is that I cannot find any JavaScript artifacts in Maven Central Repository. Specifically, I was looking for JQuery.

Is there a dedicated Maven repository for JavaScript?

Thanks

like image 905
Joe Wood Avatar asked Nov 29 '11 21:11

Joe Wood


People also ask

What is WebJars jQuery?

WebJars are client-side web libraries (e.g. jQuery & Bootstrap) packaged into JAR (Java Archive) files. Explicitly and easily manage the client-side dependencies in JVM-based web applications. Use JVM-based build tools (e.g. Maven, Gradle, sbt, ...) to download your client-side dependencies.

How do I browse a Maven repository?

To browse Maven repositories and to manipulate repository indexes open the Maven Repositories view by selecting Windows, Show View, Other... Once you select Other... Eclipse will display a dialog containing all available views. Select the Maven Repositories view under the Maven folder in the Show View dialog.

What is mavenCentral?

jcenter() and mavenCentral() is a repository for the Gradle plugin in Android Studio. Earlier versions of Android Studio used mavenCentral(), and after some time, it switched to jcenter.

Where are Maven dependencies?

In the POM, right-click anywhere in the editor to open the context menu and select Maven | Show Dependencies. Alternatively, press Ctrl+Alt+Shift+U or Ctrl+Alt+U . In the diagram window, IntelliJ IDEA displays the sub project and all its dependencies including the transitive ones.


2 Answers

Try webjars. http://www.webjars.org/

It has all the major libraries, plus it's in github, so you can fork your own versions if you really need to.

It should work well with a servlet 3 spec container with meta data scanning. But I use https://github.com/bazaarvoice/dropwizard-webjars-resource/ to serve it explicitly, since I'm using JAX-RS (using Jersey).

like image 175
David Roussel Avatar answered Sep 16 '22 17:09

David Roussel


If your question is about repository of javascript, you can have a look at CDNs:

  • Google CDN: http://code.google.com/apis/libraries/ (you can just use the src link without using google's javascript)
  • Microsoft CDN: http://www.asp.net/ajaxlibrary/cdn.ashx

However, please be mindful that they do not provide a local javascript (like how Maven retrieve and store jars), thus Internet connection is necessary and there will be a network overhead.

And more, they do not manage dependencies of javascript. Dependency management of javascript is a much bigger issue in itself.

Hope I have answered your question.

like image 37
wyz Avatar answered Sep 19 '22 17:09

wyz