Maven problem generating new project from "Jspresso in 10 minutes"

5 posts / 0 new
Last post
cvieira
Offline
Joined: 04/24/2009
Maven problem generating new project from "Jspresso in 10 minutes"

Hi,

 

I'm trying to setup a project from scratch using the "Jspresso in 10 minutes" post. Well, i'm getting this problem... don't know if anyone had the same problem.

I don't have much experience with maven... can anyone help please? (i past the error log at the end of the post)

 

Best Regards

  Carlos V.

 

======

 

NetBeans: Executing 'D:\DEV\apache-maven-2.1.0\bin\mvn.bat -DarchetypeVersion=1.0-SNAPSHOT -Darchetype.interactive=false -DgroupId=com.example.helloworld -DarchetypeArtifactId=helloworld -DarchetypeRepository=http://repository.jspresso.org/maven2/ -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=com.example.helloworld -Darchetype.repository=http://repository.jspresso.org/maven2/ -Dbasedir=D:\WORKSPACE -Dpackage=com.example.helloworld -DartifactId=mavenproject1 --batch-mode org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate'
Scanning for projects...
------------------------------------------------------------------------
Building Maven Default Project
   task-segment: [org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-3:generate] (aggregator-style)
------------------------------------------------------------------------
Preparing archetype:generate
No goals needed for project - skipping
Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
Setting property: velocimacro.messages.on => 'false'.
Setting property: resource.loader => 'classpath'.
Setting property: resource.manager.logwhenfound => 'false'.
[archetype:generate]
Generating project in Batch mode
Archetype defined by properties
snapshot com.example.helloworld:helloworld:1.0-SNAPSHOT: checking for updates from helloworld-repo
Downloading: http://repository.jspresso.org/maven2//com/example/helloworld/helloworld...
Unable to find resource 'com.example.helloworld:helloworld:jar:1.0-SNAPSHOT' in repository helloworld-repo (http://repository.jspresso.org/maven2/)
------------------------------------------------------------------------
[ERROR]BUILD FAILURE
------------------------------------------------------------------------
: org.apache.maven.archetype.exception.UnknownArchetype: The desired archetype does not exist (com.example.helloworld:helloworld:1.0-SNAPSHOT)
The desired archetype does not exist (com.example.helloworld:helloworld:1.0-SNAPSHOT)
------------------------------------------------------------------------
For more information, run Maven with the -e switch
------------------------------------------------------------------------
Total time: 4 seconds
Finished at: Wed Apr 29 22:05:46 BST 2009
Final Memory: 8M/15M
------------------------------------------------------------------------

vvandens
Offline
Joined: 05/29/2008
Maven problem : wrong values

Hi Carlos,

I've never used NetBeans but the mvn command line generated is wrong. It should be :

mvn.bat -DarchetypeVersion=3.0.01.0-SNAPSHOT -Darchetype.interactive=false -DgroupId=com.example.helloworld -DarchetypeArtifactId=jspresso-archetypehelloworld -DarchetypeRepository=http://repository.jspresso.org/maven2/ -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.jspresso.frameworkcom.example.helloworld -Darchetype.repository=http://repository.jspresso.org/maven2/ -Dbasedir=D:\WORKSPACE -Dpackage=com.example.helloworld -DartifactId=helloworldmavenproject1 --batch-mode org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-42.0-alpha-3:generate'

Basically, there is a mismatch between archetype values (group, name and version) and your generated project values. Try to update your NetBeans config to reflect this change.

BTW, if you start with NetBeans, try to evaluate the Spring support it currently has (available plugin ?). Last time I had looked at it, it was far behind the Eclipse "Spring IDE" plugin. A good Spring support is important to productivity when working with spring config files (auto-completion, validation of references at compile-time, bidi navigation between xml and java, ...).

Another point is that the Jspresso generated project will come pre-configured for Eclipse. You will just have to import it.

So my advice would be to carefully evaluate the switch to Eclipse since everything would be much easier afterwards...

Best regards,

Vincent

 

cvieira
Offline
Joined: 04/24/2009
Thanks Vincent... i tried

Thanks Vincent... i tried with netbeans since it's the IDE that i'm used to use. But, in fact, i used in a recent past spring support on Eclipse, and it were litlle better than in netbeans.

Also, i tried new maven configuration with the new values that you sent me, and i was able to create the maven projects... but there were some problems on some of them (dependencies i think). I will try again and i will report here in the forum if i have success. But i will try with eclipse as you advice...

Best Regards

  Carlos V.

cvieira
Offline
Joined: 04/24/2009
Netbeans support

Hi Vincent,

I'm now using netbeans with no problem at all (i'm using now version 6.8). It's just simple as opening an existing project using the root level pom.xml file. Then netbeans divides the project in sub-modules, or sub-projects. The integration with server (tomcat, etc...) is guaranteed also, and everything is working fine... the built-in maven plugin is also straighforward to use as in eclipse.

Regarding spring plugin, as i said on my last post, in a recent past i think the spring plugin for eclipse was better than the netbeans one... but i did follow the evolution of these plugins, so i really don't know... if i have some news on this i will post ir here...

Cheers,

Carlos Vieira

vvandens
Offline
Joined: 05/29/2008
Netbeans support

Thanks for the feedback Carlos. It will definitely be useful to NB pros.

 

Regards,

Vincent