mirror of
https://github.com/apache/maven.git
synced 2025-03-06 16:49:27 +00:00
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.SAXParserFactory;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
@ -535,6 +536,11 @@ private void createToolsClassLoader()
|
||||
String dependency = (String) i.next();
|
||||
|
||||
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() );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user