buildframework/helium/sf/java/signaling/src/com/nokia/helium/signal/SignalNeverFailMessage.java
changeset 628 7c4a911dc066
parent 587 85df38eb4012
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
     1 /*
     1 /*
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5  * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description: To print the message on the shell in case of build has errors
    14  * Description: To print the message on the shell in case of build has errors
    15 * is user sets failbuild status to never in signal configuration file.
    15  * is user sets failbuild status to never in signal configuration file.
    16 *
    16  *
    17 */
    17  */
    18  
    18 
    19 package com.nokia.helium.signal;
    19 package com.nokia.helium.signal;
    20 
    20 
       
    21 import org.apache.tools.ant.Project;
       
    22 import org.apache.tools.ant.types.DataType;
    21 
    23 
    22 import org.apache.tools.ant.Project;
    24 import com.nokia.helium.core.ant.PostBuildAction;
    23 import com.nokia.helium.core.ant.types.*;
       
    24 import org.apache.log4j.Logger;
       
    25 
    25 
    26 /**
    26 /**
    27  * Class to check the signal is present in the never signal list.
    27  * Class to check the signal is present in the never signal list. Print the
    28  * Print the message on the shell "Build completed with errors and warnings".
    28  * message on the shell "Build completed with errors and warnings".
    29  * 
    29  * 
    30  */
    30  */
    31 public class SignalNeverFailMessage extends HlmPostDefImpl
    31 public class SignalNeverFailMessage extends DataType implements PostBuildAction {
    32 {
    32 
    33     private Logger log = Logger.getLogger(SignalNeverFailMessage.class); 
       
    34     
       
    35     /**
    33     /**
    36      * Override execute method to print build completed message.
    34      * Override execute method to print build completed message.
       
    35      * 
    37      * @param prj
    36      * @param prj
    38      * @param module
    37      * @param module
    39      * @param targetNames
    38      * @param targetNames
    40      */
    39      */
    41     
    40     public void executeOnPostBuild(Project project, String[] targetNames) {
    42     public void execute(Project prj, String module, String[] targetNames) {
       
    43         
       
    44         if (SignalStatusList.getNeverSignalList().hasSignalInList()) {
    41         if (SignalStatusList.getNeverSignalList().hasSignalInList()) {
    45             log.info("Build completed with errors and warnings.");
    42             project.log(SignalStatusList.getNeverSignalList().getErrorMsg());
    46         }
    43         }
    47         
       
    48     }
    44     }
    49 }
    45 }