An Eclipse project type, or perspective, can decide to show the tree any way
it likes. The default Java perspective shows all folders as ordinary folders
except source folders. It hauls source folders to the top of the project,
gives them a special icon, and labels them with the full pathname (e.g.
"src/main/java"). In a WTP project, the web content root is also hauled to
the top and specially labelled.  There is no general scheme for marking some
arbitrary folder for this treatment. So, unless you are using WTP, and
telling eclipse:eclipse to write configuration for WTP, you are stuck with
the irritating folder location. Unless you want to write your own Eclipse
plugin that rearranged the display in this case.

On Thu, Oct 22, 2009 at 6:21 PM, Barrie Treloar <baerr...@gmail.com> wrote:

> On Fri, Oct 23, 2009 at 6:31 AM, Vincent F <vincent.fu...@sgcib.com>
> wrote:
> >
> > My plugin configuration is the following
> >
> > <plugin>
> >      <groupId>org.apache.maven.plugins</groupId>
> >      <artifactId>maven-eclipse-plugin</artifactId>
> >      <version>2.7</version>
> >         <configuration>
> >             <packaging>war</packaging>
> >             <useProjectReferences>false</useProjectReferences>
> >             <wtpversion>2.0</wtpversion>
> >             <downloadSources>true</downloadSources>
> >         </configuration>
> > </plugin>
> >
> > So as you can see, packaging is "war" but /src/main/webapp is not added
> as a
>
> You dont need to specify packaging, its default value is
> ${project.packaging} so it should already be set to war.
>
> > I don't see warSourceDirectory as a maven-eclipse-plugin's property, but
> > rather maven-war-plugin. How would that have an impact on
> > maven-eclipse-plugin ?
>
> The code pulls the value out from the maven war plugin configuration,
> and defaults to /src/main/webapp as below:
>
>    File warSourceDirectory =
>                new File( IdeUtils.getPluginSetting(
> config.getProject(), JeeUtils.ARTIFACT_MAVEN_WAR_PLUGIN,
>
> "warSourceDirectory", //$NON-NLS-1$
>
> config.getProject().getBasedir() + "/src/main/webapp" ) );
> //$NON-NLS-1$
>
> > source. In the .classpath file, the 2 only relevant lines are
> >  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
> >  <classpathentry kind="src" path="src/main/resources"
> > excluding="**/*.java"/>
> >
> > but nothing about src/main/webapp
> >
>
> I dont use WTP so I am only going by the docs and the code.
>
> From the looks of the code /src/main/webapp doesn't get added to the
> .classpath file, it gets added to
>  .settings/org.eclipse.wst.common.component
> file as
>  <wb-resource deploy-path="/" source-path="src/main/webapp"/>
>
> And looking at the integration tests, I dont think what you are asking
> for is how eclipse:eclipse works.
>
> From the little reading I have done on the documentation
> src/main/webapp refers to your web sources and thus they shouldn't be
> on the classpath.
> I think you are stuck drilling down those directories manually.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to