Friday, April 13, 2007

Fuse Tutorial: Dumb Stuff I Did (Chapter 2)

Okay, so this was dumb too, but at least I was able to figure out what I screwed up. After figuring out the first dumb mistake I ran the Maven2 install on the PricingAssembly project and got this:
[ERROR] project-execute :
com.mycompany:PricingAssemply:jbi-service-assembly:1.0-SNAPSHOT
( task-segment: [install] )
Diagnosis: Missing:
----------
1) com.mycompany:PricingService:jar:1.0-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.mycompany -DartifactId=PricingService \
-Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

Path to dependency:
1) com.mycompany:PricingAssemply:jbi-service-assembly:1.0-SNAPSHOT
2) com.mycompany:PricingService:jar:1.0-SNAPSHOT

Early in the tutorial, when I created the PricingService, I poked around and looked at the pom.xml. I noticed the groupId element had the value "com.mycompany" . I decided to get tricky and changed it to "MY" company (com.chariotsolutions) and promptly forgot about it. I did not change the groupId element on the PricingHttp project's pom and, more importantly, I used "com.mycompany" as the groupId entries for both PricingHttp and PricingService in the pom for the PricingAssemply.

This meant that my PricingService got created in the "$HOME\.m2\repository\com\chariotsolutions" directory but the Maven build for the PricingAssembly was looking for it in "$HOME\.m2\repository\com\mycompany".

So I went back to the PricingService project pom, changed "com.chariotsolutions" back to "com.mycompany", ran install on the PricingService project, ran install on the PricingAssembly project, ran publish on the server and then, finally, all was well.

0 comments: