m2e-wtp is expected to honour the <webXml> configuration. If it doesn't,
it's likely a bug; Best way to find out is for you to provide a sample  web
project that reproduces the problem.

The reason why m2e-wtp doesn't rely on target/<warName> is because WTP is
expected to incrementally deploy the web resources from the source
directory as soon as they change.
We have no way to know some extra plugin (enunciate or any similar plugin)
is incremental-build-friendly and thus should be invoked whenever a web
resource is changed, so the byproducts of that invocation could be deployed
on the fly by WTP.
So, as I said explained earlier, a workaround is to make WTP explicitely
aware of web resources built separately.

If m2e-wtp doesn't work for you, you can try Sonatype's
webby<https://github.com/sonatype/m2eclipse-webby>as an alternative,
but I have no idea if it'll work for your use case.




On Tue, Nov 6, 2012 at 9:48 PM, Jeff <[email protected]> wrote:

> Yes I have m2e-wtp installed and I already have webXml defined as part of
> the maven-war-plugin.
>
> The web.xml that is in the final assembly is correct.
>
> Does that mean something is broken?  Should I really need yet another
> plugin in my POM for m2e to work correctly?
> On Nov 6, 2012 1:01 PM, "Fred Bricon" <[email protected]> wrote:
>
>> assuming you installed m2e-wtp, you'll need to tell it to add extra
>> resources to WTP's deployment assembly.
>> Either make maven-war-plugin's <webXml> point to your gen'd web.xml or
>> add the CLI built war directory as a web resource.
>> Since this is a m2e-specific workaround, you can define a m2e profile in
>> your pom.xml like :
>>
>> <profile>
>>  <id>m2e</id>
>>  <activation>
>>    <property>
>>      <name>m2e.version</name>
>>    </property>
>>  </activation>
>>  <build>
>>   <plugins>
>>     <plugin>
>>       <groupId>org.apache.maven.plugins</groupId>
>>       <artifactId>maven-war-plugin</artifactId>
>>       <version>2.3</version>
>>       <configuration>
>>         <webResources>
>>           <resource>
>>             <directory>target/<warName></directory>
>>             <includes><include>**/some.file.pattern</include></includes>
>>           </resource>
>>         </webResources>
>>       </configuration>
>>     </plugin>
>>   </plugins>
>> </build>
>> </profile>
>>
>>
>>
>>
>>
>> On Tue, Nov 6, 2012 at 8:10 PM, Jeff <[email protected]> wrote:
>>
>>> Okay, I switched and installed the latest Eclipse 4.2.1 Juno with all
>>> the latest and greatest m2e plugins and connectors.  I can build and deploy
>>> my enunciate-enabled service and the service endpoints seem to work, but it
>>> won't pull up the enunciate-generated documentation at the path
>>> "/index.html" nor the JavaMelody monitoring URL at the path "/monitoring".
>>>
>>> I have index.html and rest.html listed in <welcome-file-list> as part of
>>> my stub web.xml and these settings are merged in the final web.xml but for
>>> some reason the app deployed via Eclipse doesn't seem to use the final
>>> web.xml.
>>>
>>> I'm still assuming an issue with how Eclipse + m2e is handling the
>>> web.xml generated by enunciate.
>>>
>>> The content of src/main/webapp/WEB-INF/web.xml has only the custom
>>> listeners and filters along with the <welcome-file-list>.
>>>
>>> In the enunciate.xml is configured to merge the contents of
>>> src/main/webapp/WEB-INF/web.xml with the generated settings.
>>>
>>> The final web.xml is located in the WAR as well as the
>>> target/<warname>/WEB-INF/web.xml and looks correct.
>>>
>>> If I deploy the WAR manually, it works fine, including all static
>>> resources and service endpoints.
>>>
>>> Is there a setting I'm missing in Eclipse or M2E that determines how it
>>> handles the web.xml content?
>>>
>>>
>>>
>>> On Fri, Nov 2, 2012 at 5:01 PM, Jeff <[email protected]> wrote:
>>>
>>>> I can't find the Maven Discovery option for Eclipse 3.7 Indigo.  I
>>>> installed Juno 4.2.1 and found it there, but we have people using
>>>> Indigo-based installs and can't find any Discovery or m2e plugins.
>>>>
>>>> What am I missing?
>>>>
>>>>
>>>> On Thu, Nov 1, 2012 at 5:59 PM, Johannes Wachter <[email protected]>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Did you also install the m2e-wtp integration that one normally uses
>>>>> with Maven WAR projects inside the Eclipse/m2e space.
>>>>>
>>>>> If not try to install it through Window/Preferences/Maven/Discovery.
>>>>>
>>>>> Though it could be a problem also with this integration that the
>>>>> web.xml is only present in the target folder.
>>>>>
>>>>> But since I haven't yet used a setup like yours I'm not sure.
>>>>>
>>>>> Regards,
>>>>> Johannes
>>>>> Am 01.11.2012 18:13 schrieb "Jeff" <[email protected]>:
>>>>>
>>>>> ...you'd think that would be the case, but it doesn't seem to be
>>>>>> unless I'm missing something.  :(  We do have m2e installed and we took a
>>>>>> very straight forward Maven project and did the "Import as existing Maven
>>>>>> project...".
>>>>>>
>>>>>> We could deploy and debug locally before I added enunciate.
>>>>>>
>>>>>> If I copy the contents of the web.xml that enunciate generated into
>>>>>> src/main/webapp/WEB-INF/web.xml, it works fine.
>>>>>>
>>>>>> The WAR file deploys to external servers and runs in Tomcat 6 just
>>>>>> fine.
>>>>>>
>>>>>> Just not within Eclipse environment.
>>>>>>
>>>>>>
>>>>>> On Thu, Nov 1, 2012 at 10:26 AM, Greg Thomas <[email protected]
>>>>>> > wrote:
>>>>>>
>>>>>>> On 1 November 2012 16:21, Jeff <[email protected]> wrote:
>>>>>>> > It's not Maven that can't find it.  I'm building and running the
>>>>>>> app in our
>>>>>>> > CD pipeline and in ... <cough>netbeans<cough>.  It is only an
>>>>>>> issue when
>>>>>>> > attempting to run/debug within the eclipse environment.
>>>>>>>
>>>>>>> If you've got m2e installed, then if Maven knows where the correct
>>>>>>> web.xml file is then m2e will tell Eclipse where the correct web.xml
>>>>>>> is ...
>>>>>>>
>>>>>>> Greg
>>>>>>> _______________________________________________
>>>>>>> m2e-users mailing list
>>>>>>> [email protected]
>>>>>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Jeff Vincent
>>>>>> [email protected]
>>>>>> See my LinkedIn profile at:
>>>>>> http://www.linkedin.com/in/rjeffreyvincent
>>>>>> I ♥ DropBox <http://db.tt/9O6LfBX> !!
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> m2e-users mailing list
>>>>>> [email protected]
>>>>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> m2e-users mailing list
>>>>> [email protected]
>>>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Jeff Vincent
>>>> [email protected]
>>>> See my LinkedIn profile at:
>>>> http://www.linkedin.com/in/rjeffreyvincent
>>>> I ♥ DropBox <http://db.tt/9O6LfBX> !!
>>>>
>>>>
>>>
>>>
>>> --
>>> Jeff Vincent
>>> [email protected]
>>> See my LinkedIn profile at:
>>> http://www.linkedin.com/in/rjeffreyvincent
>>> I ♥ DropBox <http://db.tt/9O6LfBX> !!
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>> _______________________________________________
>> m2e-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>
>>
> _______________________________________________
> 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
_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to