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

Skip Plugin Execution on packaging type pom #355

Closed
Neoministein opened this issue Mar 8, 2024 · 1 comment · Fixed by #356
Closed

Skip Plugin Execution on packaging type pom #355

Neoministein opened this issue Mar 8, 2024 · 1 comment · Fixed by #356
Assignees
Milestone

Comments

@Neoministein
Copy link

Hey, I am currently working on a multi module maven project. I've added jandex-maven-plugin to the root pom.xml of the project to have it executed on all sub modules.

The 'problem' now is that is also executes on the root project and generates an jandex.idx file.

Since projects with packaging type pom don't have a compile phase there isn't really anything to index. My idea would be to skip the execution if no other FileSet is configured.

Example:

public void execute() throws MojoExecutionException {
    if (processDefaultFileSet && "pom".equals(mavenProject.getPackaging())) {    
        getLog().info("Jandex execution skipped");
        return;
}
@Ladicek
Copy link
Collaborator

Ladicek commented Mar 11, 2024

I guess that makes sense, at least by default.

This issue was closed.
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 a pull request may close this issue.

2 participants