I would like to create a command line tool to generate some java source code...e.g., a controller class, service class, and a DTO class. I've been trying to find the scripts for CreateController.groovy (from grails), but I've had no luck finding that script. Any help would be much appreciated. I think it might be done with Gant?
How to create a CLI script for code generation, like what "grails create-controller" does
164 Views Asked by Ron Stevenson At
1
There are 1 best solutions below
Related Questions in GRAILS
- No such property: id for class: java.lang.String
- Using like to non-string columns in Grails
- How to convert object reference that are in string form to that refrence class object?
- Restrict access to java-melody monitoring url
- Intercepting springsecurity behavior in grails
- Sort a Grails Domain list using a column index instead of column name
- Using service beans and dependency Injection in Geb Functional Tests
- how to create a pdf editor for grails
- Remove method of the List is not working
- Grails query based on Date
- Unit tests fail to run after upgrade from grails 2.3 to 2.5
- GGTS Classpath won't recognize folder on classpath after gradle eclipse
- Grails 2.4.4. hierarchical domain structure: find
- change input field value via javascript in grails
- Create skinny War file using Maven in Mavenized Grails
Related Questions in ANT
- Ant build should wait for a child process to complete
- Can Apache Ant be told to cache its XML files?
- How to run FindBugs off of Ivy downloaded JARs
- NoSuchMethodError after cleaning the project
- How do you specify a fop config file for fop.bat in ant script
- Multiple browser execution of sahi scripts at the same time
- Eclipse Auto-build eternal loop
- Getting error when running pig: Cannot locate pig-core-h2.jar. do 'ant -Dhadoopversion=23 jar', and try again
- Keep getting No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'
- How to import / reference a gradle application in android application using command line (ant)
- TestNG ANT: disable ONLY the html reporter
- Cannot compile Java adapter using adapter-builder task (ANT) in MFP v7
- Create checksum and pom for maven repo
- How can I install Apache Ant 1.9.5 and connect it to Android Studio 1.2.1.1 in Windows 8.1?
- Compiling Java with Ant - keep getting error JNI error has occurred
Related Questions in CODE-GENERATION
- Using Simulink Coder - atomic change of multidimensional parameters (matrix, vector)
- Generate C++ style code using LLVM
- Generate variable definition code from runtime data structure
- Hibernate Domain Object Generation
- Rails Generator Pass an Array of Arguments
- generation of java bytecode using JCodeModel
- How can I use Scala macros to create an object?
- Is there way to format code with line-breaks and indentation produced by ExpressionToCode
- JavaPoet Add Generic Parameter
- Visual Studio code generation - Use uppercase type names
- xtext generator how to prevent file override
- Openjpa generate entities from table skips one column
- Using TM_SELECTED_TEXT in my custom snippets
- Compiling java class from non-java file
- Dynamically update .csproj during Visual Studio build
Related Questions in GANT
- Gant build scripting, how to retrieve a task that I want to execute
- Groovy older version in Grails war
- Using a plugin in a Gant task with Grails
- How to add Root Node to the Tree Panel in extjs 4 mvc
- gant script with grails : includeTarget error
- Ilog gantt, stop deselecting pucks on mouse down
- Grails gant script to run test cases first and then run the application but It is giving cliScriptException
- How do I run test-app from within a gant script?
- Why Gant does not fail on positive integer returning target?
- grails: gant does not resolve calling classes
- Regex to find pairs of strings
- How to use non-interactive mode in your own Grails scripts?
- How to create a CLI script for code generation, like what "grails create-controller" does
- Ivy/gant include BlazeDS jars that aren`t in a public repo and have no version
- Using (multi lexeme) grails targets in gant scripts
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You haven't indicated what version of Grails you want to use and that may be relevant. For recent versions of Grails there is not a
CreateController.groovybut thecreate-controllercommand is defined at https://github.com/grails/grails-profile-repository/blob/master/profiles/web/commands/create-controller.yml.Not since Grails 2. If you are using Grails 1 or 2, then a Gant script might be what you are looking for. For Grails 2.5.6, the command is defined at https://github.com/grails/grails-core/blob/bd7cc10e17d34f20cedce979724f0e3bacd4cdb4/grails-scripts/src/main/scripts/CreateController.groovy.