Jared Norris před 8 roky
rodič
revize
81868693c3

binární
.DS_Store Zobrazit soubor


+ 22
- 22
.gitignore Zobrazit soubor

@@ -1,25 +1,25 @@
1
-# Compiled class file
2
-*.class
1
+/target/
2
+!.mvn/wrapper/maven-wrapper.jar
3 3
 
4
-# intellij
5
-.idea/
4
+### STS ###
5
+.apt_generated
6
+.classpath
7
+.factorypath
8
+.project
9
+.settings
10
+.springBeans
11
+.sts4-cache
6 12
 
7
-# Log file
8
-*.log
13
+### IntelliJ IDEA ###
14
+.idea
15
+*.iws
16
+*.iml
17
+*.ipr
9 18
 
10
-# BlueJ files
11
-*.ctxt
12
-
13
-# Mobile Tools for Java (J2ME)
14
-.mtj.tmp/
15
-
16
-# Package Files #
17
-*.jar
18
-*.war
19
-*.ear
20
-*.zip
21
-*.tar.gz
22
-*.rar
23
-
24
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
25
-hs_err_pid*
19
+### NetBeans ###
20
+/nbproject/private/
21
+/build/
22
+/nbbuild/
23
+/dist/
24
+/nbdist/
25
+/.nb-gradle/

+ 1
- 1
.idea/vcs.xml Zobrazit soubor

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3 3
   <component name="VcsDirectoryMappings">
4
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
4
+    <mapping directory="" vcs="Git" />
5 5
   </component>
6 6
 </project>

binární
.mvn/wrapper/maven-wrapper.jar Zobrazit soubor


+ 1
- 0
.mvn/wrapper/maven-wrapper.properties Zobrazit soubor

@@ -0,0 +1 @@
1
+distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip

+ 0
- 15
Client/pom.xml Zobrazit soubor

@@ -1,15 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
-         xmlns="http://maven.apache.org/POM/4.0.0"
4
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
-    <parent>
6
-        <artifactId>YouAreEll</artifactId>
7
-        <groupId>com.zipcoder.ZipChat</groupId>
8
-        <version>1.0-SNAPSHOT</version>
9
-    </parent>
10
-    <modelVersion>4.0.0</modelVersion>
11
-
12
-    <artifactId>Client</artifactId>
13
-
14
-
15
-</project>

+ 0
- 124
Client/src/main/java/SimpleShell.java Zobrazit soubor

@@ -1,124 +0,0 @@
1
-import java.io.BufferedReader;
2
-import java.io.IOException;
3
-import java.io.InputStream;
4
-import java.io.InputStreamReader;
5
-import java.util.ArrayList;
6
-import java.util.List;
7
-
8
-public class SimpleShell {
9
-
10
-
11
-    public static void prettyPrint(String output) {
12
-        // yep, make an effort to format things nicely, eh?
13
-        System.out.println(output);
14
-    }
15
-    public static void main(String[] args) throws java.io.IOException {
16
-
17
-        YouAreEll webber = new YouAreEll();
18
-        String commandLine;
19
-        BufferedReader console = new BufferedReader
20
-                (new InputStreamReader(System.in));
21
-
22
-        ProcessBuilder pb = new ProcessBuilder();
23
-        List<String> history = new ArrayList<String>();
24
-        int index = 0;
25
-        //we break out with <ctrl c>
26
-        while (true) {
27
-            //read what the user enters
28
-            System.out.println("cmd? ");
29
-            commandLine = console.readLine();
30
-
31
-            //input parsed into array of strings(command and arguments)
32
-            String[] commands = commandLine.split(" ");
33
-            List<String> list = new ArrayList<String>();
34
-
35
-            //if the user entered a return, just loop again
36
-            if (commandLine.equals(""))
37
-                continue;
38
-            if (commandLine.equals("exit")) {
39
-                System.out.println("bye!");
40
-                break;
41
-            }
42
-
43
-            //loop through to see if parsing worked
44
-            for (int i = 0; i < commands.length; i++) {
45
-                //System.out.println(commands[i]); //***check to see if parsing/split worked***
46
-                list.add(commands[i]);
47
-
48
-            }
49
-            System.out.print(list); //***check to see if list was added correctly***
50
-            history.addAll(list);
51
-            try {
52
-                //display history of shell with index
53
-                if (list.get(list.size() - 1).equals("history")) {
54
-                    for (String s : history)
55
-                        System.out.println((index++) + " " + s);
56
-                    continue;
57
-                }
58
-
59
-                // Specific Commands.
60
-
61
-                // ids
62
-                if (list.contains("ids")) {
63
-                    String results = webber.get_ids();
64
-                    SimpleShell.prettyPrint(results);
65
-                    continue;
66
-                }
67
-
68
-                // messages
69
-                if (list.contains("messages")) {
70
-                    String results = webber.get_messages();
71
-                    SimpleShell.prettyPrint(results);
72
-                    continue;
73
-                }
74
-                // you need to add a bunch more.
75
-
76
-                //!! command returns the last command in history
77
-                if (list.get(list.size() - 1).equals("!!")) {
78
-                    pb.command(history.get(history.size() - 2));
79
-
80
-                }//!<integer value i> command
81
-                else if (list.get(list.size() - 1).charAt(0) == '!') {
82
-                    int b = Character.getNumericValue(list.get(list.size() - 1).charAt(1));
83
-                    if (b <= history.size())//check if integer entered isn't bigger than history size
84
-                        pb.command(history.get(b));
85
-                } else {
86
-                    pb.command(list);
87
-                }
88
-
89
-                // wait, wait, what curiousness is this?
90
-                Process process = pb.start();
91
-
92
-                //obtain the input stream
93
-                InputStream is = process.getInputStream();
94
-                InputStreamReader isr = new InputStreamReader(is);
95
-                BufferedReader br = new BufferedReader(isr);
96
-
97
-                //read output of the process
98
-                String line;
99
-                while ((line = br.readLine()) != null)
100
-                    System.out.println(line);
101
-                br.close();
102
-
103
-
104
-            }
105
-
106
-            //catch ioexception, output appropriate message, resume waiting for input
107
-            catch (IOException e) {
108
-                System.out.println("Input Error, Please try again!");
109
-            }
110
-            // So what, do you suppose, is the meaning of this comment?
111
-            /** The steps are:
112
-             * 1. parse the input to obtain the command and any parameters
113
-             * 2. create a ProcessBuilder object
114
-             * 3. start the process
115
-             * 4. obtain the output stream
116
-             * 5. output the contents returned by the command
117
-             */
118
-
119
-        }
120
-
121
-
122
-    }
123
-
124
-}

+ 0
- 23
Client/src/main/java/YouAreEll.java Zobrazit soubor

