-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
d83c25c
commit e4332f3
Showing
5 changed files
with
106 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
invoker.goals = verify | ||
invoker.goals.1 = verify -Pyaml | ||
invoker.goals.2 = verify -Pproperties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,76 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@[email protected]</artifactId> | ||
<version>@project.version@</version> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>scan</goal> | ||
<goal>analyze</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<yaml> | ||
jqassistant: | ||
store: | ||
# used | ||
uri: file:target/custom-store | ||
analyze: | ||
# overwritten by .jqassistant.yml | ||
groups: | ||
- plugin-execution-configuration | ||
</yaml> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>scan</goal> | ||
<goal>analyze</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
</project> | ||
<profiles> | ||
<profile> | ||
<id>yaml</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<configuration> | ||
<yaml><![CDATA[ | ||
jqassistant: | ||
store: | ||
# used | ||
uri: file:target/custom-store-yaml | ||
analyze: | ||
# overwritten by .jqassistant.yml | ||
groups: | ||
- plugin-execution-configuration | ||
report: | ||
properties: | ||
xml.report.file: target/jqassistant/jqassistant-report-yaml.xml | ||
]]> | ||
</yaml> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>properties</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<configuration> | ||
<properties> | ||
<jqassistant.store.uri>file:target/custom-store-properties</jqassistant.store.uri> | ||
<jqassistant.analyze.groups>plugin-execution-configuration</jqassistant.analyze.groups> | ||
<jqassistant.analyze.report.properties.xml.report.file>target/jqassistant/jqassistant-report-properties.xml</jqassistant.analyze.report.properties.xml.report.file> | ||
</properties> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
assert !new File(basedir, "target/jqassistant/store").exists() | ||
verifyProfile("yaml") | ||
verifyProfile("properties") | ||
|
||
private void verifyProfile(profileName) { | ||
// config from plugin execution configuration (embedded YAML) | ||
assert new File(basedir, "target/custom-store").exists() | ||
assert new File(basedir, "target/custom-store-" + profileName).exists() | ||
|
||
// config from project configuration (.jqassistant.yml) | ||
def reportFile = new File(basedir, 'target/jqassistant/jqassistant-report.xml') | ||
assert reportFile.exists() | ||
def jqassistantReport = new groovy.xml.XmlSlurper().parse(reportFile) | ||
assert jqassistantReport.group.size() == 2 | ||
def reportFile = new File(basedir, 'target/jqassistant/jqassistant-report-' + profileName + '.xml') | ||
assert reportFile.exists() | ||
def jqassistantReport = new groovy.xml.XmlSlurper().parse(reportFile) | ||
assert jqassistantReport.group.size() == 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters