allegro / grunt-maven-plugin

Grunt + Maven integration done right
Other
213 stars 32 forks source link

not resolving exploded war dir correctly #94

Closed mozeq closed 9 years ago

mozeq commented 9 years ago

Hi, I'm trying to use this plugin in my jenkins setup and it seems like there is some bug in resolving the exploded war dir:

this is the output of grunt default --verbose:

-> Maven exploded WAR directory: /var/lib/jenkins/sharedspace/ejobin/target/resources/js

and this is the content of grunt-maven.json:

{
    "filesToWatch": "/var/lib/jenkins/sharedspace/ejobin/src/main/webapp/resources/js/**",
    "directoryToWatch": "/var/lib/jenkins/sharedspace/ejobin/src/main/webapp/resources/js",
    "projectRootPath": "/var/lib/jenkins/sharedspace/ejobin",
    "targetPath": "/var/lib/jenkins/sharedspace/ejobin/target",
    "sourceDirectory": "src/main/webapp",
    "jsSourceDirectory": "resources/js",
    "warTargetDirectory": "ejobin/resources/js/",
    "filteredFiles": ["**/node_modules.tar"]
}

if I'm reading the code correctly then this:

var mavenDistPath = path.resolve(path.join(mavenProperties.targetPath, config.warName, mavenProperties.warTargetDirectory));

should result in:

 /var/lib/jenkins/sharedspace/ejobin/target/ejobin/resources/js

which is what I'm trying to achieve, but the 'ejobin' before 'resources' is missing

mozeq commented 9 years ago

It's a bug in version 1.1.0 which doesn't respect the warTargetDirectory, but uses the jsSourceDirectory instead. It seems to be fixed in 1.2.0.