AppAssembler Maven plugin为我生成分配功能做得很好。最后一个问题是生成的Shell脚本没有执行权限,所以我需要手动设置它们。appassembler maven插件没有在生成的脚本上设置“执行”权限
我在完成RedHat
有谁知道的清洁方式来自动设置呢?
AppAssembler Maven plugin为我生成分配功能做得很好。最后一个问题是生成的Shell脚本没有执行权限,所以我需要手动设置它们。appassembler maven插件没有在生成的脚本上设置“执行”权限
我在完成RedHat
有谁知道的清洁方式来自动设置呢?
做到这一点的唯一方法是与另一个Maven插件像Antrun
或Assembly
文件处理运行AppAssembler
后。
此问题(请参阅下面的链接)已在AppAssembler项目问题跟踪器中提出,并被拒绝为。
问题:MAPPASM-54
我认为它可以在你的assembly.xml
进行设置,在fileSet
标签:
<fileSets>
<fileSet>
<directory>src/resources/bin</directory>
<lineEnding>keep</lineEnding>
<useDefaultExcludes>true</useDefaultExcludes>
<outputDirectory>bin</outputDirectory>
<includes>
<include>*.bat</include>
<include>*.sh</include>
</includes>
<fileMode>744</fileMode>
</fileSet>
...
谢谢,但你的答案是关于Assembly插件。请按照问题中的链接,你会看到它是关于不同的插件。 –
对不起,莎莎,我一定误会你的问题。 – maksimov
由于Maven的3.0.3所有插件都在他们是在你的pom.xml的顺序执行。因此,以独立于平台的方式设置可执行标志与在appassembler插件后面使用maven-enforcer插件一样简单。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>enforce-beanshell</id>
<phase>package</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<evaluateBeanshell>
<condition>
import java.io.File;
print("set executable for file ${basedir}/dist/bin/mql");
new File("${basedir}/dist/bin/mql").setExecutable(true,false);
true;
</condition>
</evaluateBeanshell>
</rules>
<fail>false</fail>
</configuration>
</execution>
</executions>
</plugin>
2.0.0在生成的脚本上设置了+ x位。 –