2016-07-09 2 views
1

だから私はこのエラーを取得する:Apigeeのデプロイメントに奇妙なリソースがない、WindowsでMavenの問題が起こる可能性がありますか?

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.1:deploy (default-cli) on project reporting: MojoExecutionException: com.google.api.client.http.HttpResponseException: 400 Bad Request 
[ERROR] { 
[ERROR] "code" : "messaging.config.beans.InvalidResourceURLRef", 
[ERROR] "message" : "Invalid resource url ref jsc://js_validateReportingWriteScope3.js in policy js_validateReportingWriteScope3 in cambiahealth-nonprod", 
[ERROR] "contexts" : [ ], 
[ERROR] "cause" : { 
[ERROR] "code" : "messaging.config.beans.ResourceDoesNotExist", 
[ERROR] "message" : "Resource with name js_validateReportingWriteScope3.js and type jsc does not exist", 

ファイルが間違いなく存在します。私が試した:

  1. MVNクリーン
  2. MVN依存性:パージ-ローカルリポジトリは
  3. IntelliJのは、キャッシュを無効にし、すべてのローカルファイルを削除し、リモートレポ
  4. Iからのクローニング
  5. を再起動しますファイル名に「3」と表示されている理由は何ですか?ファイル名に新しい名前を付けて名前を変更しようとしました。

私の同僚は、 oデプロイメントは、Mac上にあります。私はWindows上にいる。

失敗したコマンドは次のとおりです。

mvn apigee-enterprise:deploy -P$environment -Dusername=$username -Dpassword=$password 

動作します(しかし、それは現在の展開を払拭し、それを置き換えるために、我々は歴史的な情報を失うことを、使用しない)コマンド:

mvn apigee-enterprise:deploy -P$environment -Dapigee.options=clean -Dusername=$username -Dpassword=$password 

どうすればよいですか?このエラーは私には意味がありません。 .jsファイルは間違いなく存在します。

+1

git bashでコマンドを実行していますか? '$ environment'はWindowsのCMDセッションでは動作しないため、' -P%environnment% 'は' -P%environnment% 'となります。 – VonC

+0

これはGit Bashにあります、はい!私は月曜日に仕事をしているときにそれを試みます。ありがとうございました。 –

+0

'$ environment'はgit bashの正しい構文ですが、チェックはそれらの変数が設定されています。 – VonC

答えて

1

このXMLブロックを親POMの下に置くと、すぐに問題が解決します。しかし、それは私のために副作用を作り出していることに注意してください。親POMと現在のもの以外の「共通の」プロキシから来る追加のApigeeポリシーの追加を壊しています。したがって、これは部分的な解決策にすぎません。私の究極の解決策は、Macに変換することです。なぜなら、この問題はWindowsコンピュータでしか起こらないからです。

<!-- copy the full apiproxy folder to target folder --> 
<plugin> 
    <artifactId>maven-resources-plugin</artifactId> 
    <version>2.6</version> 
    <executions> 
     <execution> 
      <id>copy-resources</id> 
      <phase>package</phase> 
      <goals> 
       <goal>copy-resources</goal> 
      </goals> 
      <configuration> 
       <!--this is important --> 
       <overwrite>true</overwrite> 
       <!--target --> 
       <outputDirectory>${target.root.dir}/apiproxy</outputDirectory> 
       <resources> 
        <resource> 
         <!--source --> 
         <directory>${project.root.dir}/apiproxy</directory> 
        </resource> 
       </resources> 
      </configuration> 
     </execution> 
    </executions> 
</plugin> 
関連する問題