You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by jg...@apache.org on 2010/03/26 19:27:55 UTC

svn commit: r928005 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/listener/BigProjectLogger.java src/main/org/apache/tools/ant/listener/SimpleBigProjectLogger.java

Author: jglick
Date: Fri Mar 26 18:27:54 2010
New Revision: 928005

URL: http://svn.apache.org/viewvc?rev=928005&view=rev
Log:
Proven to be useful to pick up just one feature of BigProjectLogger without all the chrome.

Added:
    ant/core/trunk/src/main/org/apache/tools/ant/listener/SimpleBigProjectLogger.java   (with props)
Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/listener/BigProjectLogger.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=928005&r1=928004&r2=928005&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Fri Mar 26 18:27:54 2010
@@ -116,6 +116,9 @@ Other changes:
    1.7.1.
    Bugzilla Report 48734.
 
+ * Added SimpleBigProjectLogger, intermediate between NoBannerLogger and
+   BigProjectLogger.
+
 Changes from Ant 1.8.0RC1 TO Ant 1.8.0
 ======================================
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/listener/BigProjectLogger.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/listener/BigProjectLogger.java?rev=928005&r1=928004&r2=928005&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/listener/BigProjectLogger.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/listener/BigProjectLogger.java Fri Mar 26 18:27:54 2010
@@ -18,7 +18,6 @@
 package org.apache.tools.ant.listener;
 
 import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.NoBannerLogger;
 import org.apache.tools.ant.SubBuildListener;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.util.StringUtils;
@@ -33,7 +32,7 @@ import java.io.File;
  * @since Ant1.7.1
  */
 
-public class BigProjectLogger extends NoBannerLogger
+public class BigProjectLogger extends SimpleBigProjectLogger
     implements SubBuildListener {
 
     private volatile boolean subBuildStartedRaised = false;
@@ -114,22 +113,6 @@ public class BigProjectLogger extends No
         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}

Added: ant/core/trunk/src/main/org/apache/tools/ant/listener/SimpleBigProjectLogger.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/listener/SimpleBigProjectLogger.java?rev=928005&view=auto
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/listener/SimpleBigProjectLogger.java (added)
+++ ant/core/trunk/src/main/org/apache/tools/ant/listener/SimpleBigProjectLogger.java Fri Mar 26 18:27:54 2010
@@ -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;
+        }
+    }
+
+}

Propchange: ant/core/trunk/src/main/org/apache/tools/ant/listener/SimpleBigProjectLogger.java
------------------------------------------------------------------------------
    svn:eol-style = native