Skip to content

Commit 4dcbdb5

Browse files
committed
Updated deps to newer releases. Updated bytecode restriction to JDK8 due to it being LTS
1 parent 86587ea commit 4dcbdb5

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
<dependency>
161161
<groupId>org.apache.ant</groupId>
162162
<artifactId>ant</artifactId>
163-
<version>1.9.15</version>
163+
<version>1.10.9</version>
164164
</dependency>
165165
<dependency>
166166
<groupId>org.apache.bcel</groupId>
@@ -229,12 +229,12 @@
229229
<dependency>
230230
<groupId>org.codehaus.plexus</groupId>
231231
<artifactId>plexus-utils</artifactId>
232-
<version>3.0.17</version>
232+
<version>3.3.0</version>
233233
</dependency>
234234
<dependency>
235235
<groupId>org.codehaus.plexus</groupId>
236236
<artifactId>plexus-archiver</artifactId>
237-
<version>2.4.4</version>
237+
<version>4.2.3</version>
238238
<exclusions>
239239
<exclusion>
240240
<groupId>org.codehaus.plexus</groupId>
@@ -399,7 +399,7 @@
399399
<configuration>
400400
<rules>
401401
<enforceBytecodeVersion>
402-
<maxJdkVersion>1.7</maxJdkVersion>
402+
<maxJdkVersion>1.8</maxJdkVersion>
403403
</enforceBytecodeVersion>
404404
</rules>
405405
<fail>true</fail>

src/main/java/com/github/maven_nar/NarProperties.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,13 @@ public static NarProperties getInstance(final MavenProject project) throws MojoF
8686
* the properties from input stream
8787
*/
8888
public static void inject(final MavenProject project, final InputStream properties) throws MojoFailureException {
89-
final Properties defaults = PropertyUtils.loadProperties(properties);
89+
Properties defaults;
90+
try {
91+
defaults = PropertyUtils.loadProperties(properties);
92+
} catch (IOException e) {
93+
// re-throw as a mojo failure
94+
throw new MojoFailureException("IOException loading properties", e);
95+
}
9096
final NarProperties nar = getInstance(project);
9197
nar.properties.putAll(defaults);
9298
}
@@ -95,7 +101,13 @@ public static void inject(final MavenProject project, final InputStream properti
95101

96102
private NarProperties(final MavenProject project, File narFile, String customPropertyLocation) throws MojoFailureException {
97103

98-
final Properties defaults = PropertyUtils.loadProperties(NarUtil.class.getResourceAsStream(AOL_PROPERTIES));
104+
Properties defaults;
105+
try {
106+
defaults = PropertyUtils.loadProperties(NarUtil.class.getResourceAsStream(AOL_PROPERTIES));
107+
} catch (IOException e) {
108+
// re-throw as a mojo failure
109+
throw new MojoFailureException("IOException loading properties", e);
110+
}
99111
if (defaults == null) {
100112
throw new MojoFailureException("NAR: Could not load default properties file: '" + AOL_PROPERTIES + "'.");
101113
}
@@ -107,13 +119,14 @@ private NarProperties(final MavenProject project, File narFile, String customPro
107119
fis = new FileInputStream(narFile);
108120
this.properties.load(fis);
109121
}
110-
} catch (final FileNotFoundException e) {
122+
} catch (FileNotFoundException e) {
111123
if (customPropertyLocation != null) {
112124
// We tried loading from a custom location - so throw the exception
113125
throw new MojoFailureException("NAR: Could not load custom properties file: '" + customPropertyLocation + "'.");
114126
}
115-
} catch (final IOException e) {
116-
// ignore (FIXME)
127+
} catch (IOException e) {
128+
// re-throw as a mojo failure
129+
throw new MojoFailureException("IOException loading properties", e);
117130
} finally {
118131
try {
119132
if (fis != null) {

0 commit comments

Comments
 (0)