#Maven CLI Invocation

1 messages · Page 1 of 1 (latest)

proven helm
#

This is a super quick question about Maven, not spigot, apologies for the wrong place.

The tutorial I followed suggested I use Build Artifacts, which work great (and generate the .jar perfectly), but I'd like to automate this, can I somehow debug and see the commands that the "Build Artifacts" button on IntelliJ is doing?

proper lintel
#

So you want it to automaticually export the jar file without clicking the run button?

#

or just see the build command

twilit drift
#

Chances are you do not want to use the "Build artifacts" feature of IJ, if that is the question

#

Using mvn package (if maven is installed) produces a jar in the target directory, with some minor bash scripting you could automate everything else that is necessary

proven helm
#

Thanks for the responses guys, can I ask why the Build Artifacts is bad? @twilit drift

#

Also, I believe Maven is installed, but mvn commands don't work, so I think I need to add to path?

twilit drift
#

Yeah, it needs to be added on the path. IJ's artifacts feature is dangerous because it does not fully hook into the buildsystem. Especially shading may be of a concern. However, for simple projects with no dependencies that need to be included at runtime (with modern spigot you actually can use the libraries feature to make life simpler on that front) and no other transformation logic this feature can be fine, but you must be aware that there are cases where it isn't on-par with what maven offers