{"id":21278,"date":"2014-02-18T10:00:27","date_gmt":"2014-02-18T08:00:27","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=21278"},"modified":"2014-02-18T08:12:30","modified_gmt":"2014-02-18T06:12:30","slug":"creating-maven-source-and-javadoc-artifacts","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html","title":{"rendered":"Creating Maven Source and Javadoc Artifacts"},"content":{"rendered":"<p>Many people are aware of maven source and javadoc artifacts but don\u2019t know why they would want to create them. I was definitely in this camp \u2013 I can see why people want this information but it seemed like a relatively inefficient way to get it since it requires manual navigation of the maven repository.<\/p>\n<p>Then I got hit by a clue stick.<\/p>\n<p>These artifacts are used by IDEs, not people. If you\u2019re using maven dependencies the IDE is smart enough to know how to find these artifacts. The source artifact is used when you\u2019re single-stepping through code in the debugger \u2013 you no longer have to explicitly bind source code to libraries in the IDE. The javadoc artifact is used for auto-completion and context-sensitive help in the editor.<\/p>\n<p>Neither of these is required \u2013 I was happy using \u2018vi\u2019 for many years \u2013 but it definitely improves your productivity when you mostly know what you need but aren\u2019t quite sure of the details.<\/p>\n<h2>Source Artifacts<\/h2>\n<p>The source artifacts are the easiest to create. Add a plugin that will be run automatically as part of a standard build and you\u2019re done. Builds take slightly longer but it\u2019s probably not enough to worry about since you\u2019re just creating an archive of a few directories.<\/p>\n<pre class=\" brush:java\">&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n    xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;\r\n    &lt;build&gt;\r\n        &lt;plugins&gt;\r\n            &lt;!-- create source jar --&gt;\r\n            &lt;plugin&gt;\r\n                &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n                &lt;artifactId&gt;maven-source-plugin&lt;\/artifactId&gt;\r\n                &lt;version&gt;2.1.1&lt;\/version&gt;\r\n                &lt;executions&gt;\r\n                    &lt;execution&gt;\r\n                        &lt;id&gt;attach-sources&lt;\/id&gt;\r\n                        &lt;phase&gt;verify&lt;\/phase&gt;\r\n                        &lt;goals&gt;\r\n                            &lt;!-- produce source artifact for project main sources --&gt;\r\n                            &lt;goal&gt;jar-no-fork&lt;\/goal&gt;\r\n                            &lt;!-- produce test source artifact for project test sources --&gt;\r\n                            &lt;goal&gt;test-jar-no-fork&lt;\/goal&gt;\r\n                        &lt;\/goals&gt;\r\n                    &lt;\/execution&gt;\r\n                &lt;\/executions&gt;\r\n            &lt;\/plugin&gt;\r\n        &lt;\/plugins&gt;\r\n    &lt;\/build&gt;\r\n&lt;\/project&gt;<\/pre>\n<h2>Javadoc Artifacts<\/h2>\n<p>Javadoc artifacts are a little more complex since you\u2019ll probably want to create a human-friendly site at the same time. The biggest issue there, in my experience, is that external classes were opaque since it took so much effort to create the necessary links. The maven plugin now takes care of that for us!<\/p>\n<p>This artifact takes a significant amount of time to build so you probably don\u2019t want to do it every time. There are two approaches \u2013 either specify the maven target explicitly or tie it to a custom profile, e.g., \u2018javadoc\u2019. The configuration below uses a custom profile.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\" brush:xml\">&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n    xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;\r\n\r\n        &lt;profiles&gt;\r\n            &lt;!-- create javadoc --&gt;\r\n            &lt;profile&gt;\r\n                &lt;id&gt;javadoc&lt;\/id&gt;\r\n                &lt;build&gt;\r\n                    &lt;plugins&gt;\r\n                        &lt;plugin&gt;\r\n                            &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n                        &lt;artifactId&gt;maven-javadoc-plugin&lt;\/artifactId&gt;\r\n                        &lt;version&gt;2.9.1&lt;\/version&gt;\r\n                        &lt;configuration&gt;\r\n                            &lt;detectLinks \/&gt;\r\n                            &lt;includeDependencySources&gt;true&lt;\/includeDependencySources&gt;\r\n                            &lt;dependencySourceIncludes&gt;\r\n                                &lt;dependencySourceInclude&gt;com.invariantproperties.project.student:*&lt;\/dependencySourceInclude&gt;\r\n                            &lt;\/dependencySourceIncludes&gt;\r\n                            &lt;!-- heavily used dependencies --&gt;\r\n                            &lt;links&gt;\r\n                                &lt;link&gt;http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/&lt;\/link&gt;\r\n                                &lt;link&gt;http:\/\/docs.oracle.com\/javaee\/6\/api&lt;\/link&gt;\r\n                                &lt;link&gt;http:\/\/docs.spring.io\/spring\/docs\/current\/javadoc-api\/&lt;\/link&gt;\r\n                                &lt;link&gt;http:\/\/docs.spring.io\/spring-data\/commons\/docs\/1.6.2.RELEASE\/api\/&lt;\/link&gt;\r\n                                &lt;link&gt;http:\/\/docs.spring.io\/spring-data\/jpa\/docs\/1.4.3.RELEASE\/api\/&lt;\/link&gt;\r\n                                &lt;link&gt;http:\/\/docs.spring.io\/spring-data\/data-jpa\/docs\/1.4.3.RELEASE\/api\/&lt;\/link&gt;\r\n                                &lt;link&gt;https:\/\/jersey.java.net\/apidocs\/1.17\/jersey\/&lt;\/link&gt;\r\n                                &lt;link&gt;http:\/\/hamcrest.org\/JavaHamcrest\/javadoc\/1.3\/&lt;\/link&gt;\r\n                                &lt;link&gt;http:\/\/eclipse.org\/aspectj\/doc\/released\/runtime-api\/&lt;\/link&gt;\r\n                                &lt;link&gt;http:\/\/eclipse.org\/aspectj\/doc\/released\/weaver-api&lt;\/link&gt;\r\n                                &lt;link&gt;http:\/\/tapestry.apache.org\/5.3.7\/apidocs\/&lt;\/link&gt;\r\n                            &lt;\/links&gt;\r\n                        &lt;\/configuration&gt;\r\n                        &lt;executions&gt;\r\n                            &lt;execution&gt;\r\n                                &lt;id&gt;aggregate&lt;\/id&gt;\r\n                                &lt;!-- &lt;phase&gt;site&lt;\/phase&gt; --&gt;\r\n                                &lt;phase&gt;package&lt;\/phase&gt;\r\n                                &lt;goals&gt;\r\n                                    &lt;goal&gt;aggregate&lt;\/goal&gt;\r\n                                    &lt;goal&gt;jar&lt;\/goal&gt;\r\n                                &lt;\/goals&gt;\r\n                            &lt;\/execution&gt;\r\n                        &lt;\/executions&gt;\r\n                    &lt;\/plugin&gt;\r\n                &lt;\/plugins&gt;\r\n            &lt;\/build&gt;\r\n\r\n            &lt;reporting&gt;\r\n                &lt;plugins&gt;\r\n                    &lt;plugin&gt;\r\n                        &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n                        &lt;artifactId&gt;maven-javadoc-plugin&lt;\/artifactId&gt;\r\n                        &lt;version&gt;2.9.1&lt;\/version&gt;\r\n                        &lt;configuration&gt;\r\n                            &lt;!-- Default configuration for all reports --&gt;\r\n                        &lt;\/configuration&gt;\r\n                        &lt;reportSets&gt;\r\n                            &lt;reportSet&gt;\r\n                                &lt;id&gt;non-aggregate&lt;\/id&gt;\r\n                                &lt;configuration&gt;\r\n                                    &lt;!-- Specific configuration for the non aggregate report --&gt;\r\n                                &lt;\/configuration&gt;\r\n                                &lt;reports&gt;\r\n                                    &lt;report&gt;javadoc&lt;\/report&gt;\r\n                                &lt;\/reports&gt;\r\n                            &lt;\/reportSet&gt;\r\n                            &lt;reportSet&gt;\r\n                                &lt;id&gt;aggregate&lt;\/id&gt;\r\n                                &lt;configuration&gt;\r\n                                    &lt;!-- Specific configuration for the aggregate report --&gt;\r\n                                &lt;\/configuration&gt;\r\n                                &lt;reports&gt;\r\n                                    &lt;report&gt;aggregate&lt;\/report&gt;\r\n                                &lt;\/reports&gt;\r\n                            &lt;\/reportSet&gt;\r\n                        &lt;\/reportSets&gt;\r\n                    &lt;\/plugin&gt;\r\n                &lt;\/plugins&gt;\r\n            &lt;\/reporting&gt;\r\n        &lt;\/profile&gt;\r\n    &lt;\/profiles&gt;\r\n&lt;\/project&gt;<\/pre>\n<h2>package-info.java<\/h2>\n<p>Finally each package should have a <b>package-info.java<\/b> file. This replaces the old package-info.html file but is an improvement since it allows the use of class annotations. (It will not be compiled since it\u2019s an invalid class name.)<\/p>\n<p>I\u2019ve found it extremely helpful to include links to resources that help me understand why the classes look the way they do. For instance the metadata package in my \u2018student\u2019 project contains links to my blog posts, other blog posts that I\u2019ve found useful, and even the appropriate Oracle tutorial. At a company these could be links to wiki pages.<\/p>\n<pre class=\" brush:java\">\/**                     \r\n * Classes that support JPA Criteria Queries for persistent entities.\r\n *                          \r\n * @see &lt;a href=\"http:\/\/invariantproperties.com\/2013\/12\/19\/project-student-persistence-with-spring-data\/\"&gt;Project Student: Persistence with Spring Data&lt;\/a&gt;\r\n * @see &lt;a href=\"http:\/\/invariantproperties.com\/2013\/12\/29\/project-student-jpa-criteria-queries\/\"&gt;Project Student: JPA Criteria Queries&lt;\/a&gt;\r\n * @see &lt;a href=\"http:\/\/www.petrikainulainen.net\/programming\/spring-framework\/spring-data-jpa-tutorial-part-four-jpa-criteria-queries\/\"&gt;Spring Data JPA Tutorial Part Four: JPA Criteria Queries&lt;\/a&gt; [www.petrikainulainen.net]\r\n * @see &lt;a href=\"http:\/\/docs.oracle.com\/javaee\/6\/tutorial\/doc\/gjitv.html\"&gt;JEE Tutorial&lt;\/a&gt;      \r\n *  \r\n * @author Bear Giles &lt;bgiles@coyotesong.com&gt;\r\n *\/             \r\npackage com.invariantproperties.project.student.metamodel;<\/pre>\n<h2>Source Code<\/h2>\n<ul>\n<li>The source code is at <a href=\"https:\/\/github.com\/beargiles\/project-student\">https:\/\/github.com\/beargiles\/project-student<\/a> [github] and <a href=\"http:\/\/beargiles.github.io\/project-student\/\">http:\/\/beargiles.github.io\/project-student\/<\/a> [github pages].<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/invariantproperties.com\/2014\/01\/27\/creating-maven-sources-and-javadoc-artifacts\/\">Creating Maven Source and Javadoc Artifacts<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Bear Giles at the <a href=\"http:\/\/invariantproperties.com\/\">Invariant Properties<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Many people are aware of maven source and javadoc artifacts but don\u2019t know why they would want to create them. I was definitely in this camp \u2013 I can see why people want this information but it seemed like a relatively inefficient way to get it since it requires manual navigation of the maven repository. &hellip;<\/p>\n","protected":false},"author":113,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[68],"class_list":["post-21278","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-maven"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Creating Maven Source and Javadoc Artifacts<\/title>\n<meta name=\"description\" content=\"Many people are aware of maven source and javadoc artifacts but don\u2019t know why they would want to create them. I was definitely in this camp \u2013 I can see\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating Maven Source and Javadoc Artifacts\" \/>\n<meta property=\"og:description\" content=\"Many people are aware of maven source and javadoc artifacts but don\u2019t know why they would want to create them. I was definitely in this camp \u2013 I can see\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-02-18T08:00:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Bear Giles\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bear Giles\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html\"},\"author\":{\"name\":\"Bear Giles\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/91196fd6369bac9f4ec7217ffbca53f9\"},\"headline\":\"Creating Maven Source and Javadoc Artifacts\",\"datePublished\":\"2014-02-18T08:00:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html\"},\"wordCount\":471,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Apache Maven\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html\",\"name\":\"Creating Maven Source and Javadoc Artifacts\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2014-02-18T08:00:27+00:00\",\"description\":\"Many people are aware of maven source and javadoc artifacts but don\u2019t know why they would want to create them. I was definitely in this camp \u2013 I can see\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/02\\\/creating-maven-source-and-javadoc-artifacts.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Creating Maven Source and Javadoc Artifacts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/91196fd6369bac9f4ec7217ffbca53f9\",\"name\":\"Bear Giles\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c4e8f47b520b4147cb7f173f9d78cf8862974fdeeff4baea9d6a632cf7b1b54c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c4e8f47b520b4147cb7f173f9d78cf8862974fdeeff4baea9d6a632cf7b1b54c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c4e8f47b520b4147cb7f173f9d78cf8862974fdeeff4baea9d6a632cf7b1b54c?s=96&d=mm&r=g\",\"caption\":\"Bear Giles\"},\"sameAs\":[\"http:\\\/\\\/invariantproperties.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Bear-Giles\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Creating Maven Source and Javadoc Artifacts","description":"Many people are aware of maven source and javadoc artifacts but don\u2019t know why they would want to create them. I was definitely in this camp \u2013 I can see","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html","og_locale":"en_US","og_type":"article","og_title":"Creating Maven Source and Javadoc Artifacts","og_description":"Many people are aware of maven source and javadoc artifacts but don\u2019t know why they would want to create them. I was definitely in this camp \u2013 I can see","og_url":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-02-18T08:00:27+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Bear Giles","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Bear Giles","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html"},"author":{"name":"Bear Giles","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/91196fd6369bac9f4ec7217ffbca53f9"},"headline":"Creating Maven Source and Javadoc Artifacts","datePublished":"2014-02-18T08:00:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html"},"wordCount":471,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Apache Maven"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html","url":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html","name":"Creating Maven Source and Javadoc Artifacts","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2014-02-18T08:00:27+00:00","description":"Many people are aware of maven source and javadoc artifacts but don\u2019t know why they would want to create them. I was definitely in this camp \u2013 I can see","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/02\/creating-maven-source-and-javadoc-artifacts.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Creating Maven Source and Javadoc Artifacts"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/91196fd6369bac9f4ec7217ffbca53f9","name":"Bear Giles","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c4e8f47b520b4147cb7f173f9d78cf8862974fdeeff4baea9d6a632cf7b1b54c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c4e8f47b520b4147cb7f173f9d78cf8862974fdeeff4baea9d6a632cf7b1b54c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c4e8f47b520b4147cb7f173f9d78cf8862974fdeeff4baea9d6a632cf7b1b54c?s=96&d=mm&r=g","caption":"Bear Giles"},"sameAs":["http:\/\/invariantproperties.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Bear-Giles"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/21278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=21278"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/21278\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=21278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=21278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=21278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}