@@ -1,23 +0,0 @@
1
-public class YouAreEll {
2
-
3
-    YouAreEll() {
4
-    }
5
-
6
-    public static void main(String[] args) {
7
-        YouAreEll urlhandler = new YouAreEll();
8
-        System.out.println(urlhandler.MakeURLCall("/ids", "GET", ""));
9
-        System.out.println(urlhandler.MakeURLCall("/messages", "GET", ""));
10
-    }
11
-
12
-    public String get_ids() {
13
-        return MakeURLCall("/ids", "GET", "");
14
-    }
15
-
16
-    public String get_messages() {
17
-        return MakeURLCall("/messages", "GET", "");
18
-    }
19
-
20
-    public String MakeURLCall(String mainurl, String method, String jpayload) {
21
-        return "nada";
22
-    }
23
-}

+ 12
- 0
client/.babelrc Zobrazit soubor

@@ -0,0 +1,12 @@
1
+{
2
+  "presets": [
3
+    ["env", {
4
+      "modules": false,
5
+      "targets": {
6
+        "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7
+      }
8
+    }],
9
+    "stage-2"
10
+  ],
11
+  "plugins": ["transform-vue-jsx", "transform-runtime"]
12
+}

+ 9
- 0
client/.editorconfig Zobrazit soubor

@@ -0,0 +1,9 @@
1
+root = true
2
+
3
+[*]
4
+charset = utf-8
5
+indent_style = space
6
+indent_size = 2
7
+end_of_line = lf
8
+insert_final_newline = true
9
+trim_trailing_whitespace = true

+ 14
- 0
client/.gitignore Zobrazit soubor

@@ -0,0 +1,14 @@
1
+.DS_Store
2
+node_modules/
3
+/dist/
4
+npm-debug.log*
5
+yarn-debug.log*
6
+yarn-error.log*
7
+
8
+# Editor directories and files
9
+.idea
10
+.vscode
11
+*.suo
12
+*.ntvs*
13
+*.njsproj
14
+*.sln

+ 10
- 0
client/.postcssrc.js Zobrazit soubor

@@ -0,0 +1,10 @@
1
+// https://github.com/michael-ciniawsky/postcss-load-config
2
+
3
+module.exports = {
4
+  "plugins": {
5
+    "postcss-import": {},
6
+    "postcss-url": {},
7
+    // to edit target browsers: use "browserslist" field in package.json
8
+    "autoprefixer": {}
9
+  }
10
+}

+ 21
- 0
client/README.md Zobrazit soubor

@@ -0,0 +1,21 @@
1
+# client
2
+
3
+> A Vue.js project
4
+
5
+## Build Setup
6
+
7
+``` bash
8
+# install dependencies
9
+npm install
10
+
11
+# serve with hot reload at localhost:8080
12
+npm run dev
13
+
14
+# build for production with minification
15
+npm run build
16
+
17
+# build for production and view the bundle analyzer report
18
+npm run build --report
19
+```
20
+
21
+For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

+ 41
- 0
client/build/build.js Zobrazit soubor

@@ -0,0 +1,41 @@
1
+'use strict'
2
+require('./check-versions')()
3
+
4
+process.env.NODE_ENV = 'production'
5
+
6
+const ora = require('ora')
7
+const rm = require('rimraf')
8
+const path = require('path')
9
+const chalk = require('chalk')
10
+const webpack = require('webpack')
11
+const config = require('../config')
12
+const webpackConfig = require('./webpack.prod.conf')
13
+
14
+const spinner = ora('building for production...')
15
+spinner.start()
16
+
17
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
18
+  if (err) throw err
19
+  webpack(webpackConfig, (err, stats) => {
20
+    spinner.stop()
21
+    if (err) throw err
22
+    process.stdout.write(stats.toString({
23
+      colors: true,
24
+      modules: false,
25
+      children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
26
+      chunks: false,
27
+      chunkModules: false
28
+    }) + '\n\n')
29
+
30
+    if (stats.hasErrors()) {
31
+      console.log(chalk.red('  Build failed with errors.\n'))
32
+      process.exit(1)
33
+    }
34
+
35
+    console.log(chalk.cyan('  Build complete.\n'))
36
+    console.log(chalk.yellow(
37
+      '  Tip: built files are meant to be served over an HTTP server.\n' +
38
+      '  Opening index.html over file:// won\'t work.\n'
39
+    ))
40
+  })
41
+})

+ 54
- 0
client/build/check-versions.js Zobrazit soubor

@@ -0,0 +1,54 @@
1
+'use strict'
2
+const chalk = require('chalk')
3
+const semver = require('semver')
4
+const packageConfig = require('../package.json')
5
+const shell = require('shelljs')
6
+
7
+function exec (cmd) {
8
+  return require('child_process').execSync(cmd).toString().trim()
9
+}
10
+
11
+const versionRequirements = [
12
+  {
13
+    name: 'node',
14
+    currentVersion: semver.clean(process.version),
15
+    versionRequirement: packageConfig.engines.node
16
+  }
17
+]
18
+
19
+if (shell.which('npm')) {
20
+  versionRequirements.push({
21
+    name: 'npm',
22
+    currentVersion: exec('npm --version'),
23
+    versionRequirement: packageConfig.engines.npm
24
+  })
25
+}
26
+
27
+module.exports = function () {
28
+  const warnings = []
29
+
30
+  for (let i = 0; i < versionRequirements.length; i++) {
31
+    const mod = versionRequirements[i]
32
+
33
+    if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
34
+      warnings.push(mod.name + ': ' +
35
+        chalk.red(mod.currentVersion) + ' should be ' +
36
+        chalk.green(mod.versionRequirement)
37
+      )
38
+    }
39
+  }
40
+
41
+  if (warnings.length) {
42
+    console.log('')
43
+    console.log(chalk.yellow('To use this template, you must update following to modules:'))
44
+    console.log()
45
+
46
+    for (let i = 0; i < warnings.length; i++) {
47
+      const warning = warnings[i]
48
+      console.log('  ' + warning)
49
+    }
50
+
51
+    console.log()
52
+    process.exit(1)
53
+  }
54
+}

binární
client/build/logo.png Zobrazit soubor


+ 101
- 0
client/build/utils.js Zobrazit soubor

@@ -0,0 +1,101 @@
1
+'use strict'
2
+const path = require('path')
3
+const config = require('../config')
4
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
5
+const packageConfig = require('../package.json')
6
+
7
+exports.assetsPath = function (_path) {
8
+  const assetsSubDirectory = process.env.NODE_ENV === 'production'
9
+    ? config.build.assetsSubDirectory
10
+    : config.dev.assetsSubDirectory
11
+
12
+  return path.posix.join(assetsSubDirectory, _path)
13
+}
14
+
15
+exports.cssLoaders = function (options) {
16
+  options = options || {}
17
+
18
+  const cssLoader = {
19
+    loader: 'css-loader',
20
+    options: {
21
+      sourceMap: options.sourceMap
22
+    }
23
+  }
24
+
25
+  const postcssLoader = {
26
+    loader: 'postcss-loader',
27
+    options: {
28
+      sourceMap: options.sourceMap
29
+    }
30
+  }
31
+
32
+  // generate loader string to be used with extract text plugin
33
+  function generateLoaders (loader, loaderOptions) {
34
+    const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
35
+
36
+    if (loader) {
37
+      loaders.push({
38
+        loader: loader + '-loader',
39
+        options: Object.assign({}, loaderOptions, {
40
+          sourceMap: options.sourceMap
41
+        })
42
+      })
43
+    }
44
+
45
+    // Extract CSS when that option is specified
46
+    // (which is the case during production build)
47
+    if (options.extract) {
48
+      return ExtractTextPlugin.extract({
49
+        use: loaders,
50
+        fallback: 'vue-style-loader'
51
+      })
52
+    } else {
53
+      return ['vue-style-loader'].concat(loaders)
54
+    }
55
+  }
56
+
57
+  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
58
+  return {
59
+    css: generateLoaders(),
60
+    postcss: generateLoaders(),
61
+    less: generateLoaders('less'),
62
+    sass: generateLoaders('sass', { indentedSyntax: true }),
63
+    scss: generateLoaders('sass'),
64
+    stylus: generateLoaders('stylus'),
65
+    styl: generateLoaders('stylus')
66
+  }
67
+}
68
+
69
+// Generate loaders for standalone style files (outside of .vue)
70
+exports.styleLoaders = function (options) {
71
+  const output = []
72
+  const loaders = exports.cssLoaders(options)
73
+
74
+  for (const extension in loaders) {
75
+    const loader = loaders[extension]
76
+    output.push({
77
+      test: new RegExp('\\.' + extension + '$'),
78
+      use: loader
79
+    })
80
+  }
81
+
82
+  return output
83
+}
84
+
85
+exports.createNotifierCallback = () => {
86
+  const notifier = require('node-notifier')
87
+
88
+  return (severity, errors) => {
89
+    if (severity !== 'error') return
90
+
91
+    const error = errors[0]
92
+    const filename = error.file && error.file.split('!').pop()
93
+
94
+    notifier.notify({
95
+      title: packageConfig.name,
96
+      message: severity + ': ' + error.name,
97
+      subtitle: filename || '',
98
+      icon: path.join(__dirname, 'logo.png')
99
+    })
100
+  }
101
+}

+ 22
- 0
client/build/vue-loader.conf.js Zobrazit soubor

@@ -0,0 +1,22 @@
1
+'use strict'
2
+const utils = require('./utils')
3
+const config = require('../config')
4
+const isProduction = process.env.NODE_ENV === 'production'
5
+const sourceMapEnabled = isProduction
6
+  ? config.build.productionSourceMap
7
+  : config.dev.cssSourceMap
8
+
9
+module.exports = {
10
+  loaders: utils.cssLoaders({
11
+    sourceMap: sourceMapEnabled,
12
+    extract: isProduction
13
+  }),
14
+  cssSourceMap: sourceMapEnabled,
15
+  cacheBusting: config.dev.cacheBusting,
16
+  transformToRequire: {
17
+    video: ['src', 'poster'],
18
+    source: 'src',
19
+    img: 'src',
20
+    image: 'xlink:href'
21
+  }
22
+}

+ 82
- 0
client/build/webpack.base.conf.js Zobrazit soubor

@@ -0,0 +1,82 @@
1
+'use strict'
2
+const path = require('path')
3
+const utils = require('./utils')
4
+const config = require('../config')
5
+const vueLoaderConfig = require('./vue-loader.conf')
6
+
7
+function resolve (dir) {
8
+  return path.join(__dirname, '..', dir)
9
+}
10
+
11
+
12
+
13
+module.exports = {
14
+  context: path.resolve(__dirname, '../'),
15
+  entry: {
16
+    app: './src/main.js'
17
+  },
18
+  output: {
19
+    path: config.build.assetsRoot,
20
+    filename: '[name].js',
21
+    publicPath: process.env.NODE_ENV === 'production'
22
+      ? config.build.assetsPublicPath
23
+      : config.dev.assetsPublicPath
24
+  },
25
+  resolve: {
26
+    extensions: ['.js', '.vue', '.json'],
27
+    alias: {
28
+      'vue$': 'vue/dist/vue.esm.js',
29
+      '@': resolve('src'),
30
+    }
31
+  },
32
+  module: {
33
+    rules: [
34
+      {
35
+        test: /\.vue$/,
36
+        loader: 'vue-loader',
37
+        options: vueLoaderConfig
38
+      },
39
+      {
40
+        test: /\.js$/,
41
+        loader: 'babel-loader',
42
+        include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
43
+      },
44
+      {
45
+        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
46
+        loader: 'url-loader',
47
+        options: {
48
+          limit: 10000,
49
+          name: utils.assetsPath('img/[name].[hash:7].[ext]')
50
+        }
51
+      },
52
+      {
53
+        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
54
+        loader: 'url-loader',
55
+        options: {
56
+          limit: 10000,
57
+          name: utils.assetsPath('media/[name].[hash:7].[ext]')
58
+        }
59
+      },
60
+      {
61
+        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
62
+        loader: 'url-loader',
63
+        options: {
64
+          limit: 10000,
65
+          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
66
+        }
67
+      }
68
+    ]
69
+  },
70
+  node: {
71
+    // prevent webpack from injecting useless setImmediate polyfill because Vue
72
+    // source contains it (although only uses it if it's native).
73
+    setImmediate: false,
74
+    // prevent webpack from injecting mocks to Node native modules
75
+    // that does not make sense for the client
76
+    dgram: 'empty',
77
+    fs: 'empty',
78
+    net: 'empty',
79
+    tls: 'empty',
80
+    child_process: 'empty'
81
+  }
82
+}

+ 95
- 0
client/build/webpack.dev.conf.js Zobrazit soubor

@@ -0,0 +1,95 @@
1
+'use strict'
2
+const utils = require('./utils')
3
+const webpack = require('webpack')
4
+const config = require('../config')
5
+const merge = require('webpack-merge')
6
+const path = require('path')
7
+const baseWebpackConfig = require('./webpack.base.conf')
8
+const CopyWebpackPlugin = require('copy-webpack-plugin')
9
+const HtmlWebpackPlugin = require('html-webpack-plugin')
10
+const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
11
+const portfinder = require('portfinder')
12
+
13
+const HOST = process.env.HOST
14
+const PORT = process.env.PORT && Number(process.env.PORT)
15
+
16
+const devWebpackConfig = merge(baseWebpackConfig, {
17
+  module: {
18
+    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
19
+  },
20
+  // cheap-module-eval-source-map is faster for development
21
+  devtool: config.dev.devtool,
22
+
23
+  // these devServer options should be customized in /config/index.js
24
+  devServer: {
25
+    clientLogLevel: 'warning',
26
+    historyApiFallback: {
27
+      rewrites: [
28
+        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
29
+      ],
30
+    },
31
+    hot: true,
32
+    contentBase: false, // since we use CopyWebpackPlugin.
33
+    compress: true,
34
+    host: HOST || config.dev.host,
35
+    port: PORT || config.dev.port,
36
+    open: config.dev.autoOpenBrowser,
37
+    overlay: config.dev.errorOverlay
38
+      ? { warnings: false, errors: true }
39
+      : false,
40
+    publicPath: config.dev.assetsPublicPath,
41
+    proxy: config.dev.proxyTable,
42
+    quiet: true, // necessary for FriendlyErrorsPlugin
43
+    watchOptions: {
44
+      poll: config.dev.poll,
45
+    }
46
+  },
47
+  plugins: [
48
+    new webpack.DefinePlugin({
49
+      'process.env': require('../config/dev.env')
50
+    }),
51
+    new webpack.HotModuleReplacementPlugin(),
52
+    new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
53
+    new webpack.NoEmitOnErrorsPlugin(),
54
+    // https://github.com/ampedandwired/html-webpack-plugin
55
+    new HtmlWebpackPlugin({
56
+      filename: 'index.html',
57
+      template: 'index.html',
58
+      inject: true
59
+    }),
60
+    // copy custom static assets
61
+    new CopyWebpackPlugin([
62
+      {
63
+        from: path.resolve(__dirname, '../static'),
64
+        to: config.dev.assetsSubDirectory,
65
+        ignore: ['.*']
66
+      }
67
+    ])
68
+  ]
69
+})
70
+
71
+module.exports = new Promise((resolve, reject) => {
72
+  portfinder.basePort = process.env.PORT || config.dev.port
73
+  portfinder.getPort((err, port) => {
74
+    if (err) {
75
+      reject(err)
76
+    } else {
77
+      // publish the new Port, necessary for e2e tests
78
+      process.env.PORT = port
79
+      // add port to devServer config
80
+      devWebpackConfig.devServer.port = port
81
+
82
+      // Add FriendlyErrorsPlugin
83
+      devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
84
+        compilationSuccessInfo: {
85
+          messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
86
+        },
87
+        onErrors: config.dev.notifyOnErrors
88
+        ? utils.createNotifierCallback()
89
+        : undefined
90
+      }))
91
+
92
+      resolve(devWebpackConfig)
93
+    }
94
+  })
95
+})

+ 145
- 0
client/build/webpack.prod.conf.js Zobrazit soubor

@@ -0,0 +1,145 @@
1
+'use strict'
2
+const path = require('path')
3
+const utils = require('./utils')
4
+const webpack = require('webpack')
5
+const config = require('../config')
6
+const merge = require('webpack-merge')
7
+const baseWebpackConfig = require('./webpack.base.conf')
8
+const CopyWebpackPlugin = require('copy-webpack-plugin')
9
+const HtmlWebpackPlugin = require('html-webpack-plugin')
10
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
11
+const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13
+
14
+const env = require('../config/prod.env')
15
+
16
+const webpackConfig = merge(baseWebpackConfig, {
17
+  module: {
18
+    rules: utils.styleLoaders({
19
+      sourceMap: config.build.productionSourceMap,
20
+      extract: true,
21
+      usePostCSS: true
22
+    })
23
+  },
24
+  devtool: config.build.productionSourceMap ? config.build.devtool : false,
25
+  output: {
26
+    path: config.build.assetsRoot,
27
+    filename: utils.assetsPath('js/[name].[chunkhash].js'),
28
+    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
29
+  },
30
+  plugins: [
31
+    // http://vuejs.github.io/vue-loader/en/workflow/production.html
32
+    new webpack.DefinePlugin({
33
+      'process.env': env
34
+    }),
35
+    new UglifyJsPlugin({
36
+      uglifyOptions: {
37
+        compress: {
38
+          warnings: false
39
+        }
40
+      },
41
+      sourceMap: config.build.productionSourceMap,
42
+      parallel: true
43
+    }),
44
+    // extract css into its own file
45
+    new ExtractTextPlugin({
46
+      filename: utils.assetsPath('css/[name].[contenthash].css'),
47
+      // Setting the following option to `false` will not extract CSS from codesplit chunks.
48
+      // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
49
+      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 
50
+      // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
51
+      allChunks: true,
52
+    }),
53
+    // Compress extracted CSS. We are using this plugin so that possible
54
+    // duplicated CSS from different components can be deduped.
55
+    new OptimizeCSSPlugin({
56
+      cssProcessorOptions: config.build.productionSourceMap
57
+        ? { safe: true, map: { inline: false } }
58
+        : { safe: true }
59
+    }),
60
+    // generate dist index.html with correct asset hash for caching.
61
+    // you can customize output by editing /index.html
62
+    // see https://github.com/ampedandwired/html-webpack-plugin
63
+    new HtmlWebpackPlugin({
64
+      filename: config.build.index,
65
+      template: 'index.html',
66
+      inject: true,
67
+      minify: {
68
+        removeComments: true,
69
+        collapseWhitespace: true,
70
+        removeAttributeQuotes: true
71
+        // more options:
72
+        // https://github.com/kangax/html-minifier#options-quick-reference
73
+      },
74
+      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
75
+      chunksSortMode: 'dependency'
76
+    }),
77
+    // keep module.id stable when vendor modules does not change
78
+    new webpack.HashedModuleIdsPlugin(),
79
+    // enable scope hoisting
80
+    new webpack.optimize.ModuleConcatenationPlugin(),
81
+    // split vendor js into its own file
82
+    new webpack.optimize.CommonsChunkPlugin({
83
+      name: 'vendor',
84
+      minChunks (module) {
85
+        // any required modules inside node_modules are extracted to vendor
86
+        return (
87
+          module.resource &&
88
+          /\.js$/.test(module.resource) &&
89
+          module.resource.indexOf(
90
+            path.join(__dirname, '../node_modules')
91
+          ) === 0
92
+        )
93
+      }
94
+    }),
95
+    // extract webpack runtime and module manifest to its own file in order to
96
+    // prevent vendor hash from being updated whenever app bundle is updated
97
+    new webpack.optimize.CommonsChunkPlugin({
98
+      name: 'manifest',
99
+      minChunks: Infinity
100
+    }),
101
+    // This instance extracts shared chunks from code splitted chunks and bundles them
102
+    // in a separate chunk, similar to the vendor chunk
103
+    // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
104
+    new webpack.optimize.CommonsChunkPlugin({
105
+      name: 'app',
106
+      async: 'vendor-async',
107
+      children: true,
108
+      minChunks: 3
109
+    }),
110
+
111
+    // copy custom static assets
112
+    new CopyWebpackPlugin([
113
+      {
114
+        from: path.resolve(__dirname, '../static'),
115
+        to: config.build.assetsSubDirectory,
116
+        ignore: ['.*']
117
+      }
118
+    ])
119
+  ]
120
+})
121
+
122
+if (config.build.productionGzip) {
123
+  const CompressionWebpackPlugin = require('compression-webpack-plugin')
124
+
125
+  webpackConfig.plugins.push(
126
+    new CompressionWebpackPlugin({
127
+      asset: '[path].gz[query]',
128
+      algorithm: 'gzip',
129
+      test: new RegExp(
130
+        '\\.(' +
131
+        config.build.productionGzipExtensions.join('|') +
132
+        ')$'
133
+      ),
134
+      threshold: 10240,
135
+      minRatio: 0.8
136
+    })
137
+  )
138
+}
139
+
140
+if (config.build.bundleAnalyzerReport) {
141
+  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
142
+  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
143
+}
144
+
145
+module.exports = webpackConfig

+ 7
- 0
client/config/dev.env.js Zobrazit soubor

@@ -0,0 +1,7 @@
1
+'use strict'
2
+const merge = require('webpack-merge')
3
+const prodEnv = require('./prod.env')
4
+
5
+module.exports = merge(prodEnv, {
6
+  NODE_ENV: '"development"'
7
+})

+ 69
- 0
client/config/index.js Zobrazit soubor

@@ -0,0 +1,69 @@
1
+'use strict'
2
+// Template version: 1.3.1
3
+// see http://vuejs-templates.github.io/webpack for documentation.
4
+
5
+const path = require('path')
6
+
7
+module.exports = {
8
+  dev: {
9
+
10
+    // Paths
11
+    assetsSubDirectory: 'static',
12
+    assetsPublicPath: '/',
13
+    proxyTable: {},
14
+
15
+    // Various Dev Server settings
16
+    host: 'localhost', // can be overwritten by process.env.HOST
17
+    port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18
+    autoOpenBrowser: false,
19
+    errorOverlay: true,
20
+    notifyOnErrors: true,
21
+    poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22
+
23
+    
24
+    /**
25
+     * Source Maps
26
+     */
27
+
28
+    // https://webpack.js.org/configuration/devtool/#development
29
+    devtool: 'cheap-module-eval-source-map',
30
+
31
+    // If you have problems debugging vue-files in devtools,
32
+    // set this to false - it *may* help
33
+    // https://vue-loader.vuejs.org/en/options.html#cachebusting
34
+    cacheBusting: true,
35
+
36
+    cssSourceMap: true
37
+  },
38
+
39
+  build: {
40
+    // Template for index.html
41
+    index: path.resolve(__dirname, '../dist/index.html'),
42
+
43
+    // Paths
44
+    assetsRoot: path.resolve(__dirname, '../dist'),
45
+    assetsSubDirectory: 'static',
46
+    assetsPublicPath: '/',
47
+
48
+    /**
49
+     * Source Maps
50
+     */
51
+
52
+    productionSourceMap: true,
53
+    // https://webpack.js.org/configuration/devtool/#production
54
+    devtool: '#source-map',
55
+
56
+    // Gzip off by default as many popular static hosts such as
57
+    // Surge or Netlify already gzip all static assets for you.
58
+    // Before setting to `true`, make sure to:
59
+    // npm install --save-dev compression-webpack-plugin
60
+    productionGzip: false,
61
+    productionGzipExtensions: ['js', 'css'],
62
+
63
+    // Run the build command with an extra argument to
64
+    // View the bundle analyzer report after build finishes:
65
+    // `npm run build --report`
66
+    // Set to `true` or `false` to always turn it on or off
67
+    bundleAnalyzerReport: process.env.npm_config_report
68
+  }
69
+}

+ 4
- 0
client/config/prod.env.js Zobrazit soubor

@@ -0,0 +1,4 @@
1
+'use strict'
2
+module.exports = {
3
+  NODE_ENV: '"production"'
4
+}

+ 12
- 0
client/index.html Zobrazit soubor

@@ -0,0 +1,12 @@
1
+<!DOCTYPE html>
2
+<html>
3
+  <head>
4
+    <meta charset="utf-8">
5
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
6
+    <title>client</title>
7
+  </head>
8
+  <body>
9
+    <div id="app"></div>
10
+    <!-- built files will be auto injected -->
11
+  </body>
12
+</html>

+ 10622
- 0
client/package-lock.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 62
- 0
client/package.json Zobrazit soubor

@@ -0,0 +1,62 @@
1
+{
2
+  "name": "client",
3
+  "version": "1.0.0",
4
+  "description": "A Vue.js project",
5
+  "author": "Jared Norris <jtn.asm@comcast.net>",
6
+  "private": true,
7
+  "scripts": {
8
+    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9
+    "start": "npm run dev",
10
+    "build": "node build/build.js"
11
+  },
12
+  "dependencies": {
13
+    "vue": "^2.5.2",
14
+    "vue-router": "^3.0.1"
15
+  },
16
+  "devDependencies": {
17
+    "autoprefixer": "^7.1.2",
18
+    "babel-core": "^6.22.1",
19
+    "babel-helper-vue-jsx-merge-props": "^2.0.3",
20
+    "babel-loader": "^7.1.1",
21
+    "babel-plugin-syntax-jsx": "^6.18.0",
22
+    "babel-plugin-transform-runtime": "^6.22.0",
23
+    "babel-plugin-transform-vue-jsx": "^3.5.0",
24
+    "babel-preset-env": "^1.3.2",
25
+    "babel-preset-stage-2": "^6.22.0",
26
+    "chalk": "^2.0.1",
27
+    "copy-webpack-plugin": "^4.0.1",
28
+    "css-loader": "^0.28.0",
29
+    "extract-text-webpack-plugin": "^3.0.0",
30
+    "file-loader": "^1.1.4",
31
+    "friendly-errors-webpack-plugin": "^1.6.1",
32
+    "html-webpack-plugin": "^2.30.1",
33
+    "node-notifier": "^5.1.2",
34
+    "optimize-css-assets-webpack-plugin": "^3.2.0",
35
+    "ora": "^1.2.0",
36
+    "portfinder": "^1.0.13",
37
+    "postcss-import": "^11.0.0",
38
+    "postcss-loader": "^2.0.8",
39
+    "postcss-url": "^7.2.1",
40
+    "rimraf": "^2.6.0",
41
+    "semver": "^5.3.0",
42
+    "shelljs": "^0.7.6",
43
+    "uglifyjs-webpack-plugin": "^1.1.1",
44
+    "url-loader": "^0.5.8",
45
+    "vue-loader": "^13.3.0",
46
+    "vue-style-loader": "^3.0.1",
47
+    "vue-template-compiler": "^2.5.2",
48
+    "webpack": "^3.6.0",
49
+    "webpack-bundle-analyzer": "^2.9.0",
50
+    "webpack-dev-server": "^2.9.1",
51
+    "webpack-merge": "^4.1.0"
52
+  },
53
+  "engines": {
54
+    "node": ">= 6.0.0",
55
+    "npm": ">= 3.0.0"
56
+  },
57
+  "browserslist": [
58
+    "> 1%",
59
+    "last 2 versions",
60
+    "not ie <= 8"
61
+  ]
62
+}

