Skip to content

Commit 772c5da

Browse files
committed
minor README change
1 parent 3a298b8 commit 772c5da

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,11 @@ $ jpm run --verbose debug # Passes '--verbose debug' to the run action
138138
Actions support several variable substitution features for cross-platform compatibility:
139139
140140
- **`{{deps}}`** - Replaced with the full classpath of all dependencies
141-
- **`{/}`** - Replaced with the file separator (`\` on Windows, `/` on Unix)
142-
- **`{:}`** - Replaced with the path separator (`;` on Windows, `:` on Unix)
141+
- **`{/}`** - Replaced with the file separator (`\` on Windows, `/` on Linux/Mac)
142+
- **`{:}`** - Replaced with the path separator (`;` on Windows, `:` on Linux/Mac)
143+
- **`{~}`** - Replaced with the user's home directory (The actual path on Windows, `~` on Linux/Mac)
143144
- **`{./path/to/file}`** - Converts relative paths to platform-specific format
144-
- **`{~/path/to/file}`** - Converts home directory paths to platform-specific format
145+
- **`{./libs:./ext:~/usrlibs}`** - Converts entire class paths to platform-specific format
145146
146147
Example with cross-platform compatibility:
147148
@@ -152,9 +153,11 @@ actions:
152153
test: "java -cp {{deps}}{:}{./target/classes} org.junit.runner.JUnitCore TestSuite"
153154
```
154155
155-
### Performance Optimization
156+
NB: The `{{deps}}` variable substitution is only performed when needed - if your action doesn't contain `{{deps}}`, jpm won't resolve the classpath, making execution faster for simple actions that don't require dependencies.
156157
157-
The `{{deps}}` variable substitution is only performed when needed - if your action doesn't contain `{{deps}}`, jpm won't resolve the classpath, making execution faster for simple actions that don't require dependencies.
158+
NB2: These actions are just a very simple convenience feature. For a much more full-featured cross-platform action runner I recommend taking a look at:
159+
160+
- [Just](https://github.com/casey/just) - Just a command runner
158161
159162
## Installation
160163
@@ -199,8 +202,8 @@ Commands:
199202
dependencies to the target directory while at the same time
200203
removing any artifacts that are no longer needed (ie the ones
201204
that are not mentioned in the app.yml file). If no artifacts
202-
are passed the app.yml file will be left untouched and only
203-
the existing dependencies in the file will be copied.
205+
are passed the app.yml file will be left untouched and only the
206+
existing dependencies in the file will be copied.
204207
205208
Example:
206209
jpm install org.apache.httpcomponents:httpclient:4.5.14
@@ -212,6 +215,18 @@ Commands:
212215
213216
Example:
214217
jpm path org.apache.httpcomponents:httpclient:4.5.14
218+
219+
do Executes an action command defined in the app.yml file. Actions
220+
can use variable substitution for classpath.
221+
222+
Example:
223+
jpm do build
224+
jpm do test
225+
226+
clean Executes the 'clean' action as defined in the app.yml file.
227+
build Executes the 'build' action as defined in the app.yml file.
228+
run Executes the 'run' action as defined in the app.yml file.
229+
test Executes the 'test' action as defined in the app.yml file.
215230
```
216231
217232
## Development

src/main/java/org/codejive/jpm/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ public Integer call() throws Exception {
320320
@Command(
321321
name = "do",
322322
description =
323-
"Executes an action command defined in the app.yml file. Actions can use variable substitution for classpath.\n\n"
324-
+ "Example:\n jpm do build\n jpm do test\n")
323+
"Executes an action command defined in the app.yml file.\n\n"
324+
+ "Example:\n jpm do build\n jpm do test --arg verbose\n")
325325
static class Do implements Callable<Integer> {
326326
@Mixin DepsMixin depsMixin;
327327
@Mixin QuietMixin quietMixin;

0 commit comments

Comments
 (0)