Re: [mevenide-user] Web project with Maven and multiple sources
"Marek Nowicki" <[email protected]> Mon, 25 Feb 2008 10:49:57 +0100
| Newsgroups | gmane.comp.jakarta.turbine.maven.mevenide.user |
|---|---|
| Message-ID | <[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 :)...
/* what do if i want to add sources in other directories but that sources
aren't generated as jaxb? */
I very like NetBeans, but code completation, in that situation, doesn't
work, and I must use eclipse :(.
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
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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