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

Deprecated API on Sonar 7 #131

Open
CzarScar opened this issue Jul 2, 2018 · 3 comments
Open

Deprecated API on Sonar 7 #131

CzarScar opened this issue Jul 2, 2018 · 3 comments

Comments

@CzarScar
Copy link

CzarScar commented Jul 2, 2018

Hi team,

We just upgrade the sonar server to 7. And met some error while analysis our project.

java.lang.NoClassDefFoundError: org/sonar/api/measures/PersistenceMode

After some investigation, just found the "PersistenceMode" has been deprecated.

Class: ApexSquidSensor
method:

/**
 * Builds and returns a measure.
 *
 * @param measueBuilder builder.
 * @return the measure.
 */
private Measure buildMeasure(MeasureBuilder measueBuilder) {
    return measueBuilder.build().setPersistenceMode(PersistenceMode.MEMORY);
}

Could you just update this on your code?

Thank you
Best regards

@rmartinezffdc
Copy link

Hi all,

I'm having the same issue and I can not execute any analysis for Apex projects since we are using Version 7 of SonarQube.

Thank you

@CzarScar
Copy link
Author

Hi rmartinezffdc,

The workaround we are using is removing the 'setPersistenceMode(PersistenceMode.MEMORY)' and rebuild the jar. Then place it under sonarQube plugin folder. It works fine.

Thank you

@visceraldesert
Copy link

I've looked into this and in order to correct we need to pull and make the appropriate modifications dictated by the new API and build the jar again. Once I have some time I might execute and make the contribution

asolfre added a commit to asolfre/apex-docker-sonarqube that referenced this issue Aug 27, 2018
As current apex plugin is not compatible with 7.x, go back to 6.7.5 until this fundacionjala/enforce-sonarqube-plugin#131 is solved.
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

3 participants