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