Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ private static void processJavaSourcesJar(File inputFile, APIListing apiListing)
final ReviewProperties reviewProperties = getReviewProperties(inputFile);

final String groupId = reviewProperties.getMavenPom().getGroupId();
final String artifactId = reviewProperties.getMavenPom().getArtifactId();

final String reviewName = reviewProperties.getMavenPom().getArtifactId()
+ " (version " + reviewProperties.getMavenPom().getVersion() + ")";
final String reviewName = artifactId + " (version " + reviewProperties.getMavenPom().getVersion() + ")";
System.out.println(" Using '" + reviewName + "' for the review name");

final String packageName = (groupId.isEmpty() ? "" : groupId + ":") + reviewProperties.getMavenPom().getArtifactId();
final String packageName = (groupId.isEmpty() ? "" : groupId + ":") + artifactId;
System.out.println(" Using '" + packageName + "' for the package name");

System.out.println(" Using '" + reviewProperties.getMavenPom().getVersion() + "' for the package version");
Expand All @@ -172,7 +172,9 @@ private static void processJavaSourcesJar(File inputFile, APIListing apiListing)
try {
// we eagerly load the apiview_properties.json file into an ApiViewProperties object, so that it can
// be used throughout the analysis process, as required
URL apiViewPropertiesFile = fs.getPath("/META-INF/apiview_properties.json").toUri().toURL();
// the filename is [<artifactid>_]apiview_properties.json
String filename = (artifactId != null && !artifactId.isEmpty() ? (artifactId + "_") : "") + "apiview_properties.json";
URL apiViewPropertiesFile = fs.getPath("/META-INF/" + filename).toUri().toURL();
final ObjectMapper objectMapper = new ObjectMapper();
ApiViewProperties properties = objectMapper.readValue(apiViewPropertiesFile, ApiViewProperties.class);
apiListing.setApiViewProperties(properties);
Expand Down