Hey guys,
I've been working with Wicket using Ant for the last year with no big
problems. However, I am now trying to get maven working so I can build a
quickstart to demonstrate a problem I'm having with AjaxFallbackButton.
Anyways, sorry for the extremely long post, but maven is just driving me
absolutely, completely nuts and would really appreciate any help on what I'm
doing wrong here.
I very much appreciate any help you guys can offer. The Wicket community is
really the best.
Thanks,
J
==========================================================================
This part seemed to work fine: (and as far as I know my local repo folder in
~/.m2 has everything downloaded that it needs. The wicket jar and tons of
other stuff is there.)
lola:Java.NetBeans.Projects lola$ mvn archetype:create
-DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.4-m3
-DgroupId=com.musictramp -DartifactId=myproject
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:create] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:create]
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead
[INFO] Defaulting package to group ID: com.musictramp
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype:
wicket-archetype-quickstart:1.4-m3
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.musictramp
[INFO] Parameter: packageName, Value: com.musictramp
[INFO] Parameter: package, Value: com.musictramp
[INFO] Parameter: artifactId, Value: myproject
[INFO] Parameter: basedir, Value: /Users/lola/Java.NetBeans.Projects
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] ********************* End of debug info from resources from generated
POM ***********************
[INFO] OldArchetype created in dir:
/Users/lola/Java.NetBeans.Projects/myproject
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Mon Nov 03 19:11:38 CST 2008
[INFO] Final Memory: 14M/490M
[INFO]
------------------------------------------------------------------------
==========================================================================
It fails here:
lola:myproject lola$ pwd
/Users/lola/Java.NetBeans.Projects/myproject
lola:myproject lola$ mvn package
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building quickstart
[INFO] task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 2 source files to
/Users/lola/Java.NetBeans.Projects/myproject/target/classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
/Users/lola/Java.NetBeans.Projects/myproject/src/main/java/com/musictramp/HomePage.java:[10,37]
generics are not supported in -source 1.3
(use -source 5 or higher to enable generics)
public class HomePage extends WebPage<Void> {
/Users/lola/Java.NetBeans.Projects/myproject/src/main/java/com/musictramp/WicketApplication.java:[22,13]
generics are not supported in -source 1.3
(use -source 5 or higher to enable generics)
public Class<HomePage> getHomePage()
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Nov 03 19:12:01 CST 2008
[INFO] Final Memory: 13M/490M
[INFO]
------------------------------------------------------------------------
lola:myproject lola$
==========================================================================
It's strange that it's complaining about "source 1.3" since I'm using Java
6.
See:
lola:Users lola$ mvn -v
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: "mac os x" version: "10.5.5" arch: "x86_64" Family: "mac"
lola:Users lola$
==========================================================================
I looked up the source level issue, and found I needed to add this to the
pom.xml of my project:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
===========================================================================
Then I ran it again:
lola:myproject lola$ mvn package
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building quickstart
[INFO] task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 2 source files to
/Users/lola/Java.NetBeans.Projects/myproject/target/classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
/Users/lola/Java.NetBeans.Projects/myproject/src/main/java/com/musictramp/HomePage.java:[10,37]
type org.apache.wicket.markup.html.WebPage does not take parameters
/Users/lola/Java.NetBeans.Projects/myproject/src/main/java/com/musictramp/HomePage.java:[25,21]
type org.apache.wicket.markup.html.basic.Label does not take parameters
/Users/lola/Java.NetBeans.Projects/myproject/src/main/java/com/musictramp/WicketApplication.java:[10,7]
com.musictramp.WicketApplication is not abstract and does not override
abstract method getHomePage() in org.apache.wicket.Application
/Users/lola/Java.NetBeans.Projects/myproject/src/main/java/com/musictramp/WicketApplication.java:[22,24]
getHomePage() in com.musictramp.WicketApplication cannot override
getHomePage() in org.apache.wicket.Application; attempting to use
incompatible return type
found : java.lang.Class<com.musictramp.HomePage>
required: java.lang.Class<? extends org.apache.wicket.Page>
/Users/lola/Java.NetBeans.Projects/myproject/src/main/java/com/musictramp/WicketApplication.java:[22,14]
type parameter com.musictramp.HomePage is not within its bound
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Nov 03 19:16:17 CST 2008
[INFO] Final Memory: 19M/490M
[INFO]
------------------------------------------------------------------------
This is all very strange because everything looks completely normal in the
src directory. I have no idea what is wrong.
==========================================================================
--
View this message in context:
http://www.nabble.com/Maven-Wicket-1.4-m3-can%27t-install-build.-tp20314685p20314685.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]