git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@928005 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -116,6 +116,9 @@ Other changes: | |||||
| 1.7.1. | 1.7.1. | ||||
| Bugzilla Report 48734. | Bugzilla Report 48734. | ||||
| * Added SimpleBigProjectLogger, intermediate between NoBannerLogger and | |||||
| BigProjectLogger. | |||||
| Changes from Ant 1.8.0RC1 TO Ant 1.8.0 | Changes from Ant 1.8.0RC1 TO Ant 1.8.0 | ||||
| ====================================== | ====================================== | ||||
| @@ -18,7 +18,6 @@ | |||||
| package org.apache.tools.ant.listener; | package org.apache.tools.ant.listener; | ||||
| import org.apache.tools.ant.BuildEvent; | import org.apache.tools.ant.BuildEvent; | ||||
| import org.apache.tools.ant.NoBannerLogger; | |||||
| import org.apache.tools.ant.SubBuildListener; | import org.apache.tools.ant.SubBuildListener; | ||||
| import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
| import org.apache.tools.ant.util.StringUtils; | import org.apache.tools.ant.util.StringUtils; | ||||
| @@ -33,7 +32,7 @@ import java.io.File; | |||||
| * @since Ant1.7.1 | * @since Ant1.7.1 | ||||
| */ | */ | ||||
| public class BigProjectLogger extends NoBannerLogger | |||||
| public class BigProjectLogger extends SimpleBigProjectLogger | |||||
| implements SubBuildListener { | implements SubBuildListener { | ||||
| private volatile boolean subBuildStartedRaised = false; | private volatile boolean subBuildStartedRaised = false; | ||||
| @@ -114,22 +113,6 @@ public class BigProjectLogger extends NoBannerLogger | |||||
| super.messageLogged(event); | super.messageLogged(event); | ||||
| } | } | ||||
| /** | |||||
| * Override point, extract the target name | |||||
| * | |||||
| * @param event the event to work on | |||||
| * @return the target name -including the owning project name (if non-null) | |||||
| */ | |||||
| protected String extractTargetName(BuildEvent event) { | |||||
| String targetName = event.getTarget().getName(); | |||||
| String projectName = extractProjectName(event); | |||||
| if (projectName != null && targetName != null) { | |||||
| return projectName + '.' + targetName; | |||||
| } else { | |||||
| return targetName; | |||||
| } | |||||
| } | |||||
| /** | /** | ||||
| * {@inheritDoc} | * {@inheritDoc} | ||||
| @@ -0,0 +1,46 @@ | |||||
| /* | |||||
| * Licensed to the Apache Software Foundation (ASF) under one or more | |||||
| * contributor license agreements. See the NOTICE file distributed with | |||||
| * this work for additional information regarding copyright ownership. | |||||
| * The ASF licenses this file to You 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 | |||||
| * | |||||
| * http://www.apache.org/licenses/LICENSE-2.0 | |||||
| * | |||||
| * Unless required by applicable law or agreed to in writing, software | |||||
| * distributed under the License is distributed on an "AS IS" BASIS, | |||||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||||
| * See the License for the specific language governing permissions and | |||||
| * limitations under the License. | |||||
| * | |||||
| */ | |||||
| package org.apache.tools.ant.listener; | |||||
| import org.apache.tools.ant.BuildEvent; | |||||
| import org.apache.tools.ant.NoBannerLogger; | |||||
| /** | |||||
| * Displays subproject names like {@link BigProjectLogger} | |||||
| * but is otherwise as quiet as {@link NoBannerLogger}. | |||||
| * @since Ant1.8.1 | |||||
| */ | |||||
| public class SimpleBigProjectLogger extends NoBannerLogger { | |||||
| /** | |||||
| * Override point, extract the target name | |||||
| * | |||||
| * @param event the event to work on | |||||
| * @return the target name -including the owning project name (if non-null) | |||||
| */ | |||||
| protected String extractTargetName(BuildEvent event) { | |||||
| String targetName = super.extractTargetName(event); | |||||
| String projectName = extractProjectName(event); | |||||
| if (projectName != null && targetName != null) { | |||||
| return projectName + '.' + targetName; | |||||
| } else { | |||||
| return targetName; | |||||
| } | |||||
| } | |||||
| } | |||||