Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (C) 2010 JFrog Ltd.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.jfrog.hudson.ivy;
A build listener which takes care of Ivy builds. This class extends a hudson.model.listeners.RunListener with a generic type of hudson.model.AbstractBuild and not hudson.ivy.IvyModuleSetBuild since Hudson's classloader tries to load initialize the class by reflection and is failing on java.lang.LinkageError which is handled by Hudson by printing out the stacktrace to the log. However, if not using it during construction time and checking at runtime, the exception seems to disappear.

Tomer Cohen
@Extension(optional = true)
    public ArtifactoryIvyRunListener() {
    public void onCompleted(AbstractBuild runTaskListener listener) {
        if ("hudson.ivy.IvyModuleSetBuild".equals(run.getClass().getName())) {
            IvyModuleSetBuild ivyRun = (IvyModuleSetBuildrun;
            Result result = ivyRun.getResult();
            if (result == null || result.isWorseThan(.)) {
            ArtifactoryIvyConfigurator artifactoryIvyConfigurator =
            if (artifactoryIvyConfigurator == null) {
            if (artifactoryIvyConfigurator.isDeployBuildInfo()) {
                run.getActions().add(new BuildInfoResultAction(artifactoryIvyConfigurator.getArtifactoryName(), run));
                run.getActions().add(new UnifiedPromoteBuildAction<ArtifactoryIvyConfigurator>(run,
New to GrepCode? Check out our FAQ X