Yep, Eclipse + Maven again. The horror, the suckage, the demoralization. "Importing Maven projects (Cancel Requested)" again. What. Is. It. Doing? Why. Doesn't. It. Cancel? Although. There. Is. No. Network. Activity? Make It Stop. Or. Please. Kill. Me.
(Update: solution found, see below.)
---
Oh, this is a new one: since the import didn't succeed, it seems the project wasn't added to the project list; as was apparent after restarting the Eclipse. But the pom.xml was still open. Though not quite; get this: it seems unable to show me the source code without the project. Well, possibly because that's the last 'tab', and maybe if one of the earlier (more to the left) tabs fails to load, it doesn't try the rest of the tabs.
And how about this error: "Can't load model L/backend-core-jar/pom.xml". What's an 'L'?
---
Ok, so another repugnant E&M episode has been overcome. Solution: commented out a repository that one might suspect does not work so well any more.
Now, it would be nice to be able to run a check to see if the project can now be imported with this repository removed, but without re-running the whole maven download process.
Software development woes. Java-based development in particular. Also, philosophizing, architecture, design.
Showing posts with label repository. Show all posts
Showing posts with label repository. Show all posts
Monday, February 25, 2013
Wednesday, November 21, 2012
Learning to Deploy (Maven)
I am in the process of learning how to do public deploys with maven; for instance, to publish java library artifacts. Uploading to AWS S3 would be nice, but one step at a time.
I found no 'deploy' menu item in Eclipse's Maven menus. So I made a nice little script:
(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:
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.
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.
Artifactory Online: Reviewlet
Reviewlet of Artifactory Online.
Home Url: https://secure.artifactoryonline.com/
Sign-Up: easy, but a bit too much filling in of forms. And either there's a glitch, or I mistyped something: the first confirmation mail didn't get back, so I had to add a '2' to the chosen domain, as it was reported as taken. Oh well.
Clicking confirmation link brought me in to the setup process, very simple, a bit slow; but from an implementor viewpoint I can see that it may be hard to keep a pool of fired-up instances ready.
I managed to snap these screenshot during the automatic process:
Done.
Next comes the finding-your-way. I dabbled with Nexus and Artifactory a few years back, so I recognize some of the repo naming schemes. But even thinking a bit, I must confess that I don't remember really fully understanding the scheme.
I am looking to have two 'permissions' of repos, one publicly available, and one for internal libraries. Well, actually, only the public one is really needed. So how do you do such a thing? Not immediately obvious if it is part of the factory set-up or not.
----
Ok, so an unexpected item in the review: finding-your-way-back-to-the-app. Can't seem to find a link from the main page. So I guess browser history, or find the confirmation email in the email history.
----
The repository search browser is pretty nice; I like to have this comprehensive data available like this:
Here, to the left (in this partial screenshot) you can see the list of repos. None of these seem to be the one I am looking for: publicly released artifacts. All these repo names end in '-local'. I suppose the name I am looking for would along the lines of 'libs-releases-public' (and perhaps 'libs-snapshots-public'). Isn't that a common enough usage that the default setup might want to include one?
----
The search I can only presume that it works, since all the shown repos seem to be empty. Maybe the repo1-cache contains something to search for...no. Even such a general pattern as "*X*" finds nothing. I can't get a clue as to why. Possibly they are all empty. One has to click the 'Show...' link as seen in the screenshot to get that number, unfortunately. In each selected one -- not very generous.
----
[TBD-M]
Home Url: https://secure.artifactoryonline.com/
Sign-Up: easy, but a bit too much filling in of forms. And either there's a glitch, or I mistyped something: the first confirmation mail didn't get back, so I had to add a '2' to the chosen domain, as it was reported as taken. Oh well.
Clicking confirmation link brought me in to the setup process, very simple, a bit slow; but from an implementor viewpoint I can see that it may be hard to keep a pool of fired-up instances ready.
I managed to snap these screenshot during the automatic process:
Done.
Next comes the finding-your-way. I dabbled with Nexus and Artifactory a few years back, so I recognize some of the repo naming schemes. But even thinking a bit, I must confess that I don't remember really fully understanding the scheme.
I am looking to have two 'permissions' of repos, one publicly available, and one for internal libraries. Well, actually, only the public one is really needed. So how do you do such a thing? Not immediately obvious if it is part of the factory set-up or not.
----
Ok, so an unexpected item in the review: finding-your-way-back-to-the-app. Can't seem to find a link from the main page. So I guess browser history, or find the confirmation email in the email history.
----
The repository search browser is pretty nice; I like to have this comprehensive data available like this:
Here, to the left (in this partial screenshot) you can see the list of repos. None of these seem to be the one I am looking for: publicly released artifacts. All these repo names end in '-local'. I suppose the name I am looking for would along the lines of 'libs-releases-public' (and perhaps 'libs-snapshots-public'). Isn't that a common enough usage that the default setup might want to include one?
----
The search I can only presume that it works, since all the shown repos seem to be empty. Maybe the repo1-cache contains something to search for...no. Even such a general pattern as "*X*" finds nothing. I can't get a clue as to why. Possibly they are all empty. One has to click the 'Show...' link as seen in the screenshot to get that number, unfortunately. In each selected one -- not very generous.
----
[TBD-M]
Labels:
artifactory,
cloud,
maven,
online,
repo,
repository,
reviewlet
Subscribe to:
Posts (Atom)


