OK so it packages the workspace dependencies  and copies it to the lib
directory along with repository resolved dependencies.I was seeing
inconsistencies in the number of workspace dependencies added to the
deployment assembly. I had 25+ workspace dependencies and it initially
managed to add 5+ of them to the deployment assembly and few more after
doing a couple of Alt+F5s . I was using m2e-wtp *1.1.0*.

To figure out what's going wrong I tried to rebuild m2e-wtp
<https://github.com/eclipse/m2e.wtp>(1.2.0-SNAPSHOT) with some additional
logging in AbstractProjectConfiguratorDelegate.java. After installing
1.2.0-SNAPSHOT, I don't see the issue any more and the workspace
dependencies are always getting added.I will keep trying with the new
version and will raise a bug if the problem reappears.

Thanks for awesome work on m2e-wtp and for all the help you are providing
here and on SO

Thanks,
Aneesh

On Sun, Nov 16, 2014 at 10:41 AM, CoderPlus Team <[email protected]>
wrote:

> Thanks Fred. I didn't manually play around with the deployment assembly,  
> src/main/webapp/WEB-INF/
> being deployed to WEB-INF/classes came up in the deployment assembly
> because the pom had this weird resource config in the build tag.
>
> <resource>
> <directory>src/main/webapp/WEB-INF</directory>
> <filtering>true</filtering>
> <includes>
> <include>web.xml</include>
> </includes>
> </resource>
> <resource>
> <directory>src/main/webapp/WEB-INF</directory>
> <filtering>false</filtering>
> <excludes>
> <exclude>web.xml</exclude>
> </excludes>
> </resource>
>
> I removed it,turned on *filteringDeploymentDescriptors*  and moved the
> resources over to src/main/resources which got rid of almost all of the
> issues.Now the webapp is being correctly deployed to my tomcat server and
> m2e-wtp is copying everything except the workspace resolved dependencies
> to org.eclipse.wst.server.core\tmp0\wtpwebapps. Is m2e supposed to copy
> target/classes of each workspace resolved dependency to
> mywebappname\WEB-INF\classes ? The dependency project doesn't show up in
> the deployment assembly(is it supposed to show up  there?) but it shows up
> correctly in the Libraries tab. Is it like the dependency project's classes
> will be copied over or will they just be added to the classpath?
>
> Thanks,
> Aneesh
>
>
> Thanks,
> Aneesh
>
> On Fri, Nov 14, 2014 at 7:35 AM, Fred Bricon <[email protected]> wrote:
>
>> m2e-wtp configures dependencies following the maven scope rules :
>> - test : not deployed
>> - compile, runtime : deployed
>> - provided, system : not deployed
>> - optional dependencies are never deployed
>>
>> So if you see a discrepancy between maven CLI and m2e-wtp, then m2e-wtp
>> has a bug.
>> In this case, please open a bug report at [1] and attach a sample project
>> reproducing the problem.
>>
>> Generally speaking, workspace projects don't appear in the Projects tab
>> of the build path dialog, but in the Libraries tab, under maven
>> dependencies node.
>>
>> The run on server option will only show you specific project types (web,
>> ejb, ear, web fragments, ...)
>>
>> As a rule of thumb, never ever use the deployment assembly page with
>> Maven projects, as the settings will be overwritten with the next "update
>> project configuration" invocation. It will also lead to deployment
>> discrepancies between Maven CLI and m2e-wtp. Your pic shows
>> src/main/webapp/WEB-INF/ being deployed to WEB-INF/classes, which is wrong.
>> You should really delete that entry.
>>
>> Fred
>>
>> [1] https://bugs.eclipse.org/bugs/enter_bug.cgi?product=M2E-WTP
>>
>>
>> On Thu, Nov 13, 2014 at 5:32 PM, CoderPlus Team <[email protected]>
>> wrote:
>>
>>> Hi folks,
>>> I'm trying to deploy a simple spring mvc based webapp to tomcat using
>>> m2e-wtp. When some of the dependencies are resolved from the workspace, I
>>> get java.lang.ClassNotFoundException errors and I'm trying to debug the
>>> same.
>>>
>>> [image: Inline image 1]
>>>
>>> I see that not all of the workspace resolved dependencies are
>>> automatically added to the Web Deployment Assembly(in this case only one
>>> got added)
>>>
>>> And the workspace resolved dependency projects were not automatically
>>> added to the Build Path(not sure if it should be)
>>>
>>> [image: Inline image 2]
>>>
>>> When I click on Run on Server, it takes me to the Add/Remove screen
>>> where under the  Configured pane, it shows the webapp. When you expand it,
>>> what are we supposed to see there? A list of all dependencies or a list of
>>> workspace resolved dependencies?
>>>
>>> Thanks,
>>> Aneesh
>>>
>>>
>>> _______________________________________________
>>> m2e-users mailing list
>>> [email protected]
>>> To change your delivery options, retrieve your password, or unsubscribe
>>> from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>>
>>
>>
>>
>> --
>> "Have you tried turning it off and on again" - The IT Crowd
>>
>> _______________________________________________
>> m2e-users mailing list
>> [email protected]
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>
>
>
_______________________________________________
m2e-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to