The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

pcroser (21) [Avatar] Offline
#1
Reading this information on page 40

Now we are ready to run the example. Go to the chapter2/spring directory in the book's source and run this Maven command:
mvn clean compile camel:run

which should run the spring example for configuring a camel context in spring but which actually produces the following Maven issue


Missing:
----------
1) net.sourceforge.cglib:com.springsource.net.sf.cglib:jar:2.1.3

No where is this dependency defined in any camelinactionsource pom file, so I am unclear as to where this error is being fired from.

Could be old maven version I am using 1 Maven 2.0.9

for artifact:
org.apache.camel:camel-maven-plugin:maven-plugin:2.4.0


I could download the file I found at source forge and install it in my local repo, but that is a bandage.

Any help would be appreciated.
davsclaus (413) [Avatar] Offline
#2
Re: Failure to run example on page 40 spring camel context
Do you use the latest code?

Jonathan created a new ZIP file for download?
janstey (72) [Avatar] Offline
#3
Re: Failure to run example on page 40 spring camel context
Yeah, I'm curious if the code is new as well... it should be using Camel version 2.5-SNAPSHOT but when you run it, it is using version 2.4.0

org.apache.camel:camel-maven-plugin:maven-plugin:2.4.0

Best use Maven version 2.2.1 as well since that is what we recommend in the book.

Also, after getting the latest code for the zip or svn, you may want to clear out the old book source artifacts in your local Maven repo:

rm -rf ~/.m2/repository/com/camelinaction

Let us know if you continue to have problems.

Cheers,
Jon
pcroser (21) [Avatar] Offline
#4
Re: Failure to run example on page 40 spring camel context
Steps completed before trying again.

1] Obtained a new zip file with source code = camelinaction-source-oct15-2010.zip

2] unzip file

3] upgraded maven to 2.2.1 distribution

4 check mvn -version = Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)

5] navigate to ../../camelinaction-source/chapter2/spring

6] mvn clean compile camel:run

Received the following errror

Reason: POM 'org.apache.camel:camel-maven-plugin' not found in repository: Unable to download the artifact from any repository

org.apache.camel:camel-maven-plugin:pom:2.5-SNAPSHOT

I can see the defned plugin defined in the pom.xml

<!-- Allows the routes to be run via 'mvn camel:run' -->
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
</plugin>
</plugins>

Version is defined in the parent pom as
<camel-version>2.5-SNAPSHOT</camel-version>

Is this accurate??
janstey (72) [Avatar] Offline
#5
Re: Failure to run example on page 40 spring camel context
Yes, that looks correct. When we update the source to Camel version 2.5.0 (which is under a vote to release right now) this example will work.

I put in a workaround for you until then which you can find in an updated zip
http://code.google.com/p/camelinaction/downloads/detail?name=camelinaction-source-oct18-2010.zip

Cheers,
Jon
pcroser (21) [Avatar] Offline
#6
Re: Failure to run example on page 40 spring camel context
Still receive the same error

Reason: POM 'org.apache.camel:camel-maven-plugin' not found in repository: Unable to download the artifact from any repository

org.apache.camel:camel-maven-plugin:pom:2.5-SNAPSHOT
janstey (72) [Avatar] Offline
#7
Re: Failure to run example on page 40 spring camel context
Make sure to clear out your old Camel in Action artifacts like

rm -rf ~/.m2/repository/com/camelinaction

since we are using a release version (1.0) in the poms, Maven is a little less dynamic about getting updated poms.
pcroser (21) [Avatar] Offline
#8
Re: Failure to run example on page 40 spring camel context
Situation resolved. On a previous project using maven I had placed in my maven settings.xml file
1] a restrictive mirror that was stopping the downloading of artifacts
2] a local repository different from ~/.m2

This was causing the issues. Sorry for the false alarms and thanks for taking the time to answer my concerns.

Have a Great Day.
janstey (72) [Avatar] Offline
#9
Re: Failure to run example on page 40 spring camel context
Ah great. Thanks for letting me know.

And it was only some false alarms... there were actually problems there smilie

Cheers,
Jon