Integrating Sencha Cmd compiling with Maven

Until now we have executed the Sencha Cmd compile command from the terminal. It would be far better to execute the command during the Maven build process. The index-prod.html and compiled all-classes.js files can then be generated automatically every time a build is performed. The following plugin when added to the Maven pom.xml file will perform the following action:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.2.1</version>                    
  <executions>
    <execution>
      <id>sencha-compile</id>
      <phase>compile</phase>
      <goals>
        <goal>exec</goal>
      </goals>
      <configuration>
        <executable>C:\Sencha\Cmd\4.0.0.203\sencha.exe</executable> <arguments> <argument>-sdk</argument> <argument> ...

Get Enterprise Application Development with Ext JS and Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.