I found no 'deploy' menu item in Eclipse's Maven menus. So I made a nice little script:
I have found it to be a nice pedagogical tool. It's of course not much different from doing it manually but it saves work. I've put it in a 'mvn-deploy.command' file next to the 'pom.xml', which also makes for quick deploys -- it's just a double-click to start from inside Eclipse (provided you set the 'executable' property/flag under Properties); no having to navigate to the right directory in the terminal.cd $(dirname $0)ls -lecho -----------------------------------echo deploying...echo -----------------------------------mvn javadoc:jar deployecho -----------------------------------echo deploy script done.echo -----------------------------------echoecho -----------------------------------echo damage report...echo -----------------------------------find /tmp/maven-tmp-repoecho -----------------------------------echo now back to your regular shell, see you later.echo -----------------------------------$SHELL
(Btw, why doesn't Eclipse have a 'Open Folder In Shell/Terminal'. Or maybe it does, somewhere. Do tell!)
The 'ls -l' at the start is just for context. The 'find' at the end lists all files in the makeshift repository. Yeah, almost forgot: you need something like this in your pom.xml:
Pardon the formatting. (EDIT: Shit, now it looks even worse: '& gt;' and all. Damn you, blogger editor. -- No wait, it looks ok in 'print'.)<distributionManagement><repository><id>local-tmp-repo</id><name>Temp Folder</name><url>file:///tmp/maven-tmp-repo</url></repository></distributionManagement>
So, you can now see in your terminal, or by inspecting the /tmp/ file system tree, how maven adds files like '/1.0-SNAPSHOT/maven-metadata.xml', 'pub-lib-1.0-20121121.203440-1.jar', 'pub-lib-1.0-20121121.205813-2-javadoc.jar', etcetera, without digging in to .m2 (these files are probably simply copies out of the .m2 local repo).
That's it, readers. I just might return with a post about the maven shapshot process, in very concrete terms.
No comments:
Post a Comment