# Executable JavaDoc Code Snippets

DevFeed: [Executable JavaDoc Code Snippets](<https://devfeed.tech/articles/executable-javadoc-code-snippets-18813.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/executable-javadoc-code-snippets/>)

Published: 2021-10-18T06:30:00Z

Content type: tutorial

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>), [Maven](<https://devfeed.tech/topics/maven.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [api-documentation](<https://devfeed.tech/tags/api-documentation.md>), [build](<https://devfeed.tech/tags/build.md>), [code](<https://devfeed.tech/tags/code.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [source](<https://devfeed.tech/tags/source.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

This tutorial explains how JEP 413 improves Java API documentation by allowing code snippets to be maintained as external source files. It shows how to configure Maven to use test-source snippets so they can be compiled and tested as part of the build.

## Source excerpt

Table of Contents Including Snippets From Your Test Directory Summary It has been just a few weeks since the release of Java 17, but the first changes scheduled for Java 18 begin to show up in early access builds. One feature in particular that excites me as a maintainer of different Java libraries is JEP 413 ("Code Snippets in Java API Documentation").