File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes m2Eclipse + Nexus deploy:deploy problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "m2Eclipse + Nexus deploy:deploy problem" Watch "m2Eclipse + Nexus deploy:deploy problem" New topic
Author

m2Eclipse + Nexus deploy:deploy problem

C Gamache
Greenhorn

Joined: Jan 13, 2010
Posts: 6
Hey folks, I'm new to Maven and Nexus. Hopefully someone has traveled this road before and can help me figure out where I'm going wrong.

We have a library that we used to package into a Jar and distribute. We're moving to use Maven to manage our dependencies. This library is a private library, but widely distributed within our organization. Maven's perfect for this. So, I set up Nexus, have it proxying the large public repos, and we planned on using Maven to manage the build and deploy our private libraries.

So, I create the pom file, and run deploy:deploy. The JAR builds and uploads into the repository. I can see it and it's metadata in the "Browse Storage" tab. It has a funny "M" on the folder. But! When I look at it under the "Browse Index" tab, there's nothing in the folder. It's empty. Same funny "M" icon on the folder.

I've looked and googled and played around and I can't figure out what the problem is.




[Thumbnail for browse.png]

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi there and welcome to Javaranch! Have you got the Nexus repo setup to be a Maven 2 non SNAPSHOT repo? Also check when you deploy, you should actually see the files getting uploaded.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
C Gamache
Greenhorn

Joined: Jan 13, 2010
Posts: 6
Martijn Verburg wrote:Hi there and welcome to Javaranch! Have you got the Nexus repo setup to be a Maven 2 non SNAPSHOT repo? Also check when you deploy, you should actually see the files getting uploaded.


Thank you!

Yes on both accounts. A hosted, Maven 2, non-Snapshot (Release) repo. I do see the files get uploaded:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building ADDStandardLib
[INFO] task-segment: [deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\ework\ADDStandardLib\src\main\resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\ework\ADDStandardLib\src\test\resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] No tests to run.
[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar: C:\ework\ADDStandardLib\target\ADDStandardLib-5.0.2.jar
[INFO] [install:install {execution: default-install}]
[INFO] Installing C:\ework\ADDStandardLib\target\ADDStandardLib-5.0.2.jar to C:\Users\CG\.m2\repository\ADDStandardLib\ADDStandardLib\5.0.2\ADDStandardLib-5.0.2.jar
[INFO] [deploy:deploy {execution: default-deploy}]
Uploading: http://localhost:8081/nexus/content/repositories/releases/ADDStandardLib/ADDStandardLib/5.0.2/ADDStandardLib-5.0.2.jar
661K uploaded (ADDStandardLib-5.0.2.jar)
[INFO] Retrieving previous metadata from releases
[INFO] Uploading repository metadata for: 'artifact ADDStandardLib:ADDStandardLib'
[INFO] Uploading project information for ADDStandardLib 5.0.2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Thu Jan 14 07:56:12 EST 2010
[INFO] Final Memory: 11M/21M
[INFO] ------------------------------------------------------------------------

Brian E Fox
Greenhorn

Joined: Jan 14, 2010
Posts: 3
Hi there, You should do "mvn deploy" to invoke the lifecycle, not mvn "deploy:deploy" which only invokes the deploy plugin directly. Looking at your screenshots, the browse storage view looks fine, and yes there should be something in the index. Is it possible you checked the index view too quickly (the index is asynchronous and might take a few seconds). If you're still having trouble, we can help you easier on the nexus-user list (nexus-user-subscribe@sonatype.org)

--Brian
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

And welcome to Javaranch Brian Fox! A pleasure to have one of the Maven committers join us here .
C Gamache
Greenhorn

Joined: Jan 13, 2010
Posts: 6
Brian E Fox wrote:Hi there, You should do "mvn deploy" to invoke the lifecycle, not mvn "deploy:deploy" which only invokes the deploy plugin directly. Looking at your screenshots, the browse storage view looks fine, and yes there should be something in the index. Is it possible you checked the index view too quickly (the index is asynchronous and might take a few seconds). If you're still having trouble, we can help you easier on the nexus-user list (nexus-user-subscribe@sonatype.org)


Yup. There's my my lack of Maven experience kicking in. I misspoke. My goal was plain ol' "deploy", not "deploy:deploy" ... The index has been marinading all night, and I've even tried rebuilding indexes and metadata to no avail. So, per your suggestion I'll move my question over to the nexus-user list!

To all the forum participants: thanks for being so friendly! That's hard to come by nowadays.

TTFN!
Brian E Fox
Greenhorn

Joined: Jan 14, 2010
Posts: 3
Just for giggles could you make the artifactid all lowercase and see if that helps? I would recommend this as a best practice regardless.
C Gamache
Greenhorn

Joined: Jan 13, 2010
Posts: 6
Brian E Fox wrote:Just for giggles could you make the artifactid all lowercase and see if that helps? I would recommend this as a best practice regardless.


Good hunch. That worked. Wow! I'll relay to the other list.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: m2Eclipse + Nexus deploy:deploy problem