Does equivalent practice of package.json scripts from NPM exists in Java(maven)?

Viewed 25

I've been trying to find the equivalent of sctipts in NPM for Java and had no luck. Makes me wonder if it's even possible, but I assume it is, it's just probably very hard to find.

My main goal is to avoid my Readme.md file containing long commands, and would like very much to have something similar with npm scripts, which would trigger a certain line based on a certain keyword.

For example, I would like to create something like this:

"smoke" : "mvn clean test -Dsmoke="src/test/smokeSuite.xml""

or

"smoke" : "clean test -Dsmoke="src/test/smokeSuite.xml""

Which would then be run by a simple mvn smoke command. Is it possible?

0 Answers
Related