Changed pom.xml to also build a jar file and upload it to the repository

This commit is contained in:
Nanne Baars 2015-05-03 07:50:29 +02:00
parent 35c8c79138
commit 6866208ca2
3 changed files with 27 additions and 12 deletions

27
pom.xml
View File

@ -65,16 +65,31 @@
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId> <version>2.6</version>
<version>2.5</version> <configuration>
<attachClasses>true</attachClasses>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions> <executions>
<execution> <execution>
<id>create-jar</id> <id>attach-artifacts</id>
<phase>compile</phase> <phase>package</phase>
<goals> <goals>
<goal>jar</goal> <goal>attach-artifact</goal>
</goals> </goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/WebGoat-Container-${project.version}-classes.jar</file>
<type>classes-jar</type>
</artifact>
</artifacts>
</configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>

View File

@ -70,7 +70,7 @@ public class Plugin {
this.lesson = clazz; this.lesson = clazz;
} }
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
logger.error("Unable to load class {}", name); logger.error("Unable to load class {}", name, e);
} }
} }

View File

@ -43,7 +43,7 @@ public class PluginsLoader implements Runnable {
plugins.add(plugin); plugins.add(plugin);
} }
} catch (Plugin.PluginLoadingFailure e) { } catch (Plugin.PluginLoadingFailure e) {
logger.error("Unable to load plugin, continue loading others..."); logger.error("Unable to load plugin, continue loading others...", e);
} }
return FileVisitResult.CONTINUE; return FileVisitResult.CONTINUE;
} }