Grails create-app does not produce build.xml? - grails

It is said here that grails create-app should produce a build.xml for ant or maven. However it does not (at least in version 1.3.7). How can I build it with ant?

In order to allow your project to be built with ant you must tell it to integrate with ant. Use the following grails command from your project directory to do so.
grails integrate-with --ant

With net-beans ide you can run grails command throw the right click option of your project root folder, and select "run/debug grails command...".
Choose "integrate-with" command and put "--ant" as an argument.

Related

Build a new Grails app by Gradle

I get a company's project from Github, and import into the GGTS as a gradle project. Everything runs OK. gradle task show this.
I want to create a new Grails app, so I used the command grails create-app wtf, and then import into GGTS as a Gradle project. What make me confused is that the file named build.gradle or the folder named .gradle do not appear, gradle task shows null like this, while I do the same thing in system of company and it runs fine.
Please tell me what happend? And I did not write a build.gradle in system of company manually.
The problem is Grails 2.4.4 does not use Gradle. That didn't start until Grails 3.0.
I believe you need to import the project as a Grails project (I haven't used ggts in a long time, so my recollection it's foggy). You can read more about IDE integration here.

How do I compile grails project using grails command line?

How do I compile my grails project? I want to get a .war file so I can deploy it.
First I installed JDK then I installed grails and I have properly set environment variables for both and checked it.Now I want to compile this grails project using grails command line.how can I do it?
Thanks in advance
If you type "grails help", you'll get a list of all the grails commands. The one you're looking for is "grails war"

Grails 2.5.1: use grails command-line tasks from binary plugin in lib folder

In Grails 2.5.1, is it possible to use grails command-line tasks from a binary plugin in the lib folder?
I had to modify an existing third-party plugin to get it to work properly.
I put the jar generated by the following command in my project's lib directory:
grails package-plugin --binary
When my project runs, it correctly uses my modified version of the plugin.
At build time, however, I need to run a Grails task on the command line that was provided by the plugin, but, using the binary plugin, the task does not appear to be available.
e.g., if the task was abc, when using the real plugin being referenced in the plugins section of BuildConfig.groovy, then I could run:
grails abc
Using the binary plugin in the lib folder, however, results in the task not being available from the command line.
Also, the original plugin hooked into grails war to include extra steps in the build process without changing the command line. These hooks no longer run with the binary plugin. Is there any way to reinstate the hooks for the binary plugin?
Thanks.

Apache Ant argument to generate portlet only

I'm working with Liferay and generating portlets with a Apache Ant-based build.
I want to generate a portlet project only without compiling it's codes.
How can I do it? What arguments must be passed to the ant command?
Just simply use the create.sh script that is in the portlets directory under the Plugins SDK to create a new portlet plugin project.
Install Plugins SDK
Go into portlets subdirectory on command line
Run the create.sh/create.bat and pass two arguments, one for name of portlet project and other for the display name.
All of this is fully documented here along with how to perform the same task using Liferay IDE (Eclipse plugin for Liferay development).
There are 2 files in the myProject-xmlportletfactory folder under the XmlPortletFactory folder: build.xml and myProject.xml.
When I run the ant in this path, it runs the build.xml.
In the buil.xml file, under the <target> tag there are to <ant> tags, the first builds services and classes for the project and the second compiles and deploys the project. if I delete the second tag and run the ant, it will build the project only and dont compile it.

grails doesn't generate ant build file

I'm a beginner of Grail. I learned from the quick-start tutorial that the grails create-app will generate a build.xml for Ant.
I execute the command. but couldn't get the build.xml file. Is there missing any steps? Any help is appreciated.
As Don said you really don't need it. But if you want the build.xml that used to be automatically created, run
grails integrate-with --ant
See http://grails.org/doc/latest/ref/Command%20Line/integrate-with.html
Grails may generate a build.xml file "under the hood", but there's no reason for you to worry about this, because you don't work with Ant directly when developing with Grails. Instead you use Grails commands (like create-app) to create, build, test, deploy, etc. Grails applications.
The create-app command creates a new application. To run the application, execute the command grails run-app from the root directory of the project.

Resources