Maven ear / war problems and 'deployment to conservation' does not work

I have an ear project that installs ajb module and 2 wars. Each of them is declared as a maven dependency. I use maven-ejb-plugin, maven-ear-plugin and maven-war-plugin. All projects have a common super-pom, each of which is declared as a module.

When I run the ear project, changing the web resource in the war will not redeploy it to the server, although I checked the “expand while saving” wherever I could (war / ear).

Some information that may be helpful:

  • I did not create pom.xml from netbeans. The projects were previously an ant project, which I migrated to simulate what the netbeans seem to generate from the / earb / war installation.
  • Sometimes it’s hard for me to make changes to my war file. I need to clear all projects, stop the server, etc. I think something is wrong somewhere. I believe that only modifying my files and starting the maven installation (or running "run" or "debug") should work?
  • I am launching an ear project (not sure if I should not run superpow somehow).
  • Netbeans does not launch the correct URL when the browser starts (/XXX-1.0-snapshot instead of / XXX, which I specified and which actually works). I always need to manually edit it in the address bar. Could it be connected?

EDIT: Seeing this for a local project: Seeing this for a local project:

Download: http://repository.primefaces.org/be/valuya/xyzproj/XYZproj-ejb/1.0-SNAPSHOT/maven-metadata.xml

EDIT2: this netbeans error: http://netbeans.org/bugzilla/show_bug.cgi?id=218806

+4
source share
1 answer

expand on save : this option is only applicable if the netbeans.deploy property is set to true (this means that netbeans will handle the deployment of your webapp and will track your files and redistribute when necessary). in netbeans, right-click on your maven project, go to "properties", select "actions" in the category list, select "run action", and you can specify netbeans.deploy=true in the "set properties" text box.

make war changes : if I'm not mistaken, you only encounter this problem when changing static web content (e.g. html, css, javascript, etc.). this is because most servers store a map of static content and lock files to improve performance. You need to configure the server to disable memory mapped files. the configuration depends on the server (glassfish / jetty / tomcat) that you are using.

netbean is starting the wrong URL : netbeans uses a URL based on the folder name of your project. I havent been able to change this either (it always resets), so I assume this is an IDE error.

+1
source

Source: https://habr.com/ru/post/1432081/


All Articles