in mavenivy-adapters/src/main/java/org/apache/easyant/tasks/adapters/Deploy.java [37:81]
protected void doExecute() {
MavenPublishTrigger trigger = (MavenPublishTrigger) getProject().getReference(MavenPublishTrigger.MAVEN_PUBLISH_TRIGGER_REFERENCE);
RemoteRepository repo = getRemoteRepository();
if (getRemoteRepository().getRefid() != null) {
repo = (RemoteRepository) getProject().getReference( getRemoteRepository().getRefid());
}
boolean repoUrlIsEmpty = repo.getUrl() ==null || repo.getUrl().equals("");
if (repoUrlIsEmpty && trigger.getPublishUrl() != null) {
log("No repository url was specified, will use same as ivy publication context", Project.MSG_VERBOSE);
log("Repository url is now set to " + trigger.getPublishUrl(),Project.MSG_VERBOSE);
repo.setUrl(trigger.getPublishUrl());
}
//the main artifact
PublishedArtifact mainArtifact = trigger.getPublishedArtifacts().get(0);
setFile(new File(mainArtifact.getFile()));
for (PublishedArtifact publishedArtifact : trigger.getPublishedArtifacts()) {
boolean isIvyFile = "ivy".equals(publishedArtifact.getType())
&& "xml".equals(publishedArtifact.getExt());
//ignore main artifact and ivy.xml file
if (!(publishedArtifact.equals(mainArtifact) || isIvyFile)){
Mapping mapping = getTypeMappings().findTypeMappings(
publishedArtifact.getType(), publishedArtifact.getExt());
if (mapping != null) {
if (mapping.getMvnPackaging() != null) {
AttachedArtifact artifact = createAttach();
artifact.setFile(new File(publishedArtifact.getFile()));
artifact.setType(mapping.getMvnPackaging());
artifact.setClassifier(mapping.getClassifier());
StringBuilder sb = new StringBuilder();
sb.append("publishing ").append(publishedArtifact.getFile());
sb.append(" type='").append(artifact.getType()).append("'");
if (artifact.getClassifier() != null) {
sb.append(" classifier='").append(artifact.getClassifier()).append("'");
}
log(sb.toString());
}
}
}
}
super.doExecute();
}