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

Make thirdparty-classpath shareable #379

Open
jiri-pejchal opened this issue Feb 12, 2018 · 5 comments
Open

Make thirdparty-classpath shareable #379

jiri-pejchal opened this issue Feb 12, 2018 · 5 comments

Comments

@jiri-pejchal
Copy link

I'm trying to make the plugin configuration shareable among developers and store it in git:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CheckStyle-IDEA">
    <option name="configuration">
      <map>
        <entry key="active-configuration" value="PROJECT_RELATIVE:$PRJ_DIR$/src/etc/checkstyle.xml:czc" />
        <entry key="checkstyle-version" value="8.7" />
        <entry key="copy-libs" value="false" />
        <entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
        <entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
        <entry key="location-2" value="PROJECT_RELATIVE:$PRJ_DIR$/src/etc/checkstyle.xml:czc" />
        <entry key="property-2.checkstyle.suppressions.file" value="checkstyle-suppressions.xml" />
        <entry key="scan-before-checkin" value="true" />
        <entry key="scanscope" value="JavaOnlyWithTests" />
        <entry key="suppress-errors" value="false" />
        <entry key="thirdparty-classpath" value="C:\Users\username\.m2\repository\com\github\sevntu-checkstyle\sevntu-checks\1.27.0\sevntu-checks-1.27.0.jar" />
      </map>
    </option>
  </component>
</project>

It basically works except the sevntu-checkstyle jar location:

<entry key="thirdparty-classpath" value="C:\Users\username\.m2\repository\com\github\sevntu-checkstyle\sevntu-checks\1.27.0\sevntu-checks-1.27.0.jar" />

Because we are using maven Copy libraries from project directory does not copy libraries.

Is there a way to make the path to the sevntu checkstyle jar shareable among developers?

Maybe support some variables like $HOME:

<entry key="thirdparty-classpath" value="$HOME\.m2\repository\com\github\sevntu-checkstyle\sevntu-checks\1.27.0\sevntu-checks-1.27.0.jar" />
@jshiell
Copy link
Owner

jshiell commented Feb 17, 2018

Thanks for the suggestion. It seems very reasonable - however, it's unlikely to happen at present. In part this is because any path work is very risky given I don't have a Windows machine to test on, and there's a history of bugs resulting from odd differences between Windows FS paths and the relative sanity of everything else.

@jiri-pejchal
Copy link
Author

Other possible solution would be the ability to specify the path to sevntu checks jar relative to the project directory - similar to the current implementation of location configuration of checkstyle.xml

I also tried to copy the jar manually to the directory checkstyleidea-libs, but that didn't work either.

@daanschipper
Copy link

I'm using something like <entry key="thirdparty-classpath" value="$PROJECT_DIR$/checkstyleidea-libs/sevntu-checks-1.27.0.jar" />, not ideal as you have to check in the jar in git but it works.

@maistrovyi
Copy link

Hey, this problem is actually very relevant, any ideas/updates?
Why we plugin can't fetch third-party checks from plugin dependencies as maven?

@jshiell
Copy link
Owner

jshiell commented Feb 4, 2024

any ideas/updates?

Nope.

Why we plugin can't fetch third-party checks from plugin dependencies as maven?

Because no one has written the feature, and I've no time or intention to do so at present.

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

4 participants