+ 23
- 0
client/src/App.vue Zobrazit soubor

@@ -0,0 +1,23 @@
1
+<template>
2
+  <div id="app">
3
+    <img src="./assets/logo.png">
4
+    <router-view/>
5
+  </div>
6
+</template>
7
+
8
+<script>
9
+export default {
10
+  name: 'App'
11
+}
12
+</script>
13
+
14
+<style>
15
+#app {
16
+  font-family: 'Avenir', Helvetica, Arial, sans-serif;
17
+  -webkit-font-smoothing: antialiased;
18
+  -moz-osx-font-smoothing: grayscale;
19
+  text-align: center;
20
+  color: #2c3e50;
21
+  margin-top: 60px;
22
+}
23
+</style>

binární
client/src/assets/logo.png Zobrazit soubor


+ 113
- 0
client/src/components/HelloWorld.vue Zobrazit soubor

@@ -0,0 +1,113 @@
1
+<template>
2
+  <div class="hello">
3
+    <h1>{{ msg }}</h1>
4
+    <h2>Essential Links</h2>
5
+    <ul>
6
+      <li>
7
+        <a
8
+          href="https://vuejs.org"
9
+          target="_blank"
10
+        >
11
+          Core Docs
12
+        </a>
13
+      </li>
14
+      <li>
15
+        <a
16
+          href="https://forum.vuejs.org"
17
+          target="_blank"
18
+        >
19
+          Forum
20
+        </a>
21
+      </li>
22
+      <li>
23
+        <a
24
+          href="https://chat.vuejs.org"
25
+          target="_blank"
26
+        >
27
+          Community Chat
28
+        </a>
29
+      </li>
30
+      <li>
31
+        <a
32
+          href="https://twitter.com/vuejs"
33
+          target="_blank"
34
+        >
35
+          Twitter
36
+        </a>
37
+      </li>
38
+      <br>
39
+      <li>
40
+        <a
41
+          href="http://vuejs-templates.github.io/webpack/"
42
+          target="_blank"
43
+        >
44
+          Docs for This Template
45
+        </a>
46
+      </li>
47
+    </ul>
48
+    <h2>Ecosystem</h2>
49
+    <ul>
50
+      <li>
51
+        <a
52
+          href="http://router.vuejs.org/"
53
+          target="_blank"
54
+        >
55
+          vue-router
56
+        </a>
57
+      </li>
58
+      <li>
59
+        <a
60
+          href="http://vuex.vuejs.org/"
61
+          target="_blank"
62
+        >
63
+          vuex
64
+        </a>
65
+      </li>
66
+      <li>
67
+        <a
68
+          href="http://vue-loader.vuejs.org/"
69
+          target="_blank"
70
+        >
71
+          vue-loader
72
+        </a>
73
+      </li>
74
+      <li>
75
+        <a
76
+          href="https://github.com/vuejs/awesome-vue"
77
+          target="_blank"
78
+        >
79
+          awesome-vue
80
+        </a>
81
+      </li>
82
+    </ul>
83
+  </div>
84
+</template>
85
+
86
+<script>
87
+export default {
88
+  name: 'HelloWorld',
89
+  data () {
90
+    return {
91
+      msg: 'Welcome to Your Vue.js App'
92
+    }
93
+  }
94
+}
95
+</script>
96
+
97
+<!-- Add "scoped" attribute to limit CSS to this component only -->
98
+<style scoped>
99
+h1, h2 {
100
+  font-weight: normal;
101
+}
102
+ul {
103
+  list-style-type: none;
104
+  padding: 0;
105
+}
106
+li {
107
+  display: inline-block;
108
+  margin: 0 10px;
109
+}
110
+a {
111
+  color: #42b983;
112
+}
113
+</style>

+ 15
- 0
client/src/main.js Zobrazit soubor

@@ -0,0 +1,15 @@
1
+// The Vue build version to load with the `import` command
2
+// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
+import Vue from 'vue'
4
+import App from './App'
5
+import router from './router'
6
+
7
+Vue.config.productionTip = false
8
+
9
+/* eslint-disable no-new */
10
+new Vue({
11
+  el: '#app',
12
+  router,
13
+  components: { App },
14
+  template: '<App/>'
15
+})

+ 15
- 0
client/src/router/index.js Zobrazit soubor

@@ -0,0 +1,15 @@
1
+import Vue from 'vue'
2
+import Router from 'vue-router'
3
+import HelloWorld from '@/components/HelloWorld'
4
+
5
+Vue.use(Router)
6
+
7
+export default new Router({
8
+  routes: [
9
+    {
10
+      path: '/',
11
+      name: 'HelloWorld',
12
+      component: HelloWorld
13
+    }
14
+  ]
15
+})

+ 0
- 0
client/static/.gitkeep Zobrazit soubor


+ 225
- 0
mvnw Zobrazit soubor

