2017-06-27 5 views
5

私は現在https://spring.io/guides/gs/maven/#scratchを通じてつもりだと私はちょうどpom.xmlにはどのようなタグコメントが適していますか?

<dependencies> 
    <!-- tag::joda[] --> 
    <dependency> 
     <groupId>joda-time</groupId> 
     <artifactId>joda-time</artifactId> 
     <version>2.9.2</version> 
    </dependency> 
    <!-- end::joda[] --> 
    <!-- tag::junit[] --> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.12</version> 
     <scope>test</scope> 
    </dependency> 
    <!-- end::junit[] --> 
</dependencies> 

を発見し、私は疑問に思う:

ため<!-- tag::joda[] -->良いですか?

答えて

0

Getting Started Guideあなたが読んでいる、AsciiDocファイルから生成されます。

https://github.com/spring-projects/spring-boot/blob/master/README.adoc

AsciiDocはのDocBook XMLへの文書フォーマットと同等です。 ソースコードの一部をコピーして貼り付ける代わりに、AsciiDoc構文でソースコードの一部を指すことができます。

次の構文を使用することができるのpom.xmlの一部含めるには:<!-- tag::joda[] -->が可能マーカーである、あなたの質問に答えるために

<!-- tag::joda[] --> 
<dependency> 
    <groupId>joda-time</groupId> 
    <artifactId>joda-time</artifactId> 
    <version>2.9.2</version> 
</dependency> 
<!-- end::joda[] --> 

スニペットが含まれます
include::complete/pom.xml[tag=joda] 

をAsciiDocを使用してファイルの一部を抽出し、Getting Startedガイドに挿入します。

関連する問題