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

Finding plugin module in multi-module repository #341

Open
alecharp opened this issue Jun 16, 2023 · 2 comments
Open

Finding plugin module in multi-module repository #341

alecharp opened this issue Jun 16, 2023 · 2 comments
Labels
enhancement New feature or request probe Related to probe implementation

Comments

@alecharp
Copy link
Collaborator

Description

In the case of repository using a multi-module configuration, we need to know in which module the plugin source code is located.

Browsing the pom.xml files within the repository, filtering those with a <packaging/> value of hpi and then looking at the artifactId we can find the module which hold the plugin source code.

We should store that value in the ProbeContext, it has uses for probe currently using the folder of the SCMLinkValidationProbe.

@alecharp alecharp added enhancement New feature or request probe Related to probe implementation labels Jun 16, 2023
@sridamul
Copy link
Contributor

Is this issue still open?

MavenXpp3Reader mavenReader = new MavenXpp3Reader();
        try (Reader reader = new InputStreamReader(new FileInputStream(pomFilePath.toFile()), StandardCharsets.UTF_8)) {
            Model model = mavenReader.read(reader);
            if ("hpi".equals(model.getPackaging()) && pluginName.equals(model.getArtifactId())) {
                return true;
            }
        } catch (IOException e) {
            LOGGER.error("Pom file not found for {}.", pluginName, e);
        } catch (XmlPullParserException e) {
            LOGGER.error("Could not parse pom file for {}.", pluginName, e);
        }
        return false;

cause seem to be implemented already

@AayushSaini101
Copy link
Contributor

@alecharp Please add GSOC label

@alecharp alecharp added gsoc Do not take / work on GSoC tickets outside of GSoC context. and removed gsoc Do not take / work on GSoC tickets outside of GSoC context. labels Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request probe Related to probe implementation
Projects
No open projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants