前提・実現したいこと
Eclipseを使ってSpring BootでWebApiを作成しました。
プロジェクトを右クリック→デバッグ→サーバーでデバッグ
などで期待通りのものができていることを確認できたので、jarファイルを作成しようとしています。
調べたところMavenプロジェクトはpom.xmlに
<packaging>jar</packaging>
と記載し、そのPOMファイルがあるディレクトリで
mvn clean package -DskipTests=true
のMavenのコマンドを入力するとjarファイルが作成されるとあったのでそれを試してみました。
発生している問題・エラーメッセージ
C:\Users\user\java\workspace\SpringTest>mvn clean package -DskipTests=true [ERROR] Error executing Maven. [ERROR] 1 problem was encountered while building the effective settings [FATAL] Non-parseable settings C:\Users\user.m2\settings.xml: start tag not allowed in epilog but got s (position: END_TAG seen ...</settings>\r\n<s... @17:3) @ C:\Users\user.m2\settings.xml, line 17, column 3
というエラーメッセージが出力され失敗してしまいました。
該当のソースコード
C:\Users\user.m2\settings.xmlのファイルが以下の内容なのですが、エラーメッセージは</settings>が17行目にないと書いてある気がするのですが、</settings>は記載されています。
C:\Users\user.m2\settings.xml
1<?xml version="1.0" encoding="UTF-8"?> 2<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"> 4 <proxies> 5 <proxy> 6 <id>http_proxy</id> 7 <active>true</active> 8 <protocol>http</protocol> 9 <host>proxy.example.com</host> 10 <port>8080</port> 11 <username>username</username> 12 <password>password</password> 13 <nonProxyHosts>localhost|127.0.0.1</nonProxyHosts> 14 </proxy> 15 </proxies> 16</settings> 17<servers> 18 <server> 19 <id>localhost</id> 20 <username>user</username> 21 <password>pass</password> 22 </server> 23</servers>
なにが問題なのでしょうか?
わかる方がいたらよろしくお願いします。
補足情報(FW/ツールのバージョンなど)
Windows
Maven
Java
Spring boot

回答1件
あなたの回答
tips
プレビュー