@@ -0,0 +1,225 @@
1
+#!/bin/sh
2
+# ----------------------------------------------------------------------------
3
+# Licensed to the Apache Software Foundation (ASF) under one
4
+# or more contributor license agreements.  See the NOTICE file
5
+# distributed with this work for additional information
6
+# regarding copyright ownership.  The ASF licenses this file
7
+# to you under the Apache License, Version 2.0 (the
8
+# "License"); you may not use this file except in compliance
9
+# with the License.  You may obtain a copy of the License at
10
+#
11
+#    http://www.apache.org/licenses/LICENSE-2.0
12
+#
13
+# Unless required by applicable law or agreed to in writing,
14
+# software distributed under the License is distributed on an
15
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+# KIND, either express or implied.  See the License for the
17
+# specific language governing permissions and limitations
18
+# under the License.
19
+# ----------------------------------------------------------------------------
20
+
21
+# ----------------------------------------------------------------------------
22
+# Maven2 Start Up Batch script
23
+#
24
+# Required ENV vars:
25
+# ------------------
26
+#   JAVA_HOME - location of a JDK home dir
27
+#
28
+# Optional ENV vars
29
+# -----------------
30
+#   M2_HOME - location of maven2's installed home dir
31
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
+#     e.g. to debug Maven itself, use
33
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
+# ----------------------------------------------------------------------------
36
+
37
+if [ -z "$MAVEN_SKIP_RC" ] ; then
38
+
39
+  if [ -f /etc/mavenrc ] ; then
40
+    . /etc/mavenrc
41
+  fi
42
+
43
+  if [ -f "$HOME/.mavenrc" ] ; then
44
+    . "$HOME/.mavenrc"
45
+  fi
46
+
47
+fi
48
+
49
+# OS specific support.  $var _must_ be set to either true or false.
50
+cygwin=false;
51
+darwin=false;
52
+mingw=false
53
+case "`uname`" in
54
+  CYGWIN*) cygwin=true ;;
55
+  MINGW*) mingw=true;;
56
+  Darwin*) darwin=true
57
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
58
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
59
+    if [ -z "$JAVA_HOME" ]; then
60
+      if [ -x "/usr/libexec/java_home" ]; then
61
+        export JAVA_HOME="`/usr/libexec/java_home`"
62
+      else
63
+        export JAVA_HOME="/Library/Java/Home"
64
+      fi
65
+    fi
66
+    ;;
67
+esac
68
+
69
+if [ -z "$JAVA_HOME" ] ; then
70
+  if [ -r /etc/gentoo-release ] ; then
71
+    JAVA_HOME=`java-config --jre-home`
72
+  fi
73
+fi
74
+
75
+if [ -z "$M2_HOME" ] ; then
76
+  ## resolve links - $0 may be a link to maven's home
77
+  PRG="$0"
78
+
79
+  # need this for relative symlinks
80
+  while [ -h "$PRG" ] ; do
81
+    ls=`ls -ld "$PRG"`
82
+    link=`expr "$ls" : '.*-> \(.*\)$'`
83
+    if expr "$link" : '/.*' > /dev/null; then
84
+      PRG="$link"
85
+    else
86
+      PRG="`dirname "$PRG"`/$link"
87
+    fi
88
+  done
89
+
90
+  saveddir=`pwd`
91
+
92
+  M2_HOME=`dirname "$PRG"`/..
93
+
94
+  # make it fully qualified
95
+  M2_HOME=`cd "$M2_HOME" && pwd`
96
+
97
+  cd "$saveddir"
98
+  # echo Using m2 at $M2_HOME
99
+fi
100
+
101
+# For Cygwin, ensure paths are in UNIX format before anything is touched
102
+if $cygwin ; then
103
+  [ -n "$M2_HOME" ] &&
104
+    M2_HOME=`cygpath --unix "$M2_HOME"`
105
+  [ -n "$JAVA_HOME" ] &&
106
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
107
+  [ -n "$CLASSPATH" ] &&
108
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
109
+fi
110
+
111
+# For Migwn, ensure paths are in UNIX format before anything is touched
112
+if $mingw ; then
113
+  [ -n "$M2_HOME" ] &&
114
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
115
+  [ -n "$JAVA_HOME" ] &&
116
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
117
+  # TODO classpath?
118
+fi
119
+
120
+if [ -z "$JAVA_HOME" ]; then
121
+  javaExecutable="`which javac`"
122
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
123
+    # readlink(1) is not available as standard on Solaris 10.
124
+    readLink=`which readlink`
125
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
126
+      if $darwin ; then
127
+        javaHome="`dirname \"$javaExecutable\"`"
128
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
129
+      else
130
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
131
+      fi
132
+      javaHome="`dirname \"$javaExecutable\"`"
133
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
134
+      JAVA_HOME="$javaHome"
135
+      export JAVA_HOME
136
+    fi
137
+  fi
138
+fi
139
+
140
+if [ -z "$JAVACMD" ] ; then
141
+  if [ -n "$JAVA_HOME"  ] ; then
142
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
143
+      # IBM's JDK on AIX uses strange locations for the executables
144
+      JAVACMD="$JAVA_HOME/jre/sh/java"
145
+    else
146
+      JAVACMD="$JAVA_HOME/bin/java"
147
+    fi
148
+  else
149
+    JAVACMD="`which java`"
150
+  fi
151
+fi
152
+
153
+if [ ! -x "$JAVACMD" ] ; then
154
+  echo "Error: JAVA_HOME is not defined correctly." >&2
155
+  echo "  We cannot execute $JAVACMD" >&2
156
+  exit 1
157
+fi
158
+
159
+if [ -z "$JAVA_HOME" ] ; then
160
+  echo "Warning: JAVA_HOME environment variable is not set."
161
+fi
162
+
163
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
164
+
165
+# traverses directory structure from process work directory to filesystem root
166
+# first directory with .mvn subdirectory is considered project base directory
167
+find_maven_basedir() {
168
+
169
+  if [ -z "$1" ]
170
+  then
171
+    echo "Path not specified to find_maven_basedir"
172
+    return 1
173
+  fi
174
+
175
+  basedir="$1"
176
+  wdir="$1"
177
+  while [ "$wdir" != '/' ] ; do
178
+    if [ -d "$wdir"/.mvn ] ; then
179
+      basedir=$wdir
180
+      break
181
+    fi
182
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
183
+    if [ -d "${wdir}" ]; then
184
+      wdir=`cd "$wdir/.."; pwd`
185
+    fi
186
+    # end of workaround
187
+  done
188
+  echo "${basedir}"
189
+}
190
+
191
+# concatenates all lines of a file
192
+concat_lines() {
193
+  if [ -f "$1" ]; then
194
+    echo "$(tr -s '\n' ' ' < "$1")"
195
+  fi
196
+}
197
+
198
+BASE_DIR=`find_maven_basedir "$(pwd)"`
199
+if [ -z "$BASE_DIR" ]; then
200
+  exit 1;
201
+fi
202
+
203
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
204
+echo $MAVEN_PROJECTBASEDIR
205
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
206
+
207
+# For Cygwin, switch paths to Windows format before running java
208
+if $cygwin; then
209
+  [ -n "$M2_HOME" ] &&
210
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
211
+  [ -n "$JAVA_HOME" ] &&
212
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
213
+  [ -n "$CLASSPATH" ] &&
214
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
215
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
216
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
217
+fi
218
+
219
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
220
+
221
+exec "$JAVACMD" \
222
+  $MAVEN_OPTS \
223
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
224
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
225
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 143
- 0
mvnw.cmd Zobrazit soubor

