Can't rename Project Exception


Whenever i’m trying to create a Maven project with the archetype vaadin-archetype-widget I’m getting the exception saying that it can’t rename the Project.

‘Creating vaadin-archetype-widget’ has encountered a problem.

Can’t rename D:\path\to\my\Project.

After that the Project folder is created and a few files are in it but you can’t import it as a project.
I already tried updating my eclipse Indigo and all of its plugins (also the maven + vaadin ones) and also tried it with a fresh Juno installation and fresh installed plugins but it also failed with the same error.

Other archetypes seem to work (at least application and clean. others i didn’t test)

Is this a problem on my end that i can solve or is there something wrong with the archetype?


Is the path it is trying to rename something to a valid path for your filesystem? Did you use simple alphanumerical names for all the archetype parameters that might end up in paths?

A Maven archetype has no executable code nor imperative control over what happens when you generate a project based on it, just some templates where maven-archetype-plugin will replace strings and placeholders in file contents and/or file and directory paths.

Is the archetype version you are using 7.1.2? I just tested creating a project with vaadin-archetype-widget 7.1.2 on Windows, despite two warnings about some variables in the template, project creation was successful.

The command I used (then giving ComponentClassName interactively):

mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=7.1.2 -DartifactId=project-name -Dversion=1.0 -Dpackaging=war

Yes the path is correct. It is pointing to the unusable Project folder.
Yes i did. The package i wanted to create: com.test.TestWidget and as classname: TestWidget

I’m using the latest version of it so yesterday i think it was 7.1.1 and today i tested the 7.1.2 version.

I also tried using the Command right now and the project creation finished without an error. The problem is that Eclipse doesn’t see the folder as a Project and as a result can’t import it.

Command i used: D:\pathtomy\workspace\TestFolder>D:\pathtomy\mvn.bat archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-widget -DarchetypeVersion=7.1.2 -DgroupId=com.test.example -DartifactId=TestingWiget -Dversion=1.0 -Dpackaging=war Update: Until now i tried to import the Project using Import… → Existing Project into Workspace which didn’t work. Now i tried to import the command-created project using import → Maven → Existing Project and it seem to have worked as the project folders are now in my eclipse Workspace.
Still i find it a bit weird that it’s not working when i try to create it using the m2eclipse plugin.

Also after i now managed to import the project i’m getting an exception when building the project saying that org.apache.jasper.servlet.JspServlet cannot be cast to javax.servlet.Servlet. I didn’t change anything other then i compiled the widget and then tried to compile the demo project.

Did some further testing and now i managed to get the demo project in the widget archetype to run properly.
What i did was replacing the content of the pom.xml with the one of a fresh one build from the application archetype.
I can’t yet say what line in the pom caused the castExceptions in my case but at least it’s working now.

Oh and i have a question: What should normally be the way to recompile the widget project if you made changes?.. because i had to add a plugin tag describing the vaadin plugin to the widget pom.xml so that i was able to use things like vaadin:compile.
Is there a better way to do that without adding additional lines to the xml file?