我是Maven插件的新手,我需要讓這個插件運行sencha cmd工具來縮小我們的JavaScript應用程序,作爲日常構建過程的一部分。如何在此Maven插件中設置路徑?
當前可執行標籤有一個硬編碼路徑,但我想知道是否可以指定路徑作爲環境變量,然後在下面的代碼中訪問該環境變量,以便它可以在任何機器上運行?
<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\Sencha\Cmd\4.0.2.67\sencha.exe</executable>
<arguments>
<argument>app</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
什麼[webminifier - Maven的插件] (http://mojo.codehaus.org/webminifier-maven-plugin/)?爲什麼使用外部程序? – khmarbaise
Sencha Cmd工具可以解析ExtJS應用程序中各種JavaScript文件之間的依賴關係。如果這些依賴關係未解決,縮小會生成無法運行的代碼。 –