This seems to only happen in Git Bash on Windows. My coworkers with Macs don't have the issue.
My error:
[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",
Things I've tried:
The exact command that fails is:
mvn apigee-enterprise:deploy -P$environment -Dusername=$username -Dpassword=$password
The command that works (but we don't want to use, because it wipes the current deploy and replaces it, losing historical info):
mvn apigee-enterprise:deploy -P$environment -Dapigee.options=clean -Dusername=$username -Dpassword=$password
Any ideas? I'm stumped.
Solved! Go to Solution.
Looks like the js files are not getting copied to target. You can force it by using the copy-resources via the plugin
<!-- 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>
Let me know if that helps. If it did, please accept the answer so that others can use this as reference.
Looks like the js files are not getting copied to target. You can force it by using the copy-resources via the plugin
<!-- 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>
Let me know if that helps. If it did, please accept the answer so that others can use this as reference.
Note that while this works to solve the copying, it is breaking our inclusion of additional Apigee policies that come from a parent POM and a "common" proxy that's outside the current one. As such, this is only a partial solution. My ultimate solution will be to convert over to a Mac, because this issue is only happening on Windows computers.
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |