-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run report with different configurations #320
Comments
I have tried it with 3 different plugin blocks, referencing the 3 copies of the script (with different params hardcoded). I have added to the executions block and that prevents the report output names from clashing within the same target folder. I still have a lot of duplication here that I'd like to clean up if possible. |
You can define different executions with different ids: <plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.15.6</version>
<configuration>
<oldVersion>
<file>
<path>${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging}</path>
</file>
</oldVersion>
<newVersion>
<file>
<path>${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging}</path>
</file>
</newVersion>
<parameter>
<!-- see documentation -->
</parameter>
</configuration>
<executions>
<execution>
<id>conf1</id>
<phase>verify</phase>
<goals>
<goal>cmp</goal>
</goals>
<configuration>
<postAnalysisScript>${project.basedir}/src/main/groovy/postAnalysisScript.groovy</postAnalysisScript>
</configuration>
</execution>
<execution>
<id>conf2</id>
<phase>verify</phase>
<goals>
<goal>cmp</goal>
</goals>
<configuration>
<postAnalysisScript>${project.basedir}/src/main/groovy/postAnalysisScript.groovy</postAnalysisScript>
</configuration>
</execution>
</executions>
</plugin> In this example I get two different files:
|
Yes, that kind of thing! That solves half the problem. If there was something like the following which added "myparam" to the environment or something that would be perfect. I'm just thinking allowed here. Are there any facilities like this?
|
Just for anyone following, those parameters are contained within configuration->parameter block. Like so:
|
I have written a groovy script that reduces all the changes down to only report changes across our 'special' annotations given our rules. This is all working.
A new requirement has come in to split the report into three: one for the public interfaces, one for the internal interfaces and the original one with everything. These 3 reports will go to different teams.
In the groovy script I have this at the top:
I am wondering what options are available to help? The simplest solution would be to make 3 copies of the groovy script one with true/true, one with true/false and one with false/true. Then have 3 separate maven plugin declarations each with a different html-path so they don't overwrite each other.
The docs mentions you can have extra executions so the output base name is based on the execution id, so can I pass parameters into the main script from the execution block to get my 3 different reports.
Or maybe trying to pass -Dblar=semi then read it with System.getenv() inside the script.
I'm just looking for a bit of advice on a cleaner way of doing this?
The text was updated successfully, but these errors were encountered: