getting the following error , when i tried to do build
11:55:14,322 ERROR ConfigureMojo:138 - Index 0 out of bounds for length 0
The commmand which I had ran
run mvn apigee-enterprise:configure -X -P test -Dusername=abcd@abcd.com -Dpassword=somepassword
The Config file elements are
{
"configurations": [
{
"name": "test",
"proxies": [
{
"name": "default.xml",
"tokens": [
{
"xpath": "/ProxyEndpoint/HTTPProxyConnection/BasePath",
"value": "/v1/getWorkerImage"
}
]
}
],
"targets": [
{
"name": "default.xml",
"tokens": [
{
"xpath": "/TargetEndpoint/HTTPTargetConnection/URL",
"value": "https://google.com"
}
]
}
]
}
]
HI
Looks like your config.json is not a valid JSON. You are missing the ending "}" at the end.
{ "configurations":[ { "name":"test", "proxies":[ { "name":"default.xml", "tokens":[ { "xpath":"/ProxyEndpoint/HTTPProxyConnection/BasePath", "value":"/v1/getWorkerImage" } ] } ], "targets":[ { "name":"default.xml", "tokens":[ { "xpath":"/TargetEndpoint/HTTPTargetConnection/URL", "value":"https://google.com" } ] } ] } ] }
Try after correcting the file and let me know if the issue continues to happen
Yes, I had made the Config file proper parenthesis. I am running with Maven 3.0.5, JDK 12,
apigee-edge-maven-plugin-1.1.6.jar, will there be any significant impact?
But still getting the same error
Will need more info, can you share you pom ? Can you try the sample here and see if that works
Tried with the sample getting the same error.
pom-adnd-shared-pom.txt
Thanks for sharing. Can you try updating your Maven version ?
Hi Sai,
Thank you for your reply.
Yes tried with latest Maven version, Now I am getting the new errors
[DEBUG] =============Checking for Xpath Expressions /ProxyEndpoint/HTTPProxyConnection/BasePath ================
[DEBUG] =============Updated existing value /v1/getWorkerImage to new value /v1/getWorkerImage ================
[DEBUG] =============Searching for XML files in the following directory ================
C:\Google\src\gateway\GetWorkerImageTest\target\apiproxy\policies
[DEBUG] =============Number of files found is================
21
[DEBUG] =============Searching for XML files in the following directory ================
C:\Google\src\gateway\GetWorkerImageTest\target\apiproxy\stepdefinitions
[DEBUG] =============Number of files found is================
0
[ERROR]
=============No config tokens found for Environment test, for proxy file name AM_AddCORS.xml================
[ERROR] null
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.294 s
[INFO] Finished at: 2019-06-03T16:33:20+05:30
Looks like your proxy structure is not correct.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |