CycloneDX / CycloneDX/cyclonedx-maven-plugin
When the plug-in of cyclonedx version 2.5.3 generates a BOM file, it prompts an unrecognized tag: "project"(position: START_TAG seen ...</dependencies>\n <project>... @35:14)
- Dominant language
- Java
- Stars
- 385
- Forks
- 107
- Avg merge
- 17h 31m
- Merged PRs (30d)
- 7
Description
The POM file is imported into hive-jdbc. During the process of generating the BOM file using the command `mvn org.cyclonedx:cyclonedx-maven-plugin:2.5.3:makeBom`, an error is prompted, but the compilation is successful, and the BOM file is generated. The information is as follows:
```
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.example:untitled >------------------------
[INFO] Building untitled 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- cyclonedx-maven-plugin:2.5.3:makeBom (default-cli) @ untitled ---
[INFO] CycloneDX: Parameters
[INFO] ------------------------------------------------------------------------
[INFO] schemaVersion : 1.3
[INFO] includeBomSerialNumber : true
[INFO] includeCompileScope : true
[INFO] includeProvidedScope : true
[INFO] includeRuntimeScope : true
[INFO] includeTestScope : false
[INFO] includeSystemScope : true
[INFO] includeLicenseText : false
[INFO] outputFormat : all
[INFO] outputName : bom
[INFO] ------------------------------------------------------------------------
[INFO] CycloneDX: Resolving Dependencies
[ERROR] An error occurred attempting to read POM
org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'project' (position: START_TAG seen ...\n ... @35:14)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.checkUnknownElement (MavenXpp3Reader.java:178)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel (MavenXpp3Reader.java:2309)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read (MavenXpp3Reader.java:3872)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read (MavenXpp3Reader.java:595)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read (MavenXpp3Reader.java:609)
at org.cyclonedx.maven.BaseCycloneDxMojo.readPom (BaseCycloneDxMojo.java:730)
at org.cyclonedx.maven.BaseCycloneDxMojo.extractPom (BaseCycloneDxMojo.java:689)
at org.cyclonedx.maven.BaseCycloneDxMojo.convert (BaseCycloneDxMojo.java:454)
at org.cyclonedx.maven.CycloneDxMojo.execute (CycloneDxMojo.java:69)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
...
[INFO] CycloneDX: Creating BOM
[INFO] CycloneDX: Writing BOM (XML): /Users/xxx/Documents/code/untitled/target/bom.xml
[INFO] CycloneDX: Validating BOM (XML): /Users/xxx/Documents/code/untitled/target/bom.xml
[INFO] CycloneDX: Writing BOM (JSON): /Users/xxx/Documents/code/untitled/target/bom.json
[INFO] CycloneDX: Validating BOM (JSON): /Users/xxx/Documents/code/untitled/target/bom.json
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.727 s
[INFO] Finished at: 2021-11-16T17:32:02+08:00
[INFO] ------------------------------------------------------------------------
```
The project compilation was successful
pom.xml:
```xml
org.apache.hive
hive-jdbc
3.1.2
```
Contributor guide
Research direction
Reproduce the report with the `mvn org.cyclonedx:cyclonedx-maven-plugin:2.5.3:makeBom` command and the `hive-jdbc` dependency shown in `pom.xml`. Start at `BaseCycloneDxMojo.readPom` and the reported Maven parser stack trace; done means BOM generation no longer emits the unrecognized `project` error while producing the BOM files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100