Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency graph #152

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Dependency graph #152

merged 1 commit into from
Jan 26, 2024

Conversation

rogelio-o
Copy link
Contributor

Type of change

  • Added new project
  • Bug fix
  • New features
  • Enhanced documentation

Changes proposed in this pull request

Description

  • Maintain code format
  • Unit test

<modelVersion>4.0.0</modelVersion>

<groupId>org.spdx</groupId>
<artifactId>spdx-maven-plugin-test</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to replace the whitespaces for this test case because it threw the following error when building the MavenProject using ProjectBuilder:

org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] 'artifactId' with value 'spdx maven plugin test' does not match a valid id pattern. @ line 7, column 17

import org.spdx.storage.ISerializableModelStore;
import org.spdx.storage.simple.InMemSpdxStore;

public class TestWithSessionSpdxMojo extends AbstractMojoTestCase
Copy link
Contributor Author

@rogelio-o rogelio-o Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mojos in TestSpdxMojo are created without a Maven session because they are loaded with lookupMojo. I had to use lookupConfiguredMojo to include a session to the mojo (and customize the session a bit). The session is used to generate the dependency graph.

Copy link
Member

@goneall goneall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change to retain the test dependencies and a small nit. Otherwise, looks good.

src/main/java/org/spdx/maven/CreateSpdxMojo.java Outdated Show resolved Hide resolved
@goneall
Copy link
Member

goneall commented Jan 25, 2024

This fixes #87

@rogelio-o
Copy link
Contributor Author

One change to retain the test dependencies and a small nit. Otherwise, looks good.

Great! Thanks! Feedback applied.

Copy link
Member

@goneall goneall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @rogelio-o

@goneall goneall merged commit d58e29f into spdx:master Jan 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants