diff -Nru nar-maven-plugin-nar-maven-plugin-3.0.0/src/main/java/com/github/maven_nar/NarProperties.java nar-maven-plugin-nar-maven-plugin-3.0.0.IOException/src/main/java/com/github/maven_nar/NarProperties.java --- nar-maven-plugin-nar-maven-plugin-3.0.0/src/main/java/com/github/maven_nar/NarProperties.java 2013-12-06 19:36:29.000000000 +0100 +++ nar-maven-plugin-nar-maven-plugin-3.0.0.IOException/src/main/java/com/github/maven_nar/NarProperties.java 2016-09-06 18:09:11.076335364 +0200 @@ -20,7 +20,12 @@ private NarProperties(MavenProject project) throws MojoFailureException { - Properties defaults = PropertyUtils.loadProperties( NarUtil.class.getResourceAsStream( AOL_PROPERTIES ) ); + Properties defaults = null; + try { + defaults = PropertyUtils.loadProperties( NarUtil.class.getResourceAsStream( AOL_PROPERTIES ) ); + } catch ( IOException e ) { + throw new RuntimeException(e); + } if ( defaults == null ) { throw new MojoFailureException( "NAR: Could not load default properties file: '"+AOL_PROPERTIES+"'." ); @@ -89,7 +94,15 @@ * @param properties the properties from input stream */ public static void inject(MavenProject project, InputStream properties) throws MojoFailureException { - final Properties defaults = PropertyUtils.loadProperties( properties ); + Properties defaults = null; + try { + defaults = PropertyUtils.loadProperties( properties ); + } catch ( IOException e ) { + throw new RuntimeException(e); + } + if ( defaults == null ) { + throw new MojoFailureException( "NAR: Could not load default properties file: '"+AOL_PROPERTIES+"'." ); + } final NarProperties nar = getInstance(project); nar.properties.putAll(defaults); }