mirror of https://github.com/apache/ant-ivy
Remove main() in tests, optimise target dependencies in build.xml and address diverse Checkstyle warnings
This commit is contained in:
parent
7d4528639c
commit
a9880a18fe
13
build.xml
13
build.xml
|
|
@ -49,13 +49,13 @@
|
|||
<ivy:configure override="true"/>
|
||||
</target>
|
||||
|
||||
<target name="install" depends="init-ivy-home,jar"
|
||||
<target name="install" depends="jar"
|
||||
description="build Ivy and install it in Ivy user home for builds using Ivy user home to load Ivy jar">
|
||||
<property name="ivy.jar.file" value="${ivy.home}/jars/ivy.jar"/>
|
||||
<copy file="${artifacts.build.dir}/jars/${final.name}" tofile="${ivy.jar.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="install-ant" depends="init-ivy-home,jar"
|
||||
<target name="install-ant" depends="jar"
|
||||
description="build Ivy and install it in Ant home lib">
|
||||
<condition property="ant.home" value="${env.ANT_HOME}">
|
||||
<isset property="env.ANT_HOME"/>
|
||||
|
|
@ -262,7 +262,7 @@
|
|||
todir="${ant.classes.build.dir}/fr/jayasoft/ivy/ant"/>
|
||||
</target>
|
||||
|
||||
<target name="compile-optional" depends="compile-ant,resolve">
|
||||
<target name="compile-optional" depends="compile-ant">
|
||||
<javac srcdir="${src.dir}"
|
||||
destdir="${optional.classes.build.dir}"
|
||||
sourcepath=""
|
||||
|
|
@ -456,6 +456,11 @@
|
|||
message="At least one test has failed. See logs (in ${test.xml.dir}) for details (use the target test-report to run the test with a report)"/>
|
||||
</target>
|
||||
|
||||
<target name="check-ibiblio" depends="build-test">
|
||||
<java classname="org.apache.ivy.plugins.resolver.IBiblioHelper"
|
||||
classpathref="test.classpath"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================================================
|
||||
REPORTS AND DOCUMENTATION
|
||||
================================================================= -->
|
||||
|
|
@ -550,7 +555,7 @@
|
|||
<taskdef uri="antlib:com.puppycrawl.tools.checkstyle.ant"
|
||||
resource="com/puppycrawl/tools/checkstyle/ant/antlib.xml" classpathref="checkstyle.classpath"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Checks Ivy codebase according to ${checkstyle.src.dir}/checkstyle-config -->
|
||||
<target name="checkstyle-internal" depends="init-checkstyle">
|
||||
<mkdir dir="${checkstyle.report.dir}"/>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import java.io.File;
|
|||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
|
||||
class DeleteOnExitHook {
|
||||
final class DeleteOnExitHook {
|
||||
|
||||
static {
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import java.text.ParseException;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class DateUtil {
|
||||
public final class DateUtil {
|
||||
|
||||
private DateUtil() {
|
||||
// Utility class
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import java.util.Properties;
|
|||
* putAll puts given values without encrypting them. It this thus recommended to void using them,
|
||||
* use setProperty and getProperty instead.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EncryptedProperties extends Properties {
|
||||
|
||||
public EncryptedProperties() {
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
*/
|
||||
package org.apache.ivy.util;
|
||||
|
||||
|
||||
/**
|
||||
* Deprecated because of renaming due spell check.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@Deprecated
|
||||
public class EncrytedProperties extends EncryptedProperties {
|
||||
}
|
||||
|
|
@ -140,11 +140,4 @@ public class TestPerformance {
|
|||
private ResolveOptions getResolveOptions(String[] confs) {
|
||||
return new ResolveOptions().setConfs(confs);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
TestPerformance t = new TestPerformance();
|
||||
t.setUp();
|
||||
t.testPerfs();
|
||||
t.tearDown();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,17 +19,12 @@
|
|||
package org.apache.ivy.core.module.descriptor;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.JUnitCore;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
public class DefaultDependencyDescriptorTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
JUnitCore.runClasses(DefaultDependencyDescriptorTest.class);
|
||||
}
|
||||
|
||||
/*
|
||||
* Test method for
|
||||
* 'org.apache.ivy.DefaultDependencyDescriptor.replaceSelfFallbackPattern(String, String)'
|
||||
|
|
|
|||
|
|
@ -17,13 +17,17 @@
|
|||
*/
|
||||
package org.apache.ivy.core.settings;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ivy.core.cache.DefaultRepositoryCacheManager;
|
||||
import org.apache.ivy.core.cache.RepositoryCacheManager;
|
||||
import org.apache.ivy.core.cache.ResolutionCacheManager;
|
||||
import org.apache.ivy.core.module.descriptor.Artifact;
|
||||
import org.apache.ivy.core.module.id.ModuleId;
|
||||
|
|
@ -47,13 +51,10 @@ import org.apache.ivy.plugins.resolver.packager.PackagerResolver;
|
|||
import org.apache.ivy.plugins.version.ChainVersionMatcher;
|
||||
import org.apache.ivy.plugins.version.MockVersionMatcher;
|
||||
import org.apache.ivy.plugins.version.VersionMatcher;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* TODO write javadoc
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue