Skip to content

Instantly share code, notes, and snippets.

@jeserodz
Last active February 26, 2016 15:07
Show Gist options
  • Save jeserodz/c3b2f76e6d66861af876 to your computer and use it in GitHub Desktop.
Save jeserodz/c3b2f76e6d66861af876 to your computer and use it in GitHub Desktop.
<!--
-- This is a pom.xml file with basic configuration for
-- Defining a project (groupId, artifactId, version packaging)
-- Defining dependencies
-- Defining build plugins
-- How to build and execute
-- $ mvn install
-- $ mvn compile
-- $ mvn package
-- $ java -jar target\shiro_example-0.1.jar
-- OR
-- $ java -cp target\shiro_example-0.1.jar com.jeserodz.shiro_example.Application
-->
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jeserodz</groupId>
<artifactId>shiro_example</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<!-- Example Dependencies... -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.16</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Package the project in a JAR file... -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<archive>
<manifest>
<!-- Specify the main class in the JAR Manifest.md -->
<mainClass>com.jeserodz.shiro_example.Application</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Bundle dependencies classes into the JAR package... -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment