I think the problem is that the IBM Websphere plugin needs a single root.
According to the IBM docs, having two different paths leading to the same
root breaks "the single root rule".  Consequently, I suppose it feels the
need to recopy everything into a single directory (essentially recreating
the war) and then using that as the root path.

Is there a way to "remove" the /target/m2e-wtp/web-resources from the
equation?  What is supposed to end up in there?  Can I redirect the output
to the /WEB-INF/classes folder instead?

I'm not precompiling my JSPs, if that makes any difference.

Thanks,

Eric


On Mon, Mar 14, 2016 at 4:52 PM, Fred Bricon <fbri...@gmail.com> wrote:

> That mapping corresponds to the archive layout. /src/main/webapp  and 
> /target/m2e-wtp/web-resources
> are to be considered the root of your .war, the build output of /src/main/java
> should go as  /WEB-INF/classes in the .war
>
> On Mon, Mar 14, 2016 at 4:38 PM, Eric B <ebenza...@gmail.com> wrote:
>
>> I've updated my pom.xml to add the outputDirectory as indicated, but when
>> I check my Deployment Assembly, I still see:
>>
>> Source:                                        Deploy Path
>> /src/main/java                               /WEB-INF/classes
>> /src/main/webapp                          /
>> /target/m2e-wtp/web-resources       /
>>
>> And in my looseconfig.xmi, I see the .../tmp0 folder still indicated,
>> prob b/c Websphere still thinks it needs to copy files over since it has
>> multiple root settings.
>>
>> I've checked the java build path and the default output path is indeed
>> src/main/webapp/WEB-INF/classes.
>>
>>
>> What am I missing in my pom?  Why are /src/main/webapp and web-resources
>> still being mapped to /?
>>
>>
>> Thanks,
>>
>> Eric
>>
>>
>>
>>
>>
>> On Fri, Mar 11, 2016 at 1:51 PM, Marcel Schutte <maro.schu...@gmail.com>
>> wrote:
>>
>>> Hi Eric,
>>>
>>> What works for us is to put the following bit in our pom.xml:
>>>
>>> <build>
>>> <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
>>> </build>
>>>
>>> (obviously we put a .gitignore to keep them out of source control)
>>>
>>> The websphere connector needs your classes to be in WEB-INF/classes to
>>> be able to run your web module directly from your workspace. If they are
>>> not, then it falls back to the behaviour you are seeing. It copies your web
>>> root and your build outputdirectory to this .plugins\
>>> org.eclipse.wst.server.core\tmp0\WarProject location. This in turn
>>> causes your problem of needing a publish step before you see the updates to
>>> your jsp's.
>>>
>>> Please look at my explanation of the looseconfig.xmi in the reply to
>>> your question last month. This will help your understand the way websphere
>>> and websphere eclipse connector work together.
>>>
>>> Regards, Marcel
>>>
>>> On Fri, Mar 11, 2016 at 7:36 PM, Eric B <ebenza...@gmail.com> wrote:
>>>
>>>> So then it is conceivable that the IBM guys coded their adapter to
>>>> behave differently in the case of a Maven nature vs an Eclipse nature.  Oh
>>>> boy - I can foresee this is as being a tough one to resolve.
>>>>
>>>> Even if I were to manually add entries into my Deployment Assembly, m2e
>>>> tends to overwrite them whenever updating my project.  Are there any
>>>> settings I can add into my pom/etc to force certain entries into my
>>>> Deployment Assembly?
>>>>
>>>> Thanks,
>>>>
>>>> Eric
>>>>
>>>> On Fri, Mar 11, 2016 at 1:31 PM, Fred Bricon <fbri...@gmail.com> wrote:
>>>>
>>>>> Tomcat and JBoss server adapters use a deployment directory by
>>>>> default. Publishing is incremental, i.e. only files that changed are
>>>>> published, which is very fast.
>>>>> For Tomcat, you have a serve module without publishing which serves
>>>>> files directly from the workspace, skipping the publishing mode.
>>>>>
>>>>> Each server adapter is implemented differently, so behavior might vary
>>>>> from an adapter to another. But in general they should honor the 
>>>>> deployment
>>>>> assembly settings.
>>>>>
>>>>> On Fri, Mar 11, 2016 at 1:27 PM, Eric B <ebenza...@gmail.com> wrote:
>>>>>
>>>>>> I haven't checked the Tomcat/JBoss adapters in a long long time, but
>>>>>> do you know if they copy files to a temp folder as well?
>>>>>>
>>>>>> Is it normal that the server adapters that modify their behaviour
>>>>>> based on the project's natures?  I would have expected that the adapter
>>>>>> simply uses whatever is in the Deployment Assembly data to determine how 
>>>>>> to
>>>>>> deploy/structure classpaths/etc.
>>>>>>
>>>>>> Chuck/Roberto - are you able to provide any additional info for
>>>>>> this?  I'm using RAD 9.1.1 with the WAS 8.5 tools (but it has been tried 
>>>>>> in
>>>>>> Luna with the WAS 8.5 tools and the same result as well)
>>>>>>
>>>>>> Thanks!
>>>>>> Eric
>>>>>>
>>>>>>
>>>>>> On Fri, Mar 11, 2016 at 1:21 PM, Fred Bricon <fbri...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> This is a question for the IBM team. Cc'ing Chuck and Roberto on
>>>>>>> this.
>>>>>>> I know Tomcat and JBoss server adapters work just fine, but I can't
>>>>>>> test WebSphere.
>>>>>>>
>>>>>>> Fred
>>>>>>>
>>>>>>> On Fri, Mar 11, 2016 at 10:41 AM, Eric B <ebenza...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I'm confused as to why this is happening in my m2e projects vs
>>>>>>>> standard Eclipse projects.
>>>>>>>>
>>>>>>>> When I configure my WAR/EAR projects as normal eclipse (non-maven)
>>>>>>>> projects and deploy to WebSphere, I see that the WebSphere connector 
>>>>>>>> adds a
>>>>>>>> classpath entry pointing to my JSP folder:
>>>>>>>>
>>>>>>>>   c:\dev\WarProject\webApplication
>>>>>>>>
>>>>>>>> However, when I convert to a properly structured maven/m2e project
>>>>>>>> the classpath entry changes to:
>>>>>>>>   c:\dev\WarProject\
>>>>>>>> \.plugins\org.eclipse.wst.server.core\tmp0\WarProject
>>>>>>>>
>>>>>>>> So this means that for WAS to see any modifications made to my JSPs
>>>>>>>> they must first be recopied into the tmp0\... folder.  But during the
>>>>>>>> standard m2e/maven save process, the files are only copied into the
>>>>>>>> target/folder and not the deployed ..../tmp0 folder.
>>>>>>>>
>>>>>>>> Which leads to the problem of WAS not seeing the updated JSPs.  My
>>>>>>>> options are:
>>>>>>>>
>>>>>>>>    1. If I enable the "automatic deployment" in the WAS options it
>>>>>>>>    tries to redeploy my entire EAR which is very slow
>>>>>>>>    2. If I don't enable the "automatic deployment", the files are
>>>>>>>>    not copied to the tmp0\ folder so WAS doesn't see the changes to 
>>>>>>>> the JSP
>>>>>>>>
>>>>>>>>
>>>>>>>> So I've hacked something into my pom.xml to use the
>>>>>>>> maven-resources-plugin to automatically copy my jsp into the tmp0 
>>>>>>>> folder
>>>>>>>> (on validate phase so everytime the jsp is saved it is copied over), 
>>>>>>>> but
>>>>>>>> that is brutally ugly, and requires hardcoding a path in my pom to 
>>>>>>>> point to
>>>>>>>> a path generated by the WAS plugin.
>>>>>>>>
>>>>>>>>
>>>>>>>> 1) Is there a way to force the WAS deployer to point to my
>>>>>>>> WarProject/main/webapp/src folder instead of the tmp0 folder?
>>>>>>>>
>>>>>>>> 2) Is there another/better way to configure this?
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Eric
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> m2e-users mailing list
>>>>>>>> m2e-users@eclipse.org
>>>>>>>> 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
>>>>>>> And if that fails, then http://goo.gl/tnBgH5
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> m2e-users mailing list
>>>>>>> m2e-users@eclipse.org
>>>>>>> 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
>>>>>> m2e-users@eclipse.org
>>>>>> 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
>>>>> And if that fails, then http://goo.gl/tnBgH5
>>>>>
>>>>> _______________________________________________
>>>>> m2e-users mailing list
>>>>> m2e-users@eclipse.org
>>>>> 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
>>>> m2e-users@eclipse.org
>>>> To change your delivery options, retrieve your password, or unsubscribe
>>>> from this list, visit
>>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>>>
>>>
>>>
>>>
>>> --
>>> Fotografie
>>> http://schutte.name/
>>>
>>> _______________________________________________
>>> m2e-users mailing list
>>> m2e-users@eclipse.org
>>> 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
>> m2e-users@eclipse.org
>> 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
> And if that fails, then http://goo.gl/tnBgH5
>
> _______________________________________________
> m2e-users mailing list
> m2e-users@eclipse.org
> 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
m2e-users@eclipse.org
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