mirror of https://github.com/apache/maven.git
improve error if running offline and a dependency is missing
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162976 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d303a99fa5
commit
bd9992eb74
|
@ -9,6 +9,7 @@ import javax.xml.parsers.SAXParser;
|
||||||
import javax.xml.parsers.SAXParserFactory;
|
import javax.xml.parsers.SAXParserFactory;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
@ -535,6 +536,11 @@ public class MBoot
|
||||||
String dependency = (String) i.next();
|
String dependency = (String) i.next();
|
||||||
|
|
||||||
File f = new File( repoLocal, dependency );
|
File f = new File( repoLocal, dependency );
|
||||||
|
if ( !f.exists() )
|
||||||
|
{
|
||||||
|
throw new FileNotFoundException( "Missing dependency: " + dependency +
|
||||||
|
( !online ? "; run again online" : "; there was a problem downloading it earlier" ) );
|
||||||
|
}
|
||||||
|
|
||||||
cl.addURL( f.toURL() );
|
cl.addURL( f.toURL() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue