mojohaus / mojohaus/exec-maven-plugin
Multi-argument parameter handling
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 191
- Forks
- 111
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
I am attempting to add a user configurable multi-argument parameter to an exec-maven-plugin invocation in the verify phase of my project. However, the multi-argument parameter is always attached to the Apache CommandLine object as a single argument (with escaping so it goes that way into the command).
What I would like to be able to do is this:
<configuration>
<executable>java</executable>
<workingDirectory>${project.basedir}/src/test/features</workingDirectory>
<arguments>
<argument>...</argument>
<argument>-classpath</argument>
<classpath/>
<argument>cucumber.api.cli.Main</argument>
<argument>...</argument>
<argument>${cuke.files}</argument>
</arguments>
</configuration>
And have the execution pass the cuke.files variable as multiple arguments on the command line to the executing command.
However, if I pass a multi-argument (space separated) value into the cuke.files variable in Maven, the CommandLine goes as one parameter escaping the spaces.
Is there a way to achieve this functionality with the current version of the plugin, and if so, how do I do it? Or, if that functionality is not handled today and I put together a pull request for splitting on spaces in an argument, would someone be willing to merge it into the mainline?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the exec-maven-plugin maps the configuration and the cuke.files property into the Apache CommandLine object during the verify-phase invocation. No source file or test is named, so first locate that argument-handling entry point; done means the supported behavior is decided and verified for both separate argument elements and a space-separated property value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100