[{"data":1,"prerenderedAt":522,"buildId":523},["ShallowReactive",2],{"breadcrumbs:\u002Fsoftware-bill-of-materials\u002Fmaven-based-java-projects":3,"feed:\u002Fsoftware-bill-of-materials\u002Fmaven-based-java-projects":10,"page:\u002Fsoftware-bill-of-materials\u002Fmaven-based-java-projects":11,"sections:\u002Fsoftware-bill-of-materials\u002Fmaven-based-java-projects":331,"site:footer":334,"site:navigation":395,"site:settings":488},[4,7],{"to":5,"label":6},"\u002F","Eclipse Foundation Project Handbook",{"to":8,"label":9},"\u002Fsoftware-bill-of-materials\u002F","Software Bill of Materials",false,{"id":12,"title":13,"aliases":14,"body":15,"breadcrumbTitle":14,"breadcrumbs":14,"date":14,"description":323,"extension":324,"featuredFooter":14,"header":14,"keywords":14,"meta":325,"navigation":326,"path":327,"redirectUrl":14,"rssFeed":14,"seo":328,"seoTitle":14,"socialImage":14,"stem":329,"visibility":14,"width":14,"__hash__":330},"pages\u002F8.software-bill-of-materials\u002F2.maven-based-java-projects.md","Maven-Based Java Projects",null,{"type":16,"value":17,"toc":315},"minimark",[18,31,38,41,46,49,52,194,198,206,216,222,232,259,265,285],[19,20,21,22,26,27,30],"p",{},"The ",[23,24,25],"code",{},"spdx-maven-plugin"," and ",[23,28,29],{},"cyclonedx-maven-plugin"," Maven plugins build, respectively, SPDX and CycloneDX-compliant SBOMs. Both do a good job of capturing information about project content as well as the transitive closure of all dependencies.",[19,32,33,34,37],{},"The quality of the results of using these plugins depends on the quality of the metadata available to the plugin. For Maven-based builds, metadata is provided primarily via the ",[23,35,36],{},"pom.xml"," file. This includes dependencies, description, identity of the developers, location of source repositories, licenses, and more. The overall completeness and quality of metadata varies greatly: dependencies are generally specified correctly (they may include extra dependencies that are no longer used), but most of the other fields are either not provided, contain inaccurate data, or are specified in inconsistent formats.",[19,39,40],{},"License information, for example, tends to be specified by name. When multiple licenses are involved, they tend to be specified as individual entries with no explicit indication of how the licenses are combined.",[42,43,45],"h2",{"id":44},"maven-metadata-best-practices","Maven Metadata Best Practices",[19,47,48],{},"The quality of the SBOMs depends on the quality of the metadata provided.",[19,50,51],{},"We recommend adopting the following practices.",[53,54,55,69,77,149,157,182],"ul",{},[56,57,58,62,65,66,68],"li",{},[59,60,61],"strong",{},"Ensure that metadata is accurate",[63,64],"br",{},"SBOM generation leverages the metadata provided in the ",[23,67,36],{}," file, so specifying that information accurately improves the quality of the SBOM.",[56,70,71,74,76],{},[59,72,73],{},"Specify license data at the module level",[63,75],{},"If it is truly the case that all modules are distributed under the same license terms, then the license can (and indeed should) be specified at the parent level. When individual modules have different license terms, then those should be specified at the module level.",[56,78,79,82,84,85,92,93,103,105,106,111,112,115,116,122,124,125,128,129,131,132],{},[59,80,81],{},"Specify the license as an SPDX identifier or expression",[63,83],{},"When the content is distributed under a single license, specify that license as an ",[86,87,91],"a",{"href":88,"rel":89},"https:\u002F\u002Fspdx.org\u002Flicenses\u002F",[90],"nofollow","SPDX identifier",". For example, to express that the content is distributed under the Eclipse Public License 2.0:",[94,95,101],"pre",{"className":96,"code":98,"language":99,"meta":100},[97],"language-xml","\u003Clicenses>\n        \u003Clicense>\n                \u003Cname>EPL-2.0\u003C\u002Fname>\n                \u003Curl>https:\u002F\u002Fwww.eclipse.org\u002Forg\u002Fdocuments\u002Fepl-2.0\u002FEPL-2.0.txt\u003C\u002Furl>\n        \u003C\u002Flicense>\n\u003C\u002Flicenses>\n","xml","",[23,102,98],{"__ignoreMap":100},[63,104],{},"When the content is distributed under multiple licenses, specify the license as an ",[86,107,110],{"href":108,"rel":109},"https:\u002F\u002Fspdx.github.io\u002Fspdx-spec\u002Fv2.3\u002FSPDX-license-expressions\u002F",[90],"SPDX expression",". For example, to express that content may be consumed under either the Eclipse Public License 2.0 or the GNU Public License 2.0 with the Classpath Exception (",[23,113,114],{},"EPL-2.0 or GPL-2.0-only with Classpath-exception-2.0","):",[94,117,120],{"className":118,"code":119,"language":99,"meta":100},[97],"\u003Clicenses>\n        \u003Clicense>\n                \u003Cname>EPL-2.0 or GPL-2.0-only with Classpath-Exception-2.0\u003C\u002Fname>\n        \u003C\u002Flicense>\n\u003C\u002Flicenses>\n",[23,121,119],{"__ignoreMap":100},[63,123],{},"Note that ",[23,126,127],{},"url"," can be considered optional. Specifying a ",[23,130,127],{}," does not make sense when specifying a license expression.",[133,134,135],"blockquote",{},[19,136,137,140,141,144,145,148],{},[59,138,139],{},"Tip:"," SPDX expressions should be written from the consumer’s perspective. Use ",[23,142,143],{},"or"," to express that a consumer can choose between licenses. Use ",[23,146,147],{},"and"," to express that a consumer must accept the terms of multiple licenses.",[56,150,151,154,156],{},[59,152,153],{},"Express only the license of the project content",[63,155],{},"Do not include license information for dependencies.",[56,158,159,162,164,165,168,169,168,172,168,175,168,178,181],{},[59,160,161],{},"Specify all of the metadata",[63,163],{},"All of it goes into the SBOM. Specify the ",[23,166,167],{},"name",", ",[23,170,171],{},"description",[23,173,174],{},"organisation",[23,176,177],{},"scm",[23,179,180],{},"issueManagement",", …​",[56,183,184,187,189,190,193],{},[59,185,186],{},"Correctly use Maven scope",[63,188],{},"For example, JUnit should be in the ",[23,191,192],{},"test"," scope where it will be ignored by the SBOM generator plugin.",[42,195,197],{"id":196},"cyclonedx-sboms-for-maven","CycloneDX SBOMs for Maven",[19,199,21,200,205],{},[86,201,204],{"href":202,"rel":203},"https:\u002F\u002Fcyclonedx.github.io\u002Fcyclonedx-maven-plugin\u002F",[90],"CycloneDX Maven plugin"," can be used to generate a CycloneDX SBOM directly from a Maven build.",[19,207,208,209,212,213,215],{},"Add the following to the ",[23,210,211],{},"build\u002Fplugins"," section of your ",[23,214,36],{}," file.",[94,217,220],{"className":218,"code":219,"language":99,"meta":100},[97],"\u003Cbuild>\n        ...\n        \u003Cplugins>\n                ...\n                \u003Cplugin>\n                        \u003CgroupId>org.cyclonedx\u003C\u002FgroupId>\n                        \u003CartifactId>cyclonedx-maven-plugin\u003C\u002FartifactId>\n                        \u003Cversion>2.7.9\u003C\u002Fversion>\n                        \u003Cconfiguration>\n                                \u003CschemaVersion>1.4\u003C\u002FschemaVersion>\n                                \u003CprojectType>library\u003C\u002FprojectType>\n                        \u003C\u002Fconfiguration>\n                        \u003Cexecutions>\n                                \u003Cexecution>\n                                        \u003Cphase>package\u003C\u002Fphase>\n                                        \u003Cgoals>\n                                                \u003Cgoal>makeAggregateBom\u003C\u002Fgoal>\n                                        \u003C\u002Fgoals>\n                                \u003C\u002Fexecution>\n                        \u003C\u002Fexecutions>\n                \u003C\u002Fplugin>\n        \u003C\u002Fplugins>\n\u003C\u002Fbuild>\n",[23,221,219],{"__ignoreMap":100},[133,223,224],{},[19,225,226,228,229,231],{},[59,227,139],{}," Add this to your parent ",[23,230,36],{}," to generate the SBOM for all modules.",[19,233,234,235,238,239,241,242,168,245,168,248,251,252,255,256,258],{},"The default configuration will automatically ",[59,236,237],{},"exclude"," dependencies that are declared in the ",[23,240,192],{}," scope, but will include dependencies that are included in the ",[23,243,244],{},"compile",[23,246,247],{},"provided",[23,249,250],{},"runtime",", and ",[23,253,254],{},"system"," scopes. You can tune the configuration to exclude other scopes (or include the ",[23,257,192],{}," scope).",[94,260,263],{"className":261,"code":262,"language":99,"meta":100},[97],"\u003Cconfiguration>\n        ...\n        \u003CincludeCompileScope>true\u003C\u002FincludeCompileScope>\n        \u003CincludeProvidedScope>true\u003C\u002FincludeProvidedScope>\n        \u003CincludeRuntimeScope>true\u003C\u002FincludeRuntimeScope>\n        \u003CincludeSystemScope>true\u003C\u002FincludeSystemScope>\n        \u003CincludeTestScope>false\u003C\u002FincludeTestScope>\n        ...\n\u003C\u002Fconfiguration>\n",[23,264,262],{"__ignoreMap":100},[19,266,21,267,270,271,274,275,278,279,284],{},[23,268,269],{},"projectType"," value expresses in the nature of the content that’s produced by the build. The value ",[23,272,273],{},"library"," (the default) expresses that the content is a library (e.g., a Java JAR file). Other values (e.g., ",[23,276,277],{},"application",") may also be used depending on the nature of the content . There’s more help in the ",[86,280,283],{"href":281,"rel":282},"https:\u002F\u002Fcyclonedx.org\u002Fdocs\u002F1.4\u002Fjson\u002F#metadata_component_type",[90],"CycloneDX documentation",".",[286,287,288,293],"page-sidebar",{},[289,290,292],"h3",{"id":291},"in-this-chapter","In this chapter",[53,294,295,299,305,309],{},[56,296,297],{},[86,298,9],{"href":8},[56,300,301],{},[86,302,304],{"href":303},"\u002Fsoftware-bill-of-materials\u002Ffundamentals\u002F","Fundamentals",[56,306,307],{},[59,308,13],{},[56,310,311],{},[86,312,314],{"href":313},"\u002Fsoftware-bill-of-materials\u002Fnode-based-projects\u002F","Node-based Projects",{"title":100,"searchDepth":316,"depth":316,"links":317},2,[318,319],{"id":44,"depth":316,"text":45},{"id":196,"depth":316,"text":197,"children":320},[321],{"id":291,"depth":322,"text":292},3,"The spdx-maven-plugin and cyclonedx-maven-plugin Maven plugins build, respectively, SPDX and CycloneDX-compliant SBOMs.","md",{},true,"\u002Fsoftware-bill-of-materials\u002Fmaven-based-java-projects",{"title":13,"description":323},"8.software-bill-of-materials\u002F2.maven-based-java-projects","T6Vy6Gt5stgKB88TgorbhNqzvxL_aQ-7JBy2yvA3Rfc",[332],{"path":333,"title":9,"visibility":14},"\u002Fsoftware-bill-of-materials",{"id":335,"backToTopText":14,"callToAction":14,"colorMode":336,"copyright":341,"description":342,"extension":343,"manageCookiesText":344,"meta":345,"sections":346,"socialsHeading":392,"stem":393,"__hash__":394},"footer\u002Fdata\u002Ffooter.yml",{"label":337,"system":338,"light":339,"dark":340},"Colour mode","System","Light","Dark","Copyright © Eclipse Foundation AISBL. All Rights Reserved.","How open source projects are proposed, run and released at the Eclipse Foundation.","yml","Manage Cookies",{},[347,360,373],{"id":348,"heading":349,"links":350},"footer-eclipse-foundation","Eclipse Foundation",[351,354,357],{"text":352,"href":353},"About","https:\u002F\u002Fwww.eclipse.org\u002Forg\u002F",{"text":355,"href":356},"Projects","https:\u002F\u002Fprojects.eclipse.org\u002F",{"text":358,"href":359},"Membership","https:\u002F\u002Fwww.eclipse.org\u002Fmembership\u002F",{"id":361,"heading":362,"showManageCookies":326,"links":363},"footer-legal","Legal",[364,367,370],{"text":365,"href":366},"Privacy Policy","https:\u002F\u002Fwww.eclipse.org\u002Flegal\u002Fprivacy\u002F",{"text":368,"href":369},"Terms of Use","https:\u002F\u002Fwww.eclipse.org\u002Flegal\u002Fterms-of-use\u002F",{"text":371,"href":372},"Code of Conduct","https:\u002F\u002Fwww.eclipse.org\u002Forg\u002Fdocuments\u002FCommunity_Code_of_Conduct.php",{"id":374,"heading":375,"links":376},"footer-site","Eclipse Project Handbook",[377,380,383,386,389],{"text":378,"href":379},"Overview","\u002Foverview\u002F",{"text":381,"href":382},"Project checklist","\u002Fproject-checklist\u002F",{"text":384,"href":385},"Glossary","\u002Fglossary\u002F",{"text":387,"href":388},"Getting help","\u002Fgetting-help\u002F",{"text":390,"href":391},"Change log","\u002Fchange-log\u002F","Follow us:","data\u002Ffooter","ZvhD6CFXH27OiD2yqB3mjl9Df8GotJScE3ITS4beP3s",{"id":396,"extension":343,"main":397,"meta":485,"stem":486,"__hash__":487},"navigation\u002Fdata\u002Fnavigation.yml",[398,410,431,453,471],{"text":399,"children":400},"Getting started",[401,402,405,408,409],{"text":378,"href":379},{"text":403,"href":404},"Starting a project","\u002Fstarting-a-project\u002F",{"text":406,"href":407},"Incubation","\u002Fincubation\u002F",{"text":381,"href":382},{"text":387,"href":388},{"text":411,"children":412},"People",[413,416,419,422,425,428],{"text":414,"href":415},"Project roles","\u002Fproject-roles\u002F",{"text":417,"href":418},"Contributing","\u002Fcontributing\u002F",{"text":420,"href":421},"Elections","\u002Felections\u002F",{"text":423,"href":424},"Committer paperwork","\u002Fcommitter-paperwork\u002F",{"text":426,"href":427},"Identity verification","\u002Fidentity-verification\u002F",{"text":429,"href":430},"Community","\u002Fcommunity\u002F",{"text":432,"children":433},"Running a project",[434,437,440,443,446,447,450],{"text":435,"href":436},"Resources and services","\u002Fproject-resources-and-services\u002F",{"text":438,"href":439},"Project Management Infrastructure","\u002Fproject-management-infrastructure\u002F",{"text":441,"href":442},"Releases and reviews","\u002Freleases-and-reviews\u002F",{"text":444,"href":445},"Vulnerabilities","\u002Fvulnerabilities\u002F",{"text":9,"href":8},{"text":448,"href":449},"Project branding","\u002Fproject-branding\u002F",{"text":451,"href":452},"Promoting your project","\u002Fpromoting-your-project\u002F",{"text":454,"children":455},"IP and legal",[456,459,462,465,468],{"text":457,"href":458},"Intellectual property","\u002Fintellectual-property\u002F",{"text":460,"href":461},"Using artificial intelligence","\u002Fartificial-intelligence\u002F",{"text":463,"href":464},"Legal documentation","\u002Flegal-documentation\u002F",{"text":466,"href":467},"Legal documentation for plug-ins","\u002Flegal-documentation-for-plug-ins\u002F",{"text":469,"href":470},"Data protection impact assessment","\u002Fdata-protection-impact-assessment\u002F",{"text":472,"children":473},"Process",[474,477,480,481,482],{"text":475,"href":476},"Eclipse Foundation Development Process","\u002Fdevelopment-process\u002F",{"text":478,"href":479},"Specifications","\u002Fspecifications\u002F",{"text":384,"href":385},{"text":390,"href":391},{"text":483,"href":484},"Notices","\u002Fnotices\u002F",{},"data\u002Fnavigation","fgy6mUpUX6VDgpStO8SkJA34CgOFyHHPtqwYQUgtSYk",{"id":489,"title":375,"assistant":490,"callForAction":14,"description":499,"extension":343,"heroImage":14,"keywords":500,"logo":504,"logoInverse":505,"logoWidth":506,"meta":507,"seoTitleSuffix":508,"socialImage":509,"socials":511,"stem":520,"__hash__":521},"settings\u002Fdata\u002Fsettings.yml",{"name":491,"intro":492,"disclaimer":493,"instructions":494,"questions":495},"Handbook assistant","Ask how things work for an Eclipse open source project: starting one, committers, releases, intellectual property. The answers come from the handbook, with links to its pages.","The handbook assistant can make mistakes and doesn't provide legal advice. Check the pages it links to.","The handbook chooses its words with care. Use its wording for the process, roles, reviews, agreements, licences and terms; quote it where precision matters, and don't paraphrase or simplify it.\nBe plain and precise. Don't speculate, don't predict the outcome of a review, an election or an IP review, and don't speak for the EMO, the IP Team, a PMC or the Eclipse Foundation beyond what the pages say.\nYou don't provide legal advice. When a question is about licensing, intellectual property, trademarks or the agreements, or asks what someone must do to comply, say first that this isn't legal advice, then give what the handbook says, and suggest they contact license@eclipse-foundation.org, as the handbook does, or a qualified legal professional.\nWhen the handbook doesn't answer a question, say so and suggest the EMO at emo@eclipse-foundation.org.\n",[496,497,498],"How do I propose a new Eclipse open source project?","How do committer elections work?","What is a release review, and when does my project need one?","How open source projects are proposed, run and released at the Eclipse Foundation: the Eclipse Development Process in practice, for committers and project leads.",[375,501,349,502,503],"Eclipse Development Process","open source projects","committers","\u002Flogo.svg","\u002Flogo-inverse.svg",140,{}," | Eclipse Project Handbook",{"backgroundImage":510,"eyebrow":375},"\u002Fsocial-image.png",[512,516],{"name":513,"icon":514,"url":515},"LinkedIn","fa6-brands:linkedin","https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Feclipse-foundation\u002F",{"name":517,"icon":518,"url":519},"YouTube","fa6-brands:youtube","https:\u002F\u002Fwww.youtube.com\u002F@EclipseFdn","data\u002Fsettings","1y81bWZuCroo6bWBcHFO-k_z4AIvgSDeHc7Uqzsj2LM",1795617572072,"efc157c9-2c20-419c-a89d-97024324e8ad"]