mvn install deletes source file (outside of normal src tree)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

mvn install deletes source file (outside of normal src tree)


I'm trying to learn how to use the Javascript Maven Plugin, but I've had lots of issues I would like to fix one at a time.

So my first failed attempt: I have a build that works on the first try, but deletes require.js in the process so that subsequent builds fail.  My directory structure is vanilla AFAICT, except that require.js is located at <project root>/deps/require.js.  My pom.xml is vanilla.  

I'm not using almond.js in this revision.  The file <project root>/src/main/resources/game.html has this script:

<script data-main="../js/main.js" src="../../../deps/require.js"></script>

and /src/main/js/main.js looks like this:

/*global requirejs define */

(function() {
var jsSourceRoot = "../../main/js"; // root of js code, excluding 3rd-party and test code.
//By default load any module IDs from js/lib
baseUrl: jsSourceRoot,
paths: { Box2dWeb: '../../../deps/Box2dWeb-2.1.a.3/Box2dWeb-2.1.a.3.min', physicsService: jsSourceRoot + '/Box2dWebPhysics', renderingService: jsSourceRoot + '/Box2dWebDebugRendering'

define('canvas', document.getElementById("canvas"));
define('drawScale',  50.0);

// Start the main app logic.
function   (game) {

Does that give enough info?  The complete source code is at 685c64f.

Why would the build process delete a file it didn't create?  Am I doing something invalid / unsupported?