-
Notifications
You must be signed in to change notification settings - Fork 3
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
Tool-Targets, that can use SBuild infrastructure, to provide easy cmdline tools #126
Comments
As an alternative to a special kind of target, a special marker commandline parameter comes to mind, which designates, that all following parameters will be feeded to the last given target, e.g. "sbuild mytool % arg1 arg2". An even more general aproach might be possible, that all arguments following a marker parameter are provided in the sbuild via a dedicated API. Comment imported from Redmine http://sbuild.tototec.de/sbuild/issues/126 |
Example, which works with current SBuild. Run Scalagen (a Java to Scala code converter) from SBuild. The Commandline: sbuild scalagen -D srcDir=src/main/java -D targetDir=target/scala The build file:
As one can see, to feed parameter to the tool, one need to use properties (same mechanism Maven uses, to run plugins from command line). sbuild scalagen % src/main/java target/scala Comment imported from Redmine http://sbuild.tototec.de/sbuild/issues/126 |
Comment imported from Redmine http://sbuild.tototec.de/sbuild/issues/126 |
After rethinking it, all required infrastructure is already in place. Instead of writing targets, one can simply write a scheme handler. A scheme handler has a name followed by a double colon ( To reuse the
For convenience, some support to parse and split the scheme path into arguments for the underlying tool might be useful, but are not required to accomplish the tool target mission. |
Tool targets should behave as normal target, but they should have some special handling for the sbuild commandline: When a tool target is given on commandline, all succeeding commandline arguments should be feeded to that tool.
Motivation: It is sometime difficult, to get arbitrary Java tools to work in various environments. In most cases, those tools are simply a standard Java main plus a classpath. SBuild provides the perfect infrastructure to provide the tool and the classpath of a tool, therefore, it is pretty easy, to use SBuild a tool hub and single commandline entry point for the developer.
Benefits:
Example commandline: @sbuild my-tool arg1-feeded-to-tool@
If SBuild will get an proper plugin system, it would be easy for plugins to provide tools targets.
Ticket imported form Redmine http://sbuild.tototec.de/sbuild
Original Redmine issue link: Redmine ID 126
Reporter: Tobias Roeser => @lefou
Creating date: 2013-05-29T19:57:16+02:00
Assigned to:
Start date: 2013-05-29
Due date:
Another issue #134 relates this issue.
The text was updated successfully, but these errors were encountered: