return jdkModules;
}
// Publish the JAR to the specified or default output repository
public void publish() {
RepositoryManager outputRepository = getOutputRepositoryManager();
ArtifactContext context = new ArtifactContext(module.getName(), module.getVersion(), ArtifactContext.JAR);
context.setForceOperation(true);
ArtifactContext descriptorContext = null;
if (descriptor != null) {
if (descriptor.toString().toLowerCase().endsWith(".xml")) {
descriptorContext = new ArtifactContext(module.getName(), module.getVersion(), ArtifactContext.MODULE_XML);
} else if (descriptor.toString().toLowerCase().endsWith(".properties")) {
descriptorContext = new ArtifactContext(module.getName(), module.getVersion(), ArtifactContext.MODULE_PROPERTIES);
}
descriptorContext.setForceOperation(true);
}
try{
File jarFile = applyCwd(this.jarFile);
outputRepository.putArtifact(context, jarFile);
signArtifact(context, jarFile);
if (descriptorContext != null) {
outputRepository.putArtifact(descriptorContext, applyCwd(descriptor));
}
}catch(CMRException x){
throw new ImportJarException("error.failedWriteArtifact", new Object[]{context, x.getLocalizedMessage()}, x);
}catch(Exception x){
// FIXME: remove when the whole CMR is using CMRException