commit
9649f67863
@ -0,0 +1,177 @@
|
||||
# Things that don't belong under source control see https://github.com/github/gitignore
|
||||
|
||||
# Java
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
# Maven
|
||||
target/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
.mvn/timing.properties
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# Apple
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# Netbeans
|
||||
nbproject/private/
|
||||
build/
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
nbactions.xml
|
||||
.nb-gradle/
|
||||
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
.idea/dictionaries
|
||||
.idea/vcs.xml
|
||||
.idea/jsLibraryMappings.xml
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/dataSources.ids
|
||||
.idea/dataSources.xml
|
||||
.idea/dataSources.local.xml
|
||||
.idea/sqlDataSources.xml
|
||||
.idea/dynamic.xml
|
||||
.idea/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/gradle.xml
|
||||
.idea/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Eclipse
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
|
||||
# Eclipse Core
|
||||
.project
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# PyDev specific (Python IDE for Eclipse)
|
||||
*.pydevproject
|
||||
|
||||
# CDT-specific (C/C++ Development Tooling)
|
||||
.cproject
|
||||
|
||||
# JDT-specific (Eclipse Java Development Tools)
|
||||
.classpath
|
||||
|
||||
# Java annotation processor (APT)
|
||||
.factorypath
|
||||
|
||||
# PDT-specific (PHP Development Tools)
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# Tern plugin
|
||||
.tern-project
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
# STS (Spring Tool Suite)
|
||||
.springBeans
|
||||
|
||||
# Code Recommenders
|
||||
.recommenders/
|
||||
@ -0,0 +1,9 @@
|
||||
junit:
|
||||
stage: test
|
||||
script:
|
||||
- mvn -B clean test
|
||||
|
||||
generate_artifacts:
|
||||
stage: deploy
|
||||
script:
|
||||
- mvn -B clean site package
|
||||
@ -0,0 +1,55 @@
|
||||
# SENG302 Project Template
|
||||
|
||||
Basic maven project with required maven reporting setup and basic gitlab ci.
|
||||
|
||||
It is a requirement that your product should be completely built to a deliverable form using the maven package goal.
|
||||
|
||||
# Basic Structure
|
||||
- `src/` Your application source
|
||||
- `doc/` User and design documentation
|
||||
- `doc/examples/` Demo example files for use with your application
|
||||
|
||||
# CI Server Setup
|
||||
|
||||
This setup will happen on your ci server which has been refered to so far as your jenkins server. You will need to install maven and the gitlab ci runner. To do this you will have to SSH to the server with your root credentails. The following commands are executed on the server.
|
||||
|
||||
## Maven Install
|
||||
|
||||
Download maven tarball.
|
||||
|
||||
```sh
|
||||
wget http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
|
||||
```
|
||||
|
||||
Extract the tarball into the `/opt/` directory.
|
||||
|
||||
```sh
|
||||
tar -C /opt/ -xvzf apache-maven-3.3.9-bin.tar.gz
|
||||
```
|
||||
|
||||
Add maven to the system path.
|
||||
|
||||
```sh
|
||||
echo "export PATH=/opt/apache-maven-3.3.9/bin:\$PATH" > /etc/profile.d/maven.sh
|
||||
```
|
||||
|
||||
To check that installation was successful start a new shell and run `mvn --version` You should see output similar to the following
|
||||
|
||||
|
||||
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T05:41:47+13:00)
|
||||
Maven home: /opt/apache-maven-3.3.9
|
||||
Java version: 1.8.0_66, vendor: Oracle Corporation
|
||||
Java home: /usr/java/jdk1.8.0_66/jre
|
||||
Default locale: en_US, platform encoding: UTF-8
|
||||
OS name: "linux", version: "2.6.32-573.12.1.el6.x86_64", arch: "amd64", family: "unix"
|
||||
|
||||
## CI Runner Install
|
||||
|
||||
Follow the instructions for CentOS in the [ci install guide] to install the gitlab-ci-multi-runner.
|
||||
|
||||
The details (url and token) for registering your runner can be found on the [runner settings] page. (From the gitlab project in the side bar `Settings` then `Runners`)
|
||||
|
||||
You should use the shell executor when prompted.
|
||||
|
||||
[runner settings]:https://eng-git.canterbury.ac.nz/SENG302-2016/team-0/runners
|
||||
[ci install guide]:https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md
|
||||
@ -0,0 +1,2 @@
|
||||
# Design Decisions
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
# Examples
|
||||
|
||||
You should also include example data files for your application that demonstrate the
|
||||
features of your application. These should contain adequate amounts of data that
|
||||
would be expected from actual use of your application.
|
||||
|
||||
This file should provide a basic overview of the example files available.
|
||||
@ -0,0 +1 @@
|
||||
# User Manual
|
||||
@ -0,0 +1,93 @@
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>seng302</groupId>
|
||||
<artifactId>app</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.0</version>
|
||||
<name>app</name>
|
||||
<url>https://eng-git.canterbury.ac.nz/SENG302-2016/team-0</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4.3</version>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<manifestEntries>
|
||||
<Main-Class>seng302.App</Main-Class>
|
||||
<X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
|
||||
<X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>
|
||||
</manifestEntries>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jxr-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>3.6</version>
|
||||
<configuration>
|
||||
<linkXref>true</linkXref>
|
||||
<targetjdk>1.8</targetjdk>
|
||||
<minimumtokencount>100</minimumtokencount>
|
||||
<rulesets>
|
||||
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||
</rulesets>
|
||||
<includeXmlInSite>true</includeXmlInSite>
|
||||
<sourceEncoding>utf-8</sourceEncoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.10.3</version>
|
||||
<configuration>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||
<version>2.19.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.8.1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</project>
|
||||
@ -0,0 +1,9 @@
|
||||
package seng302;
|
||||
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Welcome to SENG302" );
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package seng302;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
{
|
||||
@Test
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue