2014-02-13 35 views

回答

1

Sencha Cmd提供了與它一起工作的Ant版本。您不需要單獨安裝Ant。

2

我們使用Maven其他的東西,所以我們可以修改配置文件什麼的,所以>煎茶Cmd的使用Maven的不螞蟻

號煎茶cmd是建立在螞蟻。

必須我們已經安裝了Ant使用煎茶Cmd的

號煎茶cmd是提供一個Ant版本,它被使用。

如何與maven一起使用它?最簡單的方法是使用安裝的Sencha命令與Maven Antrun plugin。 看看我的評論Simple use of Sencha Cmd and Maven Antrun plugin。 延伸閱讀關於Sencha Cmd and Ant integration

6

您可以使用Sencha CMD使用Maven構建您的Sencha ExtJS項目。這很容易。 檢查我的示例項目煎茶ExtJS的5 +煎茶Cmd的5 + Maven的:

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

Sencha ExtJS 5.0 BETA available的時刻。 閱讀Sencha CMD docs並嘗試它的行動。

然後,只需把你的項目在webapp文件夾並使用exec-maven-plugin與煎茶CMD這樣建立自己的ExtJS的應用程序:

<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>