Hi Fred,

Thank you four your reply.

The m2eclipse WTP extension is installed and working, therefore I am able to
publish to the server. In the meantime I have some more information, I have
started debugging the Jetty plugin and was able to see a little bit better
what happens.

The server plugin asks the dependency project if it is binary on its
IJ2EEModule.isBinary interface method, specifically, the
org.eclipse.jst.j2ee.internal.deployables.*J2EEFlexProjDeployable*<http://www.findjar.com/class/org/eclipse/jst/j2ee/internal/deployables/J2EEFlexProjDeployable.html;jsessionid=4023A10AFF0A5A6572EB78C16C3936F5>implementation
of that interface is asked. It appears that the project
considers itself non-binary, therefore its sources are zipped and published
as a jar.

If it were binary, the JettyServerBehaviour.getResources method would be
used to find out what to publish:

        IModuleResource[] mr = server.getResources(module);
        IStatus[] stat = helper.publishToPath(mr,jarPath,monitor);

Currently I need to find out more about the IModuleResource and the
PublishHelper to understand what goes wrong, but it is possible that part of
the issue is caused by m2eclipse, in case that it wrongly identifies maven
jar projects as non-binary.

I'll try to find out more details. Since the Jetty plugin is derived from
the Tomcat plugin, this might affect both Eclipse plugins, and it might help
quite a number of people if we can fix this.

2011/5/8 <[email protected]>

> Send m2e-users mailing list submissions to
>        [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://dev.eclipse.org/mailman/listinfo/m2e-users
> or, via email, send a message with subject or body 'help' to
>        [email protected]
>
> You can reach the person managing the list at
>        [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of m2e-users digest..."
>
>
> Today's Topics:
>
>   1. M2eclipse and wtp and local project dependency (Dietrich Schulten)
>   2. Re: M2eclipse and wtp and local project dependency (Fred Bricon)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 8 May 2011 02:34:31 +0200
> From: Dietrich Schulten <[email protected]>
> To: [email protected]
> Subject: [m2e-users] M2eclipse and wtp and local project dependency
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I am using the jetty 7/8 eclipse wtp plugin with m2eclipse and I have the
> problem that classes from local workspace dependency projects are not found
> in jetty when workspace resolution is on. I checked the jars which are
> deployed to the jetty server environment in the workspace and found out
> that
> the jars do not contain class files, but the jars contain the src folder of
> the workspace project my war depends on, with .java files! Disabling
> workspace resolution works around that, but that has other drawbacks, e.g.
> when eclipse searches for usages of a class from the workspace project, it
> does not find usages in the war sources.
> It seems other people have had similar problems with other servers:
>
> http://stackoverflow.com/questions/2557348/m2eclipse-and-wtp-and-adding-local-project-source
> Now I am wondering which component wrongly jars up the project src instead
> of using the build output in target/classes, or which component wrongly
> tells eclipse to do that. Is it the eclipse jetty server plugin, or eclipse
> wtp or m2eclipse itself? Has anyone seen this already?
> Cheers,
> D'
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://dev.eclipse.org/mailman/private/m2e-users/attachments/20110508/034573cd/attachment.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Sun, 8 May 2011 08:14:59 +0200
> From: Fred Bricon <[email protected]>
> To: Maven Integration for Eclipse users mailing list
>        <[email protected]>
> Subject: Re: [m2e-users] M2eclipse and wtp and local project
>        dependency
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Have you installed m2eclipse-wtp, the WTP integration plugin for m2eclipse?
> http://m2eclipse.sonatype.org/sites/m2e-extras
> Run Maven >Update Project Configure your projects after doing so.
>
> 2011/5/8 Dietrich Schulten <[email protected]>
>
> > I am using the jetty 7/8 eclipse wtp plugin with m2eclipse and I have the
> > problem that classes from local workspace dependency projects are not
> found
> > in jetty when workspace resolution is on. I checked the jars which are
> > deployed to the jetty server environment in the workspace and found out
> that
> > the jars do not contain class files, but the jars contain the src folder
> of
> > the workspace project my war depends on, with .java files! Disabling
> > workspace resolution works around that, but that has other drawbacks,
> e.g.
> > when eclipse searches for usages of a class from the workspace project,
> it
> > does not find usages in the war sources.
> > It seems other people have had similar problems with other servers:
> >
> http://stackoverflow.com/questions/2557348/m2eclipse-and-wtp-and-adding-local-project-source
> > Now I am wondering which component wrongly jars up the project src
> instead
> > of using the build output in target/classes, or which component wrongly
> > tells eclipse to do that. Is it the eclipse jetty server plugin, or
> eclipse
> > wtp or m2eclipse itself? Has anyone seen this already?
> > Cheers,
> > D'
> >
> > _______________________________________________
> > m2e-users mailing list
> > [email protected]
> > https://dev.eclipse.org/mailman/listinfo/m2e-users
> >
> >
>
>
> --
> "Have you tried turning it off and on again" - The IT Crowd
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://dev.eclipse.org/mailman/private/m2e-users/attachments/20110508/3846975a/attachment.htm
> >
>
> ------------------------------
>
> _______________________________________________
> m2e-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/m2e-users
>
>
> End of m2e-users Digest, Vol 28, Issue 6
> ****************************************
>
_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to