Question

Netbeans project, is it possible to build deploy(.war) file into domain's autodeploy folder automatically, not in dist folder?
So that, it would be VERY useful to deploy project .war file to local glassfish server automatically.

Was it helpful?

Solution

You can automate almost all kinds of things, from compilation files processed by ant stages.

  • In project.properties file must add a reference for your end folder

war.custom.dir=/path/to/end/folder/

"this is not mandatory but is a correct method"

  • Then, in your build.xml file should add this chunk of code
   <target name="-post-dist">
       <echo message="Copy .war file to my custom folder"/>
       <copy file="${dist.war}" todir="${war.custom.dir}" />
   </target>

And your file .war, will move wherever you want.

Could also be changed your file in the build-impl.xml target "do-ear-dist" allowing directly effect the compression to your end folder.
Or you could also modify references in your project to work on your end folder, the mechanism is really very simple to customize as you think best.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top