else {
info("Skipping creation of the Java client source jar as everything appears up-to-date...");
}
}
ClientLibraryArtifact artifactBundle = new ClientLibraryArtifact(getName(), "java.client.library", "Java Client Library");
artifactBundle.setPlatform("Java (Version 5+)");
artifactBundle.addAlias("jaxws.client.library");
//read in the description from file:
artifactBundle.setDescription(readResource("library_description.fmt"));
if (clientJarFile != null) {
NamedFileArtifact binariesJar = new NamedFileArtifact(getName(), "java.client.library.binaries", clientJarFile);
binariesJar.addAlias("jaxws.client.library.binaries");
binariesJar.setDescription("The binaries for the Java client library.");
binariesJar.setPublic(false);
binariesJar.setArtifactType(ArtifactType.binaries);
artifactBundle.addArtifact(binariesJar);
enunciate.addArtifact(binariesJar);
}
if (clientSourcesJarFile != null) {
NamedFileArtifact sourcesJar = new NamedFileArtifact(getName(), "java.client.library.sources", clientSourcesJarFile);
sourcesJar.addAlias("jaxws.client.library.sources");
sourcesJar.setDescription("The sources for the Java client library.");
sourcesJar.setPublic(false);
sourcesJar.setArtifactType(ArtifactType.sources);
artifactBundle.addArtifact(sourcesJar);
enunciate.addArtifact(sourcesJar);
}
if (clientJarFile != null || clientSourcesJarFile != null) {
enunciate.addArtifact(artifactBundle);
}
if (isGenerateJsonJar()) {
File jsonClientJarFile = null;
if (!isDisableCompile()) {
jsonClientJarFile = new File(getBuildDir(), jsonJarName);
if (!enunciate.isUpToDate(getJsonClientCompileDir(), jsonClientJarFile)) {
if (isBundleSourcesWithClasses()) {
enunciate.zip(jsonClientJarFile, getJsonClientCompileDir(), getJsonClientGenerateDir());
}
else {
enunciate.zip(jsonClientJarFile, getJsonClientCompileDir());
}
}
else {
info("Skipping creation of Java JSON client jar as everything appears up-to-date...");
}
}
File jsonClientSourcesJarFile = null;
if (!isBundleSourcesWithClasses()) {
jsonClientSourcesJarFile = new File(getBuildDir(), jsonJarName.replaceFirst("\\.jar", "-sources.jar"));
if (!enunciate.isUpToDate(getJsonClientGenerateDir(), jsonClientSourcesJarFile)) {
enunciate.zip(jsonClientSourcesJarFile, getJsonClientGenerateDir());
}
else {
info("Skipping creation of the Java JSON client source jar as everything appears up-to-date...");
}
}
artifactBundle = new ClientLibraryArtifact(getName(), "java.json.client.library", "Java JSON Client Library");
artifactBundle.setPlatform("Java (Version 5+)");
//read in the description from file:
artifactBundle.setDescription(readResource("json_library_description.fmt"));
if (jsonClientJarFile != null) {
NamedFileArtifact binariesJar = new NamedFileArtifact(getName(), "java.json.client.library.binaries", jsonClientJarFile);
binariesJar.setDescription("The binaries for the Java JSON client library.");
binariesJar.setPublic(false);
binariesJar.setArtifactType(ArtifactType.binaries);
artifactBundle.addArtifact(binariesJar);
enunciate.addArtifact(binariesJar);
}
if (jsonClientSourcesJarFile != null) {
NamedFileArtifact sourcesJar = new NamedFileArtifact(getName(), "java.json.client.library.sources", jsonClientSourcesJarFile);
sourcesJar.setDescription("The sources for the Java JSON client library.");
sourcesJar.setPublic(false);
sourcesJar.setArtifactType(ArtifactType.sources);
artifactBundle.addArtifact(sourcesJar);
enunciate.addArtifact(sourcesJar);
}
if (jsonClientJarFile != null || jsonClientSourcesJarFile != null) {
enunciate.addArtifact(artifactBundle);