Video: NetBeans IDE 7.1, Wicket 1.5.3, and Maven

Made some more changes to the NetBeans Wicket Plugin, enabling it to be used in Maven projects and here's a slightly ad-hoc and off the cuff screencast describing how to get set up:

Register this URL in your Plugin Manager: http://blogs.oracle.com/geertjan/resource/NetBeans4Wicket.xml

There's an experimental feature not included in the screencast, probably the most interesting feature, a Wicket parser that notifies you when Wicket IDs don't match:

Also, contrary to what I say in the screencast, if you use the Wicket Quick Start Maven archetype, i.e., the official Maven archetype provided by the Wicket project, the features above will also be available. However, that archetype appears to be using Wicket 1.3.2 libraries, unlike what you get when you use the NetBeans Wicket plugin to generate your project.

The screencast is entitled "Part 1" because there are more parts coming. This intro doesn't really show how to leverage Wicket, since it mostly focuses on NetBeans features for doing so. In future screencasts, I'll focus more on real end to end application scenarios via Wicket.

Comments:

Awesome!

Jeff Schwartz

Posted by guest on December 31, 2011 at 10:59 PM PST #

Thanks for this interesting screencast! Unfortunately I have an existing Maven-project and can't use all this nice and helpful features unless I create a new project from source. Maybe this support could be added into a future version of the Wicket plugin.

BTW: happy new year :-)

Posted by Eddie on January 01, 2012 at 04:27 AM PST #

That's not true at all. Just open your POM into the IDE.

Posted by Geertjan on January 01, 2012 at 05:11 AM PST #

You're right, it works also with existing Maven projects. I've been using an older version of your plugin from a different update site. But the one linked above works fine.

Posted by Eddie on January 02, 2012 at 03:18 AM PST #

Regarding Java EE 6, I see no reason why it should not work - you can simply create web.xml if it does not exist. After creating the EE 6 Maven Web project, just do New File -> Web -> Standard Deployment Descriptor (web.xml). When you then add Wicket framework to the project, Wicket filter will be added to web.xml.

I think there is even API that allows the Wicket plugin to create web.xml programmatically if it does not exist yet.

Posted by Petr Jiricka on January 13, 2012 at 01:20 AM PST #

I know, but in Java EE 6, I thought no web.xml file should be needed anymore. So, there should be no need to create web.xml at all, in which case where/how is the Wicket filter registered?

Posted by Geertjan on January 13, 2012 at 01:35 AM PST #

Hi, I'm trying to use your plug-in URL but doesn't work now... It's still available?
Thanks!

Posted by Ruben on February 18, 2012 at 11:31 AM PST #

Yes, it works perfectly fine. Do you know how the NetBeans Plugin Manager works?

Posted by Geertjan on February 19, 2012 at 09:29 AM PST #

Hi Geertjan,

I get this error when I try to add your plugin in netbeans

Unable to connect to the Wicket 1.5.3 because of Zero sized file reported at http://blogs.oracle.com/geertjan/resource/NetBeans4Wicket.xml

thank you,

Alex

Posted by alessandro on March 05, 2012 at 03:30 AM PST #

https://blogs.oracle.com/geertjan/resource/NetBeans4Wicket.xml

I.e., use https instead of http

Posted by Geertjan on March 05, 2012 at 03:54 AM PST #

there are a problem generating new pages an panels with this plugin on maven projects. this is because this plugin do not detect if is a maven project and is generating html files into java packages instead resources packages.

i hope that package mantainer solve this problem soon!

Regards!

Posted by guest on March 08, 2012 at 04:49 PM PST #

You can join the project and fix any issues yourself, the maintainer isn't one single person -- it is the community, which includes you.

Posted by Geertjan on March 08, 2012 at 11:04 PM PST #

Hi Geertjan,
I have done as u have done in the video(only different is that I have selected Apache tomcat as webserver).But there is some error in the pom.xml file . the code is : where I have indicated the line:

[
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.mycompany</groupId>
<artifactId>TestMaven</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>

<name>TestMaven</name>
<url>http://maven.apache.org</url>

<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-extensions</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.4.2</version>
</dependency>
</dependencies>

<build>
<plugins>
<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>
</plugins>
</build>
<repositories>
<repository>
<url>http://repo2.maven.org/maven2/</url>
<id>Wicket 1.5.3</id>
<layout>default</layout>
<name>Repository for library Library[Wicket 1.5.3]</name>
</repository>
<repository>
<url>http://repo1.maven.org/maven2/</url>
<id>Wicket 1.5.3</id> --->>THIS LINE IS ERROR.
<layout>default</layout>
<name>Repository for library Library[Wicket 1.5.3]</name>
</repository>
</repositories>
<properties>
<netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
</properties>
</project>
]
The Output Dialog box displays this message:

cd C:\Documents and Settings\F1\My Documents\NetBeansProjects\TestMaven; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_20" "\"C:\\Program Files\\apache-maven-3.0.4\\bin\\mvn.bat\"" -Dnetbeans.deploy=true package
Scanning for projects...
The build could not read 1 project -> [Help 1]

The project com.mycompany:TestMaven:1.0-SNAPSHOT (C:\Documents and Settings\F1\My Documents\NetBeansProjects\TestMaven\pom.xml) has 1 error
'repositories.repository.id' must be unique: Wicket 1.5.3 -> http://repo2.maven.org/maven2/ vs http://repo1.maven.org/maven2/ @ line 65, column 11

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

I am a beginner to Apache Wicket.

Thanks in Advance

Posted by Sudeep Shakya on March 15, 2012 at 11:16 PM PDT #

I have managed to run the project with modification in pom.xml but the browser displays the JSP page which is by default in the webpage folder.

Posted by Sudeep Shakya on March 20, 2012 at 11:53 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today