@@ -0,0 +1,143 @@
1
+@REM ----------------------------------------------------------------------------
2
+@REM Licensed to the Apache Software Foundation (ASF) under one
3
+@REM or more contributor license agreements.  See the NOTICE file
4
+@REM distributed with this work for additional information
5
+@REM regarding copyright ownership.  The ASF licenses this file
6
+@REM to you under the Apache License, Version 2.0 (the
7
+@REM "License"); you may not use this file except in compliance
8
+@REM with the License.  You may obtain a copy of the License at
9
+@REM
10
+@REM    http://www.apache.org/licenses/LICENSE-2.0
11
+@REM
12
+@REM Unless required by applicable law or agreed to in writing,
13
+@REM software distributed under the License is distributed on an
14
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+@REM KIND, either express or implied.  See the License for the
16
+@REM specific language governing permissions and limitations
17
+@REM under the License.
18
+@REM ----------------------------------------------------------------------------
19
+
20
+@REM ----------------------------------------------------------------------------
21
+@REM Maven2 Start Up Batch script
22
+@REM
23
+@REM Required ENV vars:
24
+@REM JAVA_HOME - location of a JDK home dir
25
+@REM
26
+@REM Optional ENV vars
27
+@REM M2_HOME - location of maven2's installed home dir
28
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
+@REM     e.g. to debug Maven itself, use
32
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34
+@REM ----------------------------------------------------------------------------
35
+
36
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37
+@echo off
38
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
39
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
40
+
41
+@REM set %HOME% to equivalent of $HOME
42
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
43
+
44
+@REM Execute a user defined script before this one
45
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
46
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
47
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
49
+:skipRcPre
50
+
51
+@setlocal
52
+
53
+set ERROR_CODE=0
54
+
55
+@REM To isolate internal variables from possible post scripts, we use another setlocal
56
+@setlocal
57
+
58
+@REM ==== START VALIDATION ====
59
+if not "%JAVA_HOME%" == "" goto OkJHome
60
+
61
+echo.
62
+echo Error: JAVA_HOME not found in your environment. >&2
63
+echo Please set the JAVA_HOME variable in your environment to match the >&2
64
+echo location of your Java installation. >&2
65
+echo.
66
+goto error
67
+
68
+:OkJHome
69
+if exist "%JAVA_HOME%\bin\java.exe" goto init
70
+
71
+echo.
72
+echo Error: JAVA_HOME is set to an invalid directory. >&2
73
+echo JAVA_HOME = "%JAVA_HOME%" >&2
74
+echo Please set the JAVA_HOME variable in your environment to match the >&2
75
+echo location of your Java installation. >&2
76
+echo.
77
+goto error
78
+
79
+@REM ==== END VALIDATION ====
80
+
81
+:init
82
+
83
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
84
+@REM Fallback to current working directory if not found.
85
+
86
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
87
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
88
+
89
+set EXEC_DIR=%CD%
90
+set WDIR=%EXEC_DIR%
91
+:findBaseDir
92
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
93
+cd ..
94
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
95
+set WDIR=%CD%
96
+goto findBaseDir
97
+
98
+:baseDirFound
99
+set MAVEN_PROJECTBASEDIR=%WDIR%
100
+cd "%EXEC_DIR%"
101
+goto endDetectBaseDir
102
+
103
+:baseDirNotFound
104
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
105
+cd "%EXEC_DIR%"
106
+
107
+:endDetectBaseDir
108
+
109
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
110
+
111
+@setlocal EnableExtensions EnableDelayedExpansion
112
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
113
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
114
+
115
+:endReadAdditionalConfig
116
+
117
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
118
+
119
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
120
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
121
+
122
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
123
+if ERRORLEVEL 1 goto error
124
+goto end
125
+
126
+:error
127
+set ERROR_CODE=1
128
+
129
+:end
130
+@endlocal & set ERROR_CODE=%ERROR_CODE%
131
+
132
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
133
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
134
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
135
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
136
+:skipRcPost
137
+
138
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
139
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
140
+
141
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
142
+
143
+exit /B %ERROR_CODE%

+ 62
- 13
pom.xml Zobrazit soubor

@@ -1,22 +1,71 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
-         xmlns="http://maven.apache.org/POM/4.0.0"
2
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 3
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5 4
     <modelVersion>4.0.0</modelVersion>
6 5
 
7
-    <groupId>com.zipcoder.ZipChat</groupId>
8
-    <artifactId>YouAreEll</artifactId>
9
-    <packaging>pom</packaging>
10
-    <version>1.0-SNAPSHOT</version>
11
-    <modules>
12
-        <module>Client</module>
13
-    </modules>
6
+    <groupId>com.JARD</groupId>
7
+    <artifactId>you-are-ell</artifactId>
8
+    <version>0.0.1-SNAPSHOT</version>
9
+    <packaging>jar</packaging>
10
+
11
+    <name>you-are-ell</name>
12
+    <description>Demo project for Spring Boot</description>
13
+
14
+    <parent>
15
+        <groupId>org.springframework.boot</groupId>
16
+        <artifactId>spring-boot-starter-parent</artifactId>
17
+        <version>2.0.3.RELEASE</version>
18
+        <relativePath/> <!-- lookup parent from repository -->
19
+    </parent>
20
+
21
+    <properties>
22
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24
+        <java.version>1.8</java.version>
25
+    </properties>
14 26
 
15 27
     <dependencies>
16 28
         <dependency>
17
-            <groupId>com.fasterxml.jackson.core</groupId>
18
-            <artifactId>jackson-databind</artifactId>
19
-            <version>2.8.6</version>
29
+            <groupId>org.springframework.boot</groupId>
30
+            <artifactId>spring-boot-starter-web</artifactId>
31
+        </dependency>
32
+
33
+        <dependency>
34
+            <groupId>org.springframework.boot</groupId>
35
+            <artifactId>spring-boot-starter-test</artifactId>
36
+            <scope>test</scope>
37
+        </dependency>
38
+        <!-- https://mvnrepository.com/artifact/org.springframework/spring-orm -->
39
+        <dependency>
40
+            <groupId>org.springframework</groupId>
41
+            <artifactId>spring-orm</artifactId>
42
+            <version>5.0.7.RELEASE</version>
43
+        </dependency>
44
+        <!-- https://mvnrepository.com/artifact/org.springframework/spring-hibernate -->
45
+        <dependency>
46
+            <groupId>org.springframework</groupId>
47
+            <artifactId>spring-hibernate</artifactId>
48
+            <version>1.2.9</version>
49
+        </dependency>
50
+        <dependency>
51
+            <groupId>org.springframework.boot</groupId>
52
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
53
+        </dependency>
54
+        <dependency>
55
+            <groupId>org.apache.commons</groupId>
56
+            <artifactId>commons-dbcp2</artifactId>
57
+            <version>2.4.0</version>
20 58
         </dependency>
21 59
     </dependencies>
22
-</project>
60
+
61
+    <build>
62
+        <plugins>
63
+            <plugin>
64
+                <groupId>org.springframework.boot</groupId>
65
+                <artifactId>spring-boot-maven-plugin</artifactId>
66
+            </plugin>
67
+        </plugins>
68
+    </build>
69
+
70
+
71
+</project>

+ 0
- 0
src/main/resources/application.properties Zobrazit soubor


+ 16
- 0
src/test/java/com/jard/youareell/YouAreEllApplicationTests.java Zobrazit soubor

@@ -0,0 +1,16 @@
1
+package com.jard.youareell;
2
+
3
+import org.junit.Test;
4
+import org.junit.runner.RunWith;
5
+import org.springframework.boot.test.context.SpringBootTest;
6
+import org.springframework.test.context.junit4.SpringRunner;
7
+
8
+@RunWith(SpringRunner.class)
9
+@SpringBootTest
10
+public class YouAreEllApplicationTests {
11
+
12
+    @Test
13
+    public void contextLoads() {
14
+    }
15
+
16
+}