ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject [6/6] ant-easyant-core git commit: remove deadcode
Date Mon, 24 Nov 2014 23:44:59 GMT
remove deadcode


Project: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/commit/0b161f88
Tree: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/tree/0b161f88
Diff: http://git-wip-us.apache.org/repos/asf/ant-easyant-core/diff/0b161f88

Branch: refs/heads/master
Commit: 0b161f88f2c972ca8192383cf4935be5c7fdd5d8
Parents: 12b28d0
Author: Jean-Louis Boudart <jeanlouis.boudart@gmail.com>
Authored: Tue Nov 25 00:44:37 2014 +0100
Committer: Jean-Louis Boudart <jeanlouis.boudart@gmail.com>
Committed: Tue Nov 25 00:44:37 2014 +0100

----------------------------------------------------------------------
 .../core/ant/listerners/MultiModuleLogger.java  |  3 +-
 .../org/apache/easyant/tasks/GoOfflineTest.java | 60 ++++++++++----------
 2 files changed, 31 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/0b161f88/src/main/java/org/apache/easyant/core/ant/listerners/MultiModuleLogger.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/easyant/core/ant/listerners/MultiModuleLogger.java b/src/main/java/org/apache/easyant/core/ant/listerners/MultiModuleLogger.java
index 6df22a6..d96d169 100644
--- a/src/main/java/org/apache/easyant/core/ant/listerners/MultiModuleLogger.java
+++ b/src/main/java/org/apache/easyant/core/ant/listerners/MultiModuleLogger.java
@@ -184,12 +184,11 @@ public class MultiModuleLogger extends DefaultEasyAntLogger implements
SubBuildL
     private void printExecutionSubBuildsExecutionTimes(Project project) {
         List<ExecutionResult> allSubBuildResults = project.getReference(EXECUTION_TIMER_BUILD_RESULTS);
         if (allSubBuildResults != null && !allSubBuildResults.isEmpty()) {
-                project.log(LINE_SEP + "Project Sub-modules Summary: " + LINE_SEP + formatExecutionResults(allSubBuildResults));
+            project.log(LINE_SEP + "Project Sub-modules Summary: " + LINE_SEP + formatExecutionResults(allSubBuildResults));
         }
     }
 
     private String formatExecutionResults(List<ExecutionResult> results) {
-        String formattedResults;
         int maxUnitNameLength = 0;
         int maxExecTimeLength = 0;
         for (ExecutionResult result : results) {

http://git-wip-us.apache.org/repos/asf/ant-easyant-core/blob/0b161f88/src/test/java/org/apache/easyant/tasks/GoOfflineTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/easyant/tasks/GoOfflineTest.java b/src/test/java/org/apache/easyant/tasks/GoOfflineTest.java
index c9b8c45..15c7adc 100644
--- a/src/test/java/org/apache/easyant/tasks/GoOfflineTest.java
+++ b/src/test/java/org/apache/easyant/tasks/GoOfflineTest.java
@@ -17,18 +17,11 @@
  */
 package org.apache.easyant.tasks;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-
 import org.apache.easyant.core.EasyAntMagicNames;
 import org.apache.easyant.core.ant.ProjectUtils;
 import org.apache.easyant.core.ivy.IvyInstanceHelper;
-import org.apache.easyant.core.services.PluginService;
 import org.apache.easyant.core.services.DefaultPluginService;
+import org.apache.easyant.core.services.PluginService;
 import org.apache.ivy.Ivy;
 import org.apache.ivy.ant.IvyAntSettings;
 import org.apache.ivy.ant.IvyConfigure;
@@ -41,6 +34,13 @@ import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.junit.rules.TemporaryFolder;
 
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
 public class GoOfflineTest extends AntTaskBaseTest {
 
     private static final String EASYANT_BUILDSCOPE_REP = "easyant-buildscope-rep";
@@ -84,49 +84,49 @@ public class GoOfflineTest extends AntTaskBaseTest {
 
     }
 
-    private void configureEasyantSettings(Project project) throws URISyntaxException{
+    private void configureEasyantSettings(Project project) throws URISyntaxException {
         configureSettings(project, EasyAntMagicNames.EASYANT_IVY_INSTANCE, "/repositories/easyant-ivysettings-test.xml");
     }
-    
-    private void configureProjectSettings(Project project) throws URISyntaxException{
+
+    private void configureProjectSettings(Project project) throws URISyntaxException {
         configureSettings(project, IvyInstanceHelper.getProjectIvyInstanceName(project),
"/ivysettings-test.xml");
     }
-    
-    private void configureSettings(Project project, String settingsId, String settingsFile)
throws URISyntaxException{
+
+    private void configureSettings(Project project, String settingsId, String settingsFile)
throws URISyntaxException {
         IvyConfigure configure = new IvyConfigure();
         configure.setSettingsId(settingsId);
         configure.setProject(project);
         configure.setFile(new File(this.getClass().getResource(settingsFile).toURI()));
         configure.execute();
     }
-    
+
     private void configureEasyantBuildScopeRepository(Project project) throws IOException
{
         easyantBuildScopeRepoFolder = folder.newFolder("ea-build-repo");
-        FileSystemResolver resolver = newResolver(project, easyantBuildScopeRepoFolder, EASYANT_BUILDSCOPE_REP);
-        
+        FileSystemResolver resolver = newResolver(easyantBuildScopeRepoFolder, EASYANT_BUILDSCOPE_REP);
+
         Ivy easyantIvyInstance = IvyInstanceHelper.getEasyAntIvyAntSettings(project)
                 .getConfiguredIvyInstance(goOffline);
         easyantIvyInstance.getSettings().addResolver(resolver);
     }
-    
+
     private void configureProjectBuildScopeRepository(Project project) throws IOException
{
         projectBuildScopeRepoFolder = folder.newFolder("project-build-repo");
-        FileSystemResolver resolver = newResolver(project, projectBuildScopeRepoFolder, PROJECT_BUILDSCOPE_REP);
-        
+        FileSystemResolver resolver = newResolver(projectBuildScopeRepoFolder, PROJECT_BUILDSCOPE_REP);
+
         Ivy projecttIvyInstance = IvyInstanceHelper.getProjectIvyAntSettings(project)
                 .getConfiguredIvyInstance(goOffline);
         projecttIvyInstance.getSettings().addResolver(resolver);
     }
-    
-    private FileSystemResolver newResolver(Project project, File repoFolder, String resolverName
) throws IOException {
-        
+
+    private FileSystemResolver newResolver(File repoFolder, String resolverName) {
+
         FileSystemResolver resolver = new FileSystemResolver();
         resolver.setName(resolverName);
         resolver.addArtifactPattern(repoFolder.getAbsolutePath()
                 + "/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]");
         resolver.addIvyPattern(repoFolder.getAbsolutePath()
                 + "/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]");
-        
+
         return resolver;
     }
 
@@ -173,25 +173,25 @@ public class GoOfflineTest extends AntTaskBaseTest {
                 + "/mycompany/simpleplugin/0.1/simpleplugin.ant");
         assertThat(antFile.exists(), is(true));
     }
-    
+
     @Test
     public void shouldInstallPluginsAndDependenciesTransitive() throws URISyntaxException
{
         goOffline.setEasyantResolverName(EASYANT_BUILDSCOPE_REP);
         goOffline.setProjectResolverName(PROJECT_BUILDSCOPE_REP);
         goOffline.setModuleIvy(new File(this.getClass().getResource("dependencies/module.ivy").toURI()));
         goOffline.execute();
-        
+
         assertLogContaining("installing mycompany#simpleplugin;0.1");
         assertLogContaining("installing junit#junit;4.4");
         assertLogContaining("installing org.mortbay.jetty#jetty;6.1.14");
-               
-        assertFileExists(easyantBuildScopeRepoFolder,"/mycompany/simpleplugin/0.1/ivy.xml");
-        assertFileExists(easyantBuildScopeRepoFolder,"/mycompany/simpleplugin/0.1/simpleplugin.ant");
-        
+
+        assertFileExists(easyantBuildScopeRepoFolder, "/mycompany/simpleplugin/0.1/ivy.xml");
+        assertFileExists(easyantBuildScopeRepoFolder, "/mycompany/simpleplugin/0.1/simpleplugin.ant");
+
         assertFileExists(projectBuildScopeRepoFolder, "/junit/junit/4.4/junit.jar");
         assertFileExists(projectBuildScopeRepoFolder, "/org.mortbay.jetty/jetty/6.1.14/jetty.jar");
         assertFileExists(projectBuildScopeRepoFolder, "/org.mortbay.jetty/jetty-util/6.1.14/jetty-util.jar");
     }
-    
+
 
 }


Mime
View raw message