r2 - 15 May 2006 - 15:57:32 - BobbyRulloYou are here: OSAF >  Projects Web  > MavenJsarPlugin

Maven JSAR Plug-in

What is a JSAR?


A JSAR is just a collection of JavaScript files zipped up with the extension ".jsar" instead of ".zip" - bascially a JAR for JavaScript resources.

Since there is no standard way of distributing JavaScript files, I am introducing this format to fill that void. Right now there is no META-INF or any metadata files contained within a JSAR but that could change.

What does the Maven JSAR plug-in do?


The Maven JSAR plug-in allows you to declare JSAR dependencies in your project.xml and they will be exploded into your webapp's JavaScript library directory when you "maven war". If you run the "maven war:inplace" target the exploded JSAR's will be copied to your webapp, and when you "maven clean" the plugin will remove the exploded JSAR directory.

Maven Goals


You don't call plugin goals directly; the plugin does its work before and after certain other goals are called - namely, "war:resources", "war:inplace" and "clean:clean".

Plugin Properties


maven.war.jslib.dir - This is the name of the directory within your webapp to store the exploded JSAR's. Defaults to "lib".

How can I get it?


The easiest way is to just add it as a dependency of your project like so:

    <dependency>
      <name>maven-jsar-plugin</name>
      <groupId>org.osaf</groupId>
      <artifactId>maven-jsar-plugin</artifactId>
      <version>0.1-SNAPSHOT</version>
      <type>plugin</type>
    </dependency>

You must also add "http://builds.osafoundation.org/maven/" to the "maven.repo.remote" file in your project.properties.

Fine, but I'd like to see the source.


Just check it out of our svn repository:

Read Only: http://svn.osafoundation.org/server/mavenscript/trunk/

Read/Write (must have account): svn+ssh://br@svn.osafoundation.org/svn/server/mavenscript/trunk

Project Status


The plug-in is currently at version 0.1-SNAPSHOT

Team


BobbyRullo is only developer at this time.
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.