Re: [mevenide-user] MevenIde doesn't recognize my Netbeans project as a Maven project
"Milos Kleint" <[email protected]> Thu, 28 Feb 2008 13:15:41 +0100
| Newsgroups | gmane.comp.jakarta.turbine.maven.mevenide.user |
|---|---|
| Message-ID | <[email protected]> |
i'm not sure what you attempted to do, but it's most probably not the right way to go. If you create a netbeans ant based project and then convert it to maven there's a few pitfalls on the way: 1. you need to write the pom file correctly, have correct dependencies etc. The netbeans web projects add server instance classpath to project's compilation classpath, so your project will miss out some basic dependencies like javax.servlet 2. the sources and resources need to be split, and in correct folders, so do web pages. You either move the files or update the pom. 3. if the maven project builds and everything is fine, you need to delete the netbeans project files under nbproject/ directory and the build.xml file. And restart the IDE afterwards, otherwise the project still gets recognized as ant-based project and not maven project. Ant projects are first in the queue for recognizing project folders that belong to them. I think generally you would be more happy if you tried creating a maven project from archetype (the future 3.1 version will list all archetypes in central repository) and tried adding the framework files manually. in 3.1 there will be a "Frameworks" panel in the customizer that will behave the same way the one from default webprojects. Removing frameworks will not be supported in an automated way. What the current frameworks do is not only dependencies, but also adding configuration files and updating the deployment descriptor. None of this is done directly by the maven support therefore it also cannot perform the removal on it's own. Milos On Thu, Feb 28, 2008 at 11:06 AM, viggo <[email protected]> wrote: > > Thanks, it did help :) > > I guess the preferred way of doing things is to first create a Maven project > in Maven, and then add all the tings you want afterwords. > I wish that future versions of MevenIde will give us the capability of > adding/removing frameworks (Spring, JSF, Facelets, Visual JSF, Struts) in a > better way than native Netbeans does. If you add a framework in Netbeans, > you're not able to remove it again. I think it should just be a matter of > adding/removing a set of dependencies to add/remove framework support. > Netbeans team doesn't share my opinion there.. > Hopefulle MevenIDe will bring this as a feature, don't you agree?! :) > > > > > > Wouter van Reeven wrote: > > > > On Thu, Feb 28, 2008 at 12:06:37AM -0800, viggo wrote: > >> I've just created a Netbeans project with Facelets and Visual JavaServer > >> Faces support. Then I added a pom.xml file to the project, and hoped that > >> MevenIde would recognize my project as a Maven project, but it doesn't. > >> Is > >> this a bug, or have I done something wrong? > > > > I'm not sure if this is supposed to work or not. However, I know for a > > fact that > > doing it the other way around will work. So, first create a Maven project, > > then > > add support for Facelets and Visual JSF. This can easily be done if you > > have the > > nbfaceletssupport package installed. See for an example > > > > http://technology.amis.nl/blog/?p=2610 > > > > > > HTH, Wouter van Reeven > > > > -- > > > > People: "If she weighs the same as a Duck, she's made of wood!" > > Sir Bedevere: "And therefore...?" > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > > -- > View this message in context: http://www.nabble.com/MevenIde-doesn%27t-recognize-my-Netbeans-project-as-a-Maven-project-tp15731522p15733325.html > > Sent from the mevenide - user mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > > > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email