0

I tried to create Maven settings (settings.xml) as Config Map at OpenShift webConsole,but I got YAML file error.

Error message:

Error parsing YAML: YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 20, column 1:

YAML file:

apiVersion: v1
kind: ConfigMap
metadata:
  name: maven-settings
  namespace: sample-project
data:
 settings.xml: >
    <?xml version="1.0" encoding="UTF-8"?>

    <settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0
    http://maven.apache.org/xsd/settings-1.1.0.xsd">
      <servers>
        <server>
          <id>nexus-snapshots</id>
          <username>admin</username>
          <password>password</password>
        </server>
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Moe
  • 9
  • 1
  • 4
  • 1
    The error message hints at something *after* the code you pasted, since your code only has 19 lines. Is this the complete code you're giving? – flyx Jul 12 '21 at 09:54
  • If I copy and paste from question it worked.I guess by copy and pasting the cause of the problem was somehow removed .Thanks anyway.(It was complete code.) – Moe Jul 12 '21 at 11:04

0 Answers0