Permalink
Browse files

Add support for "maven bridge.offline" (-o)

Signed-off-by: Alin Dreghiciu <adreghiciu@gmail.com>
  • Loading branch information...
1 parent e9370bf commit d53aed9f335bad52c8a449af88b7edcdd4c265fa @adreghiciu adreghiciu committed Nov 13, 2012
View
2 bridge/src/main/java/org/sonatype/sisu/maven/bridge/Names.java
@@ -33,6 +33,8 @@
static final String REPOSITORIES = "mavenbridge.repositories";
+ static final String OFFLINE = "mavenbridge.offline";
+
static final String USER_HOME = System.getProperty( "user.home" );
static final String USER_DIR = System.getProperty( "user.dir", "" );
View
7 ...va/org/sonatype/sisu/maven/bridge/support/session/MavenBridgeRepositorySystemSession.java
@@ -16,6 +16,7 @@
import static org.sonatype.sisu.maven.bridge.Names.LOCAL_REPOSITORY_DIR;
import static org.sonatype.sisu.maven.bridge.Names.LOCAL_REPOSITORY_DIR_MAVEN;
import static org.sonatype.sisu.maven.bridge.Names.UPDATE_POLICY;
+import static org.sonatype.sisu.maven.bridge.Names.OFFLINE;
import java.io.File;
import javax.inject.Inject;
@@ -178,6 +179,12 @@ void injectChecksumPolicy( final @Named( "${" + CHECKSUM_POLICY + ":-warn}" ) St
super.setChecksumPolicy( checksumPolicy );
}
+ @Inject
+ void injectOffline( final @Named( "${" + OFFLINE + ":-false}" ) Boolean offline )
+ {
+ super.setOffline( offline );
+ }
+
protected Logger log()
{
if ( log == null )

0 comments on commit d53aed9

Please sign in to comment.