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

Bring better error message if compiler target is not set in Maven #52

Closed
uschindler opened this issue Apr 11, 2015 · 2 comments
Closed
Assignees

Comments

@uschindler
Copy link
Member

People get a error message that bundled signatures are not found. This is mostly caused by the fact that they forgt ot define the compiler target, so forbiddenapis cannot choose the right version of unsafe or deprecated signatures.

We should add a warning just before the bundled signatures are loaded, so they get the info that they hshould really define the compiler target (ideally through Maven property globally, so it applies also to compiler plugin).

@uschindler uschindler added this to the 1.8 milestone Apr 11, 2015
@uschindler uschindler self-assigned this Apr 11, 2015
@uschindler uschindler removed this from the 1.8 milestone Apr 11, 2015
@uschindler
Copy link
Member Author

Oh this was already added:

if (bundledSignatures != null) {
  String targetVersion = getTargetVersion();
  if ("".equals(targetVersion)) targetVersion = null;
  if (targetVersion == null) {
    log.warn("The 'targetVersion' parameter or '${maven.compiler.target}' property is missing. " +
      "Trying to read bundled JDK signatures without compiler target. " +
      "You have to explicitely specify the version in the resource name.");
  }
  for (String bs : bundledSignatures) {
    log.info("Reading bundled API signatures: " + bs);
    checker.parseBundledSignatures(bs, targetVersion);
  }
}

@uschindler
Copy link
Member Author

This was in issue #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant