Skip to content

Commit

Permalink
[SHRINKRES-84] Clear sysprop for maven local repo in offline tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ALRubinger committed Nov 7, 2012
1 parent 356541c commit 1e80045
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.jboss.shrinkwrap.resolver.api.NoResolvedResultException;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
import org.jboss.shrinkwrap.resolver.impl.maven.util.ValidationUtil;
import org.junit.BeforeClass;
import org.junit.Test;

/**
Expand All @@ -34,6 +35,11 @@
public class SystemPropertyPrecedenceTestCase {

private static final String SETTINGS_XML_PATH = "target/settings/profiles/settings.xml";

@BeforeClass
public static void initialize(){
System.clearProperty("maven.repo.local"); // May conflict with release settings
}

@Test
public void overrideUserSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.jboss.shrinkwrap.resolver.impl.maven.util.TestFileUtil;
import org.jboss.shrinkwrap.resolver.impl.maven.util.ValidationUtil;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
Expand All @@ -59,6 +60,11 @@ public class OfflineRepositoryTestCase {

@Rule
public ExpectedException exception = ExpectedException.none();

@BeforeClass
public static void initialize(){
System.clearProperty("maven.repo.local"); // May conflict with release settings
}

/**
* Cleanup, remove the repositories from previous tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.jboss.shrinkwrap.resolver.impl.maven.util.ValidationUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
Expand All @@ -55,6 +56,11 @@ public class RepositoryAuthTestCase {
private static final int HTTP_TEST_PORT = 12345;

private Server server;

@BeforeClass
public static void initialize(){
System.clearProperty("maven.repo.local"); // May conflict with release settings
}

/**
* Cleanup, remove the repositories from previous tests, start the server
Expand Down

0 comments on commit 1e80045

Please sign in to comment.