https://github.com/j5ik2o/sbt-aws-plugin
$ sbt clean scriptedするとなぜか sbt.IncompatiblePluginsExceptionになる
[info] Getting org.scala-sbt sbt 0.13.8 ...
| "aws" : { | |
| "cfnStackName": "test1" | |
| "cfnStackParams" : { | |
| "S3BucketName0" : "dmmy-test-00001", | |
| "S3BucketName1" : "dmmy-test-00002" | |
| } | |
| } |
| $ sbt aws::cfnStackCreateOrUpdateAndWait | |
| [info] upload /Users/j5ik2o/sbt-aws/sbt-aws-cfn/src/sbt-test/sbt-aws-cfn/create-or-update-and-wait/aws/cfn/templates/S3.template to cfn-template/create-or-update-and-wait/create-or-update-and-wait-0.1-SNAPSHOT-20150525_185939.templete | |
| [info] create stack request : stackName = test1, templateUrl = https://cfn-template.s3-ap-northeast-1.amazonaws.com/create-or-update-and-wait/create-or-update-and-wait-0.1-SNAPSHOT-20150525_185939.templete, capabilities = List(), stackParams = Map(S3BucketName1 -> dmmy-test-00002, S3BucketName0 -> dmmy-test-00001), tags = Map() | |
| {StackId: arn:aws:cloudformation:ap-northeast-1:327747897717:stack/test1/c1fdf600-02c4-11e5-a322-506cf9a1c096} | |
| [info] create stack requested : test1 / arn:aws:cloudformation:ap-northeast-1:327747897717:stack/test1/c1fdf600-02c4-11e5-a322-506cf9a1c096 | |
| [info] status = CREATE_IN_PROGRESS | |
| [info] status = CREATE_IN_PROGRESS | |
| [info] status = CREATE_IN_PROGRESS | |
| [info] status = CREATE_IN_PROGRESS | |
| [info] status = CREATE_IN_P |
| $ sbt aws::ebBuildBundle | |
| [info] Updating {file:/Users/j5ik2o/sbt-aws/sbt-aws-eb/src/sbt-test/sbt-aws-eb/build-bundle/}build-bundle... | |
| [info] Resolving org.fusesource.jansi#jansi;1.4 ... | |
| [info] Done updating. | |
| [info] Compiling 1 Scala source to /Users/j5ik2o/sbt-aws/sbt-aws-eb/src/sbt-test/sbt-aws-eb/build-bundle/target/scala-2.10/classes... | |
| [info] Packaging /Users/j5ik2o/sbt-aws/sbt-aws-eb/src/sbt-test/sbt-aws-eb/build-bundle/target/scala-2.10/build-bundle_2.10-0.1-SNAPSHOT.jar ... | |
| [info] Done packaging. | |
| [info] created application-bundle: /Users/j5ik2o/sbt-aws/sbt-aws-eb/src/sbt-test/sbt-aws-eb/build-bundle/target/build-bundle-bundle.zip |
| ebBundleTargetFiles in aws <<= Def.task { | |
| val base = baseDirectory.value | |
| val packageJarFile = (packageBin in Compile).value | |
| Seq( | |
| (base / "Dockerfile", "Dockerfile"), | |
| (base / "Dockerrun.aws.json", "Dockerrun.aws.json"), | |
| (packageJarFile, packageJarFile.name) | |
| ) | |
| } |
https://github.com/j5ik2o/sbt-aws-plugin
$ sbt clean scriptedするとなぜか sbt.IncompatiblePluginsExceptionになる
[info] Getting org.scala-sbt sbt 0.13.8 ...
| import scala.collection.immutable.NumericRange | |
| sealed trait Node[+A] { | |
| val value: A | |
| val size: Int | |
| val sum: A | |
| val avg: A | |
| val max: A |
| trait Entity[ID] { | |
| val id: ID | |
| // equals, hashCodeはコレクションに入れた時に検索しやすくするために定義している | |
| override def equals(obj: Any): Boolean = obj match { | |
| case that: Entity[_] => id == that.id | |
| case _ => false | |
| } | |
| override def hashCode: Int = 31 * id.hasCode | |
| package scala_sample | |
| import org.apache.commons.lang3.StringUtils | |
| object JavaApiSample extends App { | |
| { | |
| println(StringUtils.capitalize("personName")) | |
| // Scalaのみで可能。こっちのがシンプル |
| package org.example | |
| import scala.io.Source | |
| object Hello extends App { | |
| def find_(keyword: String, root: java.io.File): Seq[java.io.File] = { | |
| import sys.process._ | |
| (s"grep -l -r -s -I '$keyword' $root" lines_!) map { | |
| new java.io.File(_) | |
| } |
{ // ルームの作成
val room = Room(
id = idWorker.createId,
title = "[PJ] Falcon",
description = Some("開発プロジェクト"),
roomType = RoomType.Group
)
val result: Try[Room] = RoomRepository.store(room)
}