Ok, I've just found out, that I need to place a html file into the js module which references the JavaScript files. Doing so, the minification works correct and the JavaScript files are properly copied into my local maven repository.

I had thought, I could place my JavaScript code in a js module and the html and css files into the war module. But actually it seems to be more consistent putting the client in one module, that is all JavaScript, CSS and html code, the REST api into a second module and the glue code into a third one, the war module.

Tobias

Am 14.07.2012 20:35, schrieb Tobias Neubert:
Hello,

I know, this topic has been discussed before <http://old.nabble.com/-javascript-maven-plugin--How-to-consume-javascript-project-in-a-war-module-td33095262.html#a33107159>. I, too, would like to write my JavaScript code in its own maven module of type js an refer to it from within my war module by defining a corresponding dependency. I've followed Farrukhs <http://old.nabble.com/user/UserProfile.jtp?user=460953> description of using the dependency plugin to copy the generated js artifact manually into my war module but it did not work. Actually I believe the build process of my js module does not work properly.

To verify this, I would be thankful, if anyone could tell me what the result of a "mvn clean install" should look like in the target directory of my js module and in the corresponding directory of my local maven repository.

In my case there is no packaged artifact at all. Basically there are only two important folders, classes and min, containing my own JavaScript files as well as the one my js module depends upon. In my local maven repository I can't find any JavaScript at all (and by the way: The min subfolder within the target folder does not contain a minified version of my JavaScript files but an exact clone of it. Do I need to configure it explicitly).

Thanks for your help,
Tobias Neubert

Reply via email to