Can I use Maven with Sencha Cmd instead of Ant, or should it use Ant?

We are making changes to using Sencha Cmd, but it uses Ant. We use Maven for other purposes, so can we make changes to the configuration file or something like that, so Sencha Cmd uses Maven not Ant, or do we need to install Ant to use Sencha Cmd.

Thanks in advance.

+3
source share
3 answers

You can create your Sencha ExtJS project using Maven using Sencha CMD. This is pretty easy. Check out my Sencha ExtJS 5 + Sencha Cmd 5 + Maven project example:

https://github.com/dobromyslov/sencha-extjs-maven

Sencha ExtJS 5.0 BETA . Sencha CMD docs .

webapp exec-maven-plugin ExtJS Sencha CMD :

<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>
            <!-- Set path to your Sencha Cmd executable-->
            <executable>../Sencha/Cmd/5.0.0.116/sencha</executable>
            <arguments>
                <argument>-sdk</argument>
                <argument>${basedir}/src/main/webapp</argument>
                <argument>app</argument>
                <argument>build</argument>
                <argument>--clean</argument>
                <argument>--environment</argument>
                <argument>${sencha.env}</argument>
                <argument>--destination</argument>
                <argument>${basedir}/src/main/webapp/build</argument>
            </arguments>
        </configuration>
    </execution>
</executions>

WAR, maven-war-plugin , :

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
    <failOnMissingWebXml>false</failOnMissingWebXml>
    <webResources>
        <resource>
            <directory>src/main/webapp/build/${sencha.env}/MyApp</directory>
            <excludes>
                <exclude>**/Readme.md</exclude>
            </excludes>
        </resource>
    </webResources>
    <packagingExcludes>.sencha/**,app/**,build/**,ext/**,overrides/**,packages/**,sass/**,bootstrap.css,bootstrap.js,bootstrap.json,build.xml,Readme.md</packagingExcludes>
</configuration>

+6

Maven , - , > Sencha Cmd Maven Ant

. Sencha Cmd Ant.

Ant Sencha Cmd

. Sencha Cmd Ant, .

maven? - Sencha Cmd Maven Antrun. Sencha Cmd Maven Antrun. Sencha Cmd Ant .

+2

Sencha Cmd comes with an Ant version that works with it. You do not need to install Ant separately.

+1
source

All Articles