After having a problem with
Ant I was encouraged by people here to move to Maven, it seems very slick and everything works in Netbeans which I use to generate my code.
I tend to have a development area where I build and
test and a folder call JRun which holds the current executables.
What I want to do now is copy the executables across from the development area to the JRun folder so I can call them from Task Scheduler, buttons and other scripts.
How do I get Maven to build the JAR files and copy them across to the JRun directory. I don't want to do this every time I build it in the development area as I may not want to put it in the run area until I've tested it fully.
I have one central library and several other files which depend on that, my test case is a project called Slicer.
This is the batch file I have written to copy across the files, it is run in the JRun directory:
It builds the Central.jar fine and copies it properly to the JRun directory renaming it to Central.jar but then it fails to build the Slicer.jar saying:
[ERROR] Failed to execute goal on project Slicer: Could not resolve dependencies for project com.mycompany:Slicer:jar:1.0-SNAPSHOT: Could not find artifact com.mycompany:Central:jar:1.0-SNAPSHOT
At first I thought it was because I renamed it, but I let it copy the whole name including the snapshot bit and it still failed.
I don't want to have to build each project from Netbeans (that's a pain) I just want to run the batch file and have it copy the current version of everything to the JRun directory, preferably with names not including the snapshot bits. I only want to do this when I'm ready so I don't want to put it in the POM which makes it do it every time.