Oct 28

 Extending the Application using IDEs

Sometimes you might want to extend and maintain your code. You might want to work on a local machine text editor, make changes and import these changes back into your application. Or you might also want to work on an IDE of your choice and comfort and take advantage of its Java code editing, testing and debugging features. In WaveMaker all this can be achieved easily as a modular client-side code (AngularJS, CSS, and HTML) incorporating industry best practices is generated. In this section, we list the steps for the same.

NOTE: Alternatively, you can use the WorkSpace Sync Plugin to ease this process. See here for details.

 

Steps in working with IDEs

  1. Export your project as a ZIP file.
  2. After exporting the project Unzip the downloaded zip file to a folder.
  3. Extraction of the files shows you a pom.xml file indicating it is Maven complaint.
  4. Open the command shell in extracted file system and install the project using Maven Clean Install, by running the command: mvn clean install

    NOTE: You need to have Maven and Java installed in the system.
    This downloads all external dependencies needed by the project and creates a WAR file.

    This war file can be deployed to any web server like Apache Tomcat.
  5. After the successful build, open the IDE which you need to import ex: IntelliJ and click on import project and set as Maven.
    Ref:- https://www.jetbrains.com/idea/help/importing-project-from-maven-model.html
    Ref:- http://www.eclipse.org/webtools/jst/components/j2ee/scenarios/MavenEclipseIntegration.html
  6. Set Run or Debug configurations as follows:
    Name: Maven Tomcat
    Working directory as project directory
    Command Line as tomcat:run -Dmaven.tomcat.port=8181
  7. Once you run the project in IntelliJ you will get console logs for required maven dependencies and so on. After everything is done you will observe a message as INFO: Starting Coyote HTTP/1.1 on http-8181
  8. Now open in browser with URL as http://localhost:8181/<Projectname>
  9. To debug any DB/Java service used in the app you need set src folder of DB or Java service which is located in the services section of your project as Mark directory as source root. Similarly, for any service, you need to set src directory as source root and enable debug point and run it.
  10. Once you are done with all the changes, run Maven Clean Install which will generate a ZIP file in target/exports folder.
  11. This file can be re-imported into Studio using the Update Source option from the project Developer Utilities Menu. The changes will be incorporated into your Studio application.

Integration with Jenkins

Ref for installing Jenkins https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins
WaveMaker provides two profiles development, production by default. To execute profiles user needs to execute the command as:
mvn clean install -Pdevelopment for development configuration and mvn clean install -Pproduction for production configuration. Install Jenkins and create a job and set windows batch command as maven command(mvn clean install -Pdevelopment)

 
We use cookies to provide you with a better experience. By using our website you agree to the use of cookies as described in our Privacy Policy.