Skip to content
This repository has been archived by the owner on Apr 26, 2019. It is now read-only.

Commit

Permalink
Resolved lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jjvilleg committed Mar 22, 2018
1 parent 4f3d549 commit 692c8fd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions generator-liberty/lib/assert.liberty.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,15 @@ function AssertLiberty() {
check.content('wlp-webProfile7:' + libertyVersion);
}
if (buildType === 'maven') {
const groupId = 'com.ibm.websphere.appserver.runtime';
const artifactId = 'wlp-webProfile7';
const groupId = escapeStringRegexp('com.ibm.websphere.appserver.runtime');
const artifactId = escapeStringRegexp('wlp-webProfile7');
const version = escapeStringRegexp(libertyVersion);

const content = '<assemblyArtifact>\s*<groupId>' + groupId + '</groupId>\s*<artifactId>' + artifactId + '</artifactId>\s*<version>' + libertyVersion + '</version>\s*<type>zip</type>\s*</assemblyArtifact>';
const exp = escapeStringRegexp(content);
const content = '<assemblyArtifact>\\s*<groupId>' + groupId + '</groupId>\\s*<artifactId>' + artifactId + '</artifactId>\\s*<version>' + version + '</version>\\s*<type>zip</type>\\s*</assemblyArtifact>';

console.log("expression: " + exp);
const regex = new RegExp(exp);
console.log("expression: " + content);
const regex = new RegExp(content);
check.content(regex);
}
}

Expand Down

0 comments on commit 692c8fd

Please sign in to comment.