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

Support for classifier configuration of Plugin artifact #23

Open
h3xstream opened this issue Jan 23, 2018 · 3 comments
Open

Support for classifier configuration of Plugin artifact #23

h3xstream opened this issue Jan 23, 2018 · 3 comments

Comments

@h3xstream
Copy link
Member

h3xstream commented Jan 23, 2018

I need to bundle dependencies with a SpotBugs plugin. The easiest way to publish this plugin is releasing the normal jar and a jar with all the needed dependencies.

My small obstacle is that I can't configure a classifier in the PluginArtifact XML section.

class PluginArtifact {
String groupId, artifactId, version
String type = "jar"
}

Maybe I'm missing something regarding Plugin Artifact dependencies and the all-in-one jar is not necessary.

@hazendaz
Copy link
Member

@gleclaire Hi, I was wondering if you could take a look at this issue.

@h3xstream
Copy link
Member Author

h3xstream commented Jan 25, 2018

I have temporary fix that might not be ideal for end-users .. but good enough for me:

The fork parameter set to false allow spotbugs to run in the context of the Maven process.
I can then add dependencies to the spotbugs-plugin manually. Those are then available to the my detector plugin.

            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <fork>false</fork>
                    <timeout>9999999</timeout>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <failOnError>true</failOnError>
                    <includeFilterFile>${session.executionRootDirectory}/findbugs-security-include.xml</includeFilterFile>
                    <excludeFilterFile>${session.executionRootDirectory}/findbugs-security-exclude.xml</excludeFilterFile>
                    <plugins>
                        <plugin>
                            <groupId>com.h3xstream.findsecbugs</groupId>
                            <artifactId>experimental-plugin</artifactId>
                            <!--<classifier>jar-with-dependencies</classifier>--> <!-- Not supported yet -->
                            <version>1.8.0</version>
                        </plugin>
                    </plugins>
                </configuration>
                <dependencies>
                    <dependency>
                    [...]
                    <!-- List of dependencies goes here -->
                    </dependency>
                </dependencies>
            </plugin>

@hazendaz
Copy link
Member

@h3xstream Not tested but have added classifier support for next release.

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

No branches or pull requests

2 participants