@Test( expected = IOException.class ) public void testResolve_noMavenResolver() throws Exception { MavenUrlResolver mavenUrlResolver = new MavenUrlResolver( null ); mavenUrlResolver.resolve( "mvn:net.roboconf/my-app/1.0" ); }
@Override public ResolvedFile resolve( String url ) throws IOException { ResolvedFile resolvedFile; if( url.toLowerCase().startsWith( "mvn:" )) { if( this.mavenResolver == null ) throw new IOException( "No Maven resolver was available." ); this.logger.fine( "Resolving a Maven URL: " + url ); File f = this.mavenResolver.resolve( url ); resolvedFile = new ResolvedFile( f, false ); } else { resolvedFile = super.resolve( url ); } return resolvedFile; }
MavenUrlResolver extends DefaultUrlResolver { @Override public ResolvedFile resolve( String url ) throws IOException { ResolvedFile resolvedFile; if( url.toLowerCase().startsWith( "mvn:" )) { if( this.mavenResolver == null ) throw new IOException( "No Maven resolver was available." ); this.logger.fine( "Resolving a Maven URL: " + url ); File f = this.mavenResolver.resolve( url ); resolvedFile = new ResolvedFile( f, false ); } else { resolvedFile = super.resolve( url ); } return resolvedFile; } }
MavenUrlResolver extends DefaultUrlResolver { @Override public ResolvedFile resolve( String url ) throws IOException { ResolvedFile resolvedFile; if( url.toLowerCase().startsWith( "mvn:" )) { if( this.mavenResolver == null ) throw new IOException( "No Maven resolver was available." ); this.logger.fine( "Resolving a Maven URL: " + url ); File f = this.mavenResolver.resolve( url ); resolvedFile = new ResolvedFile( f, false ); } else { resolvedFile = super.resolve( url ); } return resolvedFile; } MavenUrlResolver( MavenResolver mavenResolver ); }
MavenUrlResolver extends DefaultUrlResolver { @Override public ResolvedFile resolve( String url ) throws IOException { ResolvedFile resolvedFile; if( url.toLowerCase().startsWith( "mvn:" )) { if( this.mavenResolver == null ) throw new IOException( "No Maven resolver was available." ); this.logger.fine( "Resolving a Maven URL: " + url ); File f = this.mavenResolver.resolve( url ); resolvedFile = new ResolvedFile( f, false ); } else { resolvedFile = super.resolve( url ); } return resolvedFile; } MavenUrlResolver( MavenResolver mavenResolver ); @Override ResolvedFile resolve( String url ); }
MavenUrlResolver extends DefaultUrlResolver { @Override public ResolvedFile resolve( String url ) throws IOException { ResolvedFile resolvedFile; if( url.toLowerCase().startsWith( "mvn:" )) { if( this.mavenResolver == null ) throw new IOException( "No Maven resolver was available." ); this.logger.fine( "Resolving a Maven URL: " + url ); File f = this.mavenResolver.resolve( url ); resolvedFile = new ResolvedFile( f, false ); } else { resolvedFile = super.resolve( url ); } return resolvedFile; } MavenUrlResolver( MavenResolver mavenResolver ); @Override ResolvedFile resolve( String url );  }