[英]Sencha cmd build : specify 2 --destinations
I am calling the following as part of a Maven build to generate my ExtJS project resources 我正在将以下内容作为Maven构建的一部分来生成我的ExtJS项目资源
sencha app build --destination "some path"
There is a requirement to copy the generated resource files into 2 locations within the project. 需要将生成的资源文件复制到项目中的2个位置。 Ideally I could specify 2 paths like this 理想情况下,我可以指定2条这样的路径
sencha app build --destination "first path" "second path"
This is not working nor is specifying the --destination argument before each path. 这不起作用,也没有在每个路径前指定--destination参数。
I could use a symlink to copy contents of first path into second but this could get complicated when working on branches where the symlink is not defined. 我可以使用符号链接将第一个路径的内容复制到第二个中,但是在未定义符号链接的分支上工作时,这可能会变得很复杂。
I looked into the Maven resources plugin: copy-resources but it starts copying the files before the Sencha build has finished. 我研究了Maven资源插件:copy-resources,但是它在Sencha构建完成之前开始复制文件。 How can I make this plugin wait until the build has finished ? 我怎样才能让这个插件等到构建完成?
Any other suggestions welcome 任何其他建议,欢迎
I managed to achieve this by changing the phase element value to 'package'. 我设法通过将相位元素值更改为“ package”来实现。 It now waits until the sencha build is complete before copying resources 现在,它会等到sencha构建完成后再复制资源
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-appCtx</id>
**<phase>package</phase>**
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/src/</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${project.basedir}/othersrc/</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.