-
Notifications
You must be signed in to change notification settings - Fork 353
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
Provide mechanism for configuring custom plugins #190
Comments
All tool classpath plugins now accept a Properties object to their factory method. Custom properties can now be set within a nested configuration section of the pitest config via maven. <plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>LATEST</version>
<configuration>
<targetClasses>
<param>com.your.package.root.want.to.mutate*</param>
</targetClasses>
<configuration>
<foo>valueneededbyplugin</foo>
</configuration>
</configuration>
</plugin> Open questions
@szpak Any thoughts/preferences for how this is handled? Is the gradle plugin still implemented in terms of the command line tool? |
Let me comment on your open questions:
where the first = will be the separator for key and value (thus = may not be used in configuration property keys) |
Configuration would most likely be serialised as part of the existing SlaveArguments class which shouldn't cause any OS specific problems.
Your suggests for 3) sounds reasonable. I'd be kean to get @szpak input as it may affect the gradle plugin. |
The Gradle plugin under the hood still calls command line PIT, so it would be best (also for the Ant plugin) to allow to configure custom plugins with a command line tool. The proposed configuration looks ok for me. Assuming that plugin configuration elements are in fact a Properties object the most suitable would be probably to use Groovy map syntax in the Gradle configuration:
As a custom plugin author could encode lists or other data structures inside the One remark. In the call example proposed by @KyleRogers there is key/value pairs are quoted. Other PIT parameters (like |
Easiest syntax to support using JOptSimple was
So almost as suggested by @KyleRogers, but without quoting. Does anyone see any major issues with this? |
Btw, is there a recommended name convention for plugin configuration parameters? A plugin name prefix? Fully qualified plugin name prefix? To reduce a chance to make conflicts. |
@szpak I'd suggest pick a simple name for the plugin and use that as a prefix. |
Closing a this functionality now provided by feature strings. |
Custom plugins are can currently only be configured by the built in properties, or by environment variables.
A mechanism is required whereby they can be passed free form options e.g as a Java properties object.
The text was updated successfully, but these errors were encountered: