Re: [mevenide-user] Web project with Maven and multiple sources
"Marek Nowicki" <[email protected]> Mon, 25 Feb 2008 15:09:07 +0100
| Newsgroups | gmane.comp.jakarta.turbine.maven.mevenide.user |
|---|---|
| Message-ID | <[email protected]> |
OK, thanks! That start working! :D After adding plugin to generating jaxb and building project, I must reopen project (reloading didn't work - exclamation mark still apears in project window) - it start working. Thanks again! regards, Marek -- PS. Staying with convention is ok :) Dnia 25-02-2008 o 10:58:00 Milos Kleint <[email protected]> napisaĹ: > 2008/2/25 Marek Nowicki <[email protected]>: >> Thanks for answer, but my problem isn't that way (I think). >> I think that, when I select "clean project" the directory >> "${basedir}/target" is deleted. >> I have in "${basedir}/src/jaxb/java" java files. NetBeans doesn't see >> it, >> and, when editing other java files, NetBeans shows error (cannot >> import...) and I cannot use code completion window... >> I tried something similar in Eclipse: Eclipse add all files in src/ as >> source code and there is no difficulty in editing files - code >> completation works :)... >> > > you should not be generating content into source area. It won't work > only if you do "Clean project". However if you do "Build" or "Clean > and Build", you get your sources back. Since you are regenerating the > sources with each build anyway, there's no point in storing them in > subversion either. > >> /* what do if i want to add sources in other directories but that >> sources >> aren't generated as jaxb? */ > > each maven project shall have just one source root. Period. The > generated source roots are an exception and all plugins put it into > the target/generated sources by default. > >> >> I very like NetBeans, but code completation, in that situation, doesn't >> work, and I must use eclipse :(. > > Oh well, if you insist on swimming against the stream, then it's sort > of fine with me. I'm using generated sources in my own projects and > the cases where code completion is missing for generated sources is > very rare.. > > Milos > > >> >> regards, >> Marek >> >> Dnia 24-02-2008 o 17:43:17 Milos Kleint <[email protected]> napisaĹ: >> >> >> >> > the generated sources should generally be put under >> > "${basedir}/target/generated-sources/jaxb" for example. Most (or all) >> > plugins that generate sources put it there (sort of convention). The >> > netbeans integration will include any subdirectory of >> > ${basedir}/target/generated-sources/ as a source root. >> > There's no real way to figure the source roots otherwise (apart from >> > building the project, which is evil performance wise) >> > >> > Milos >> > >> > On Thu, Feb 21, 2008 at 5:03 PM, Marek Nowicki <[email protected]> >> > wrote: >> >> Hello, >> >> >> >> I'm creating web project with maven in NetBeans 6.0 (with >> integrated >> >> mevenide v3.0.10). >> >> Everything was ok, but one of directories should be moved from >> >> src/main/java to src/jaxb/java. >> >> I have added to pom.xml that code: >> >> --- CUT --- >> >> <plugin> >> >> <groupId>org.codehaus.mojo</groupId> >> >> <artifactId>build-helper-maven-plugin</artifactId> >> >> <executions> >> >> <execution> >> >> <id>add-source</id> >> >> <phase>generate-sources</phase> >> >> <goals> >> >> <goal>add-source</goal> >> >> </goals> >> >> <configuration> >> >> <sources> >> >> <source>src/jaxb/java/</source> >> >> </sources> >> >> </configuration> >> >> </execution> >> >> </executions> >> >> </plugin> >> >> --- CUT --- >> >> >> >> When I'm compiling/building/starting application it works great, >> but >> >> when >> >> editing IDE shows errors (eg. cannot import aurochs.aml.User which >> is >> >> in >> >> src/jaxb/java folder). >> >> >> >> I also don't have "Source Packages" with files from src/jaxb/java. >> >> When I add plugin "org.apache.maven.plugins" to specify where "Web >> >> Pages" >> >> is stored, NetBeans added that folder to Project Preview. >> >> >> >> How can I resolve that problem? How can I tell NetBeans to use in >> >> editing >> >> also directory from plugin (without that the editor? >> >> >> >> I'm using newest version of NetBeans (6.0.1) and plugins - >> yesterday I >> >> have downloaded updates. >> >> >> >> regards, >> >> Marek --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email