Ant script to build war file




















The clean and install implementations need no explanation:. Implementation of the test target leads to a dilemma about how to invoke the JUnit tests:. This error message is issued for every javac invocation:. The messy path to Trx. It would be helpful to define a property representing the full pathname. The project has no provision for automatically obtaining its dependencies. Ant has a nice feature which will allow us to define our own javac variation which will alway set that attribute appropriately.

This project-specific javac could be useful later if any other changes need to be made to all javac invocations. Here is the definition of our project-specific javac :. The build. In this example, we are creating a war file called fax. The WEB. XML file is obtained from the web source folder. However, we are excluding the portlet. Wrap the war task inside an Ant target usually package and run it. This will create the WAR file in the specified location. It is entirely possible to nest the classes, lib, metainf and webinf directors so that they live in scattered folders anywhere in the project structure.

But best practices suggest that your Web project should have the Web Content structure that is similar to the structure of the WAR file. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.

The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings.



0コメント

  • 1000 / 1000