chmod: cannot access with exec-maven-plugin version later 1.1
Consider a cofiguration:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
<executions>
<execution>
<id>script-chmod</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<workingDirectory>${project.build.directory}</workingDirectory>
<executable>chmod</executable>
<arguments>
<argument>+x</argument>
<argument>${project.build.directory}/target/tomcat/bin/*.sh</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>start-tomcat</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>target/tomcat/bin/startup.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
When exec-maven-plugin.version is 1.1 everything works, but when it 1.5.0, 1.4.0 ot 1.3.2 I got en error: chmod: cannot access ‘/mypath/tomcat/bin/*.sh’: No such file or directory
Note
version 1.1 works without workingDirectory tag.
To experiment you can download and extract tomcat version 7.0.68
Operation system is Ubuntu 15.10 java version is 1.8.0_66-b17 maven version 3.3.3
Hello, Same problem for me.
I tried the configuration below for the version 1.6.0 :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>Add execution rigths on bash scripts</id>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>chmod</executable>
<arguments>
<argument>755</argument>
<argument>${project.basedir}/env_dev/scripts/*.sh</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
I get a No such file or directory message at execution while the command chmod 755 ${project.basedir}/env_dev/scripts/*.sh work perfectly with the same user in the virtual machine.
Some news ?