2017-02-07 4 views
0

を実行することはできませんが、私はシェルスクリプトMavenの:ここでシェルスクリプト

  <plugin> 
       <artifactId>exec-maven-plugin</artifactId> 
       <groupId>org.codehaus.mojo</groupId> 
       <executions> 
        <execution><!-- Build Python Executable --> 
         <id>Build Python</id> 
         <phase>generate-sources</phase> 
         <goals> 
          <goal>exec</goal> 
         </goals> 
         <configuration> 
          <executable>${basedir}/scripts/buildPython.sh</executable> 
         </configuration> 
        </execution> 
       </executions> 
       <configuration> 
        <executable>chmod</executable> 
        <arguments> 
         <argument>+x</argument> 
         <argument>${basedir}/scripts/buildPython.sh</argument> 
        </arguments> 
       </configuration> 
      </plugin> 

を実行しようとしていますが、私は

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec (Build Python) on project packaging: Command execution failed. Cannot run program "/ajbfiausbf/scripts/buildPython.sh" (in directory "/ajbfiausbf`"): error=13, Permission denied -> [Help 1] 

は私が間違って何をやって取得する方法ですか?

答えて

1

あなたのエラーから、私は

エラーを見ることができる= 13、許可は、それが問題を解決するかどうかを確認するためにアリプラグインのchmodタスクを使用してbuildPython.shに権限を与えてみ

を否定しました。下記を参照してください。

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-antrun-plugin</artifactId> 
      <version>1.8</version> 
      <executions> 
       <execution> 
        <id>build</id> 
        <phase>compile</phase> 
        <goals> 
         <goal>run</goal> 
        </goals> 
        <configuration> 
         <target> 
          <echo>run chmod in ${basedir}</echo> 
          <chmod file="${basedir}/scripts/buildPython.sh" perm="ugo+rx"/> 
         </target> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 

gitまたはsvn:subversionの実行可能プロパティについては、.gitattributesを使用して永久に許可してください。

ありがとうございました

+0

私はmavenを使用して権限を与えたいと思います。どうやってやるの?私は ''タグがそれを処理すると思った。 – AbtPst

+0

私は自分の答えを変更した。 – GauravJ

関連する問題