[ 
http://issues.ops4j.org/browse/PAXCONSTRUCT-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633#action_12633
 ] 

mcculls commented on PAXCONSTRUCT-116:
--------------------------------------

Maven only provides a few ways to pass lists/arrays of strings and the one we 
chose was:

  <provision>
    <param>sample</param>
    <param>option</param>
    <param>list</param>
  <provision>

  http://maven.apache.org/guides/plugin/guide-java-plugin-development.html

which Maven maps to { "sample", "option", "list" } for the provision mojo 
parameter - note
that you can actually use any word for the tags inside <provision> we just 
happen to use
"param" as a convention - this format means you can configure any Pax-Runner 
setting
without the pax-plugin needing to know what settings are valid.

supporting a format like:

  <args>
    <workingDirectory>${project.build.directory}/runner</workingDirectory>
    <clean>true</clean>
  </args>

is possible if we use a Map parameter - but then you would potentially lose 
ordering and
the ability to set multiple entries for the same setting.

similarly supporting:

  <bundles>
    <bundle>mybundle</bundle>
  </bundles>

is possible by using another List parameter - although perhaps <scanners> would 
be a
better option, as you're actually telling pax-runner to scan a folder here 
rather than deploy
a specific artifact

one thing I definitely don't want to do is hard-code in-depth knowledge about 
pax-runner
settings inside the pax-plugin - we must also continue to support existing 
configurations

> Better way of configuring command line arguments in the pom
> -----------------------------------------------------------
>
>                 Key: PAXCONSTRUCT-116
>                 URL: http://issues.ops4j.org/browse/PAXCONSTRUCT-116
>             Project: Pax Construct
>          Issue Type: Improvement
>          Components: maven-pax-plugin
>    Affects Versions: 1.4
>            Reporter: Richard Wallace
>            Assignee: 
>             Fix For: 1.5
>
>
> To pass custom arguments to pax runner you need to do something like
> {code}
>       <plugin>
>         <groupId>org.ops4j</groupId>
>         <artifactId>maven-pax-plugin</artifactId>
>         <version>1.4</version>
>         <configuration>
>           <provision>
>             
> <param>--workingDirectory=${project.build.directory}/runner</param>
>             <param>--clean=true</param>
>             <provision>mybundle</provision>
>           </provision>
>         </configuration>
>       </plugin>
> {code}
> I only found this out by random chance looking at other project poms.  It 
> would be much clearer if the configuration could be more along the lines of
> {code}
>       <plugin>
>         <groupId>org.ops4j</groupId>
>         <artifactId>maven-pax-plugin</artifactId>
>         <version>1.4</version>
>         <configuration>
>           <args>
>             
> <workingDirectory>${project.build.directory}/runner</workingDirectory>
>             <clean>true</clean>
>           </args>
>           <bundles>
>             <bundle>mybundle</bundle>
>           </bundles>
>         </configuration>
>       </plugin>
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.ops4j.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to