> -----Oorspronkelijk bericht-----
> Van: krause [mailto:[email protected]]
> Verzonden: woensdag 16 december 2009 1:49
> I don't understand the mechanism of using javascript
> dependencies. How does
> the javascript resources inside the jar get included in the
> web project?
>
> Any ideas?
Look at javascript:inplace, this will put the js artifact file in your webapp
src..
In our scenario the js war artifact is unzipped during the package phase in
target\<webapp>\scripts\lib, I don't use the outputDirectory or
testOutputDirectory
We use the following in the js artifact:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo.javascript</groupId>
<artifactId>javascript-maven-plugin</artifactId>
<version>1.0-alpha-1-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<descriptor>
${basedir}/src/assembler/prototype.xml
</descriptor>
<compressor>jsmin</compressor>
</configuration>
<executions>
<execution>
<id>compress</id>
<phase>package</phase>
<goals>
<goal>attach-compressed</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Then in the war artifact:
<dependency>
<groupId>nl.minlnv.gisinbusiness.common</groupId>
<artifactId>gisinbusiness-js</artifactId>
<type>javascript</type>
<version>2.5-SNAPSHOT</version>
</dependency>
And in the build segment
<plugin>
<groupId>org.codehaus.mojo.javascript</groupId>
<artifactId>javascript-maven-plugin</artifactId>
<version>1.0-alpha-1-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<descriptor>
${basedir}/src/assembler/bebisviewer.xml
</descriptor>
<compressor>jsmin</compressor>
<strip>;;;</strip>
<scriptsDirectory>scripts</scriptsDirectory>
</configuration>
<executions>
<execution>
<id>default</id>
<goals>
<goal>inplace</goal>
<goal>war-package</goal>
<goal>prepare-tests</goal>
<goal>jsunit</goal>
<goal>compress</goal>
</goals>
</execution>
</executions>
</plugin>
-- Mark
Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet
de geadresseerde bent of dit bericht abusievelijk aan u is gezonden, wordt u
verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat
aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband
houdt met risico's verbonden aan het elektronisch verzenden van berichten.
This message may contain information that is not intended for you. If you are
not the addressee or if this message was sent to you by mistake, you are
requested to inform the sender and delete the message. The State accepts no
liability for damage of any kind resulting from the risks inherent in the
electronic transmission of messages.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email