Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2
This is the forum to discuss the Wrox book Beginning Spring Framework 2 by Thomas Van de Velde, Bruce Snyder, Christian Dupuis, Sing Li, Anne Horton, Naveen Balani; ISBN: 9780470101612
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 25th, 2008, 08:11 AM
Registered User
 
Join Date: Feb 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exec plugin not found

Hi there,

This is probably a really odd question, but I just can't get the very first examples working. I really don't know anything about Maven, and am faced with this:

C:\spring1\src\chapter1\monolithic>mvn exec:java -Dexec.mainClass=com.wrox.begsp
ring.CalculateSpring -Dexec.args="300 3"
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-exec-plugin' does not exist or
 no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Feb 25 12:27:27 GMT 2008
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------

when I try to run the examples from the first chapter in the book (although they compile fine). Maven seems to be configured correctly, but do I need to add more default repositories or something? I've been surprised to not find any other posts of this problem, did other people manage to run the examples without any trouble?

Thanks for any help!
  #2 (permalink)  
Old February 25th, 2008, 06:09 PM
Registered User
 
Join Date: Feb 2008
Location: Brookline, MA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm encountering the same issue on a freshly installed system. Just grabbed Maven - and figured an easy way to test it would be by using the Beginning Spring Framework 2 examples. Odd thing is - I've installed Maven in exactly the same way as I did before (last week - same OS, etc.) and it just worked...

Perhaps someone pulled the "exec" plug-in from the central Maven repository? If so, that's a pretty egregious issue to have with a build tool. I suppose if I had a local cache on my fresh install then I'd be all set. And other systems that already have Maven installed, and have used the exec plug-in before should also be all set.

Too much voodoo.

  #3 (permalink)  
Old February 27th, 2008, 07:33 AM
Registered User
 
Join Date: Feb 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

I had the same problem and found a solution on the web.

try to fully specify the plugin on the command line. That should make sure that maven downloads the right plugin:

mvn org.codehaus.mojo:exec-maven-plugin:exec
  #4 (permalink)  
Old February 27th, 2008, 01:27 PM
Registered User
 
Join Date: Feb 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for that. I eventually managed to get it running by downloading the plugin from mojo.codehaus.org to my Maven lib directory, but I'm guessing the qualified name would be the 'right' way. Maybe it dropped out of the latest release by accident.

I needed the latest version, a beta release, as previous versions wouldn't pass through the arguments on the command line. It's kinda frustrating but I guess at least I got my hands dirty with Maven.

  #5 (permalink)  
Old March 2nd, 2008, 05:57 PM
gxp gxp is offline
Registered User
 
Join Date: Dec 2007
Location: Wilmington, DE, .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks folks. I got the same build error, and got it to work by doing what mkeehan suggested. Downloaded

exec-maven-plugin-1.1-beta-1.jar

to the maven lib dir.

The exec got alot further this time, but...
Persisting User = user1
Persisting User
User = This is my album
java.sql.SQLException: Table not found in statement [insert into album_sequence values (null)]

Sounds like a source code problem. Yes, this is getting to be a bit frustrating. There seems to be alot of bugs in this book.

-Greg


  #6 (permalink)  
Old March 3rd, 2008, 10:33 AM
Registered User
 
Join Date: Feb 2008
Location: , , Belgium.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1. maven-exec-plugin issue : I resolved it this way
a) Build and Install the plugin: (from http://jwebunit.sourceforge.net/building-maven.html)

svn co https://svn.codehaus.org/mojo/trunk/...-maven-plugin/
cd exec-maven-plugin
mvn clean install

Perhaps a little overwhelming but actually quite easy and fast (you will need svn installed @ http://subversion.tigris.org/project_packages.html)

b) The command line is incorrect in the book; the one below is working for me:

mvn exec:java -Dexec.mainClass=com.wrox.begspring.Calculate -Dexec.args="3000 3"

The error is subtle and lies in how to set the properties - perhaps is this a change in versions; this you can check for the latest version @ http://mojo.codehaus.org/exec-maven-plugin/usage.html



Similar Threads
Thread Thread Starter Forum Replies Last Post
need struts plugin for eclipse desukishore BOOK: Professional Jakarta Struts 1 June 9th, 2006 04:03 PM
Audio Plugin itHighway Classic ASP Basics 1 December 12th, 2005 02:53 PM
Creating Struts Plugin crystal123 BOOK: Professional Jakarta Struts 1 November 21st, 2005 05:58 PM
Audio Plugin itHighway Classic ASP Components 1 January 31st, 2005 01:20 PM
getdatasource in plugin ashok BOOK: Professional Jakarta Struts 0 July 1st, 2004 03:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.