Skip to content

Commit 7f1c290

Browse files
committed
moved stuff around
1 parent 20eada0 commit 7f1c290

File tree

154 files changed

+1934
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+1934
-17
lines changed

CONTRIBUTING.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Guide to contributing
2+
3+
Please read this if you intend to contribute to the project.
4+
5+
## First things
6+
7+
* Get a github account if you don't have one already
8+
* Submit a github issue if there isn't one already.
9+
* Clearly describe the bug or feature
10+
* Provide exact reproducable steps to reproduce the issue if its a bug
11+
* Include the versions of all components
12+
* Fork the repository on github
13+
14+
## Making your changes
15+
16+
* Create a new branch for your changes
17+
* Make your changes
18+
* Make sure you include tests
19+
* Make sure the test suite passes after your changes
20+
* Commit your changes into that branch
21+
* Use descriptive and meaningful commit messages
22+
* If you have a lot of commits squash them into a single commit
23+
* Push your changes to your branch in your forked repository
24+
25+
## Submitting the changes
26+
27+
Before submitting your pull request you must sign the [Eclipse Foundation Contributor License Agreement](http://www.eclipse.org/legal/CLA.php).
28+
29+
We will NOT ACCEPT any contributions without this first being signed.
30+
31+
To sign the Eclipse CLA you need to:
32+
33+
* Obtain an Eclipse Foundation userid. Anyone who currently uses Eclipse Bugzilla or Gerrit systems already has one of those.
34+
If you don’t, you need to [register](https://dev.eclipse.org/site_login/createaccount.php).
35+
36+
* Login into the [projects portal](https://projects.eclipse.org/), select “My Account”, and then the “Contributor License Agreement” tab.
37+
38+
## After submitting
39+
40+
* Once you have signed the Eclipse CLA, make a note on the github issue that you have signed the CLA, and then you can submit a pull request via github.
41+
* Do not use your branch for any other development, otherwise further changes that you make will be visible in the PR.
42+
43+
44+

LICENSE.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
vert.x is licensed under the Apache License, Version 2.0 (the "License");
2+
you may not use this file except in compliance with the License.
3+
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0

README.md

+7-17
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
1-
# Vertx.io (Vert.x) Couchbase
2-
### Message Bus SDK/Wrapper
1+
# Vert.x Gradle Template
32

4-
Message Bus based style of working with Couchbase Server with command message, callbacks and futures depending on operation type/style.
5-
You can instantiate multiple mods of course, and mix the styles (sync/async) depending on what you are trying to achieve.
3+
Template project for creating a Vert.x module with a Gradle build.
64

7-
The `CouchbaseCommandPacketSync` and `CouchbaseCommandPacketAsync` classes describe the message formats for couchbase commands.
5+
Clone this and adapt it to easily develop Vert.x modules using Gradle as your build tool.
86

9-
Two different mods for different styles of operations:
7+
By default this module contains a simple Java verticle which listens on the event bus and responds to `ping!`
8+
messages with `pong!`.
109

11-
`com.scalabl3.vertxmods.couchbase.async`
10+
This template also shows you how to write tests in Java, Groovy, Ruby and Python
1211

13-
`com.scalabl3.vertxmods.couchbase.sync`
14-
15-
I worked on this last in June 2013 and got a lot of it working, but need to refresh it all and see where it was left off.
16-
17-
TODO
18-
---
19-
* Needs updating to gradle style project
20-
* Was created for older vert.x release (2.0.0)
21-
* Full test coverage not there yet
22-
* Needs to be updated to latest Couchbase Java SDK
12+
See the [build script](build.gradle) for the list of useful tasks

build.gradle

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
apply from: "gradle/vertx.gradle"
2+
3+
/*
4+
Usage:
5+
6+
./gradlew task_name
7+
8+
(or gradlew.bat task_name if you have the misfortune to have to use Windows)
9+
10+
If no task name is specified then the default task 'assemble' is run
11+
12+
Task names are:
13+
14+
idea - generate a skeleton IntelliJ IDEA project
15+
16+
eclipse - generate a skeleton Eclipse IDE project
17+
18+
assemble - builds the outputs, by default this is the module zip file. It can also include a jar file if produceJar
19+
in gradle.properties is set to true. Outputs are created in build/libs.
20+
if pullInDeps in gradle.properties is set to 'true' then the modules dependencies will be
21+
automatically pulled into a nested mods directory inside the module during the build
22+
23+
copyMod - builds and copies the module to the local 'mods' directory so you can execute vertx runmod (etc)
24+
directly from the command line
25+
26+
modZip - creates the module zip into build/libs
27+
28+
clean - cleans everything up
29+
30+
test - runs the tests. An nice html test report is created in build/reports/tests (index.html)
31+
32+
runMod - runs the module. This is similar to executing vertx runmod from the command line except that it does
33+
not use the version of Vert.x installed and on the PATH to run it. Instead it uses the version of Vert.x
34+
that the module was compiled and tested against.
35+
36+
pullInDeps - pulls in all dependencies of the module into a nested module directory
37+
38+
uploadArchives - upload the module zip file (and jar if one has been created) to Nexus. You will need to
39+
configure sonatypeUsername and sonatypePassword in ~/.gradle/gradle.properties.
40+
41+
install - install any jars produced to the local Maven repository (.m2)
42+
43+
*/
44+
45+
dependencies {
46+
/*
47+
Add your module jar dependencies here
48+
E.g.
49+
compile "com.foo:foo-lib:1.0.1" - for compile time deps - this will end up in your module too!
50+
testCompile "com.foo:foo-lib:1.0.1" - for test time deps
51+
provided "com.foo:foo-lib:1.0.1" - if you DON'T want it to be packaged in the module zip
52+
*/
53+
54+
// If you're creating Groovy compiled verticles you may need the following dependencies
55+
provided "org.codehaus.groovy:groovy-all:$groovyVersion"
56+
provided "io.vertx:lang-groovy:$groovyLangModVersion@jar"
57+
58+
}
59+
60+
test {
61+
/* Configure which tests are included
62+
include 'org/foo/**'
63+
exclude 'org/boo/**'
64+
*/
65+
66+
}
67+
68+
/*
69+
If you're uploading stuff to Maven, Gradle needs to generate a POM.
70+
Please edit the details below.
71+
*/
72+
def configurePom(def pom) {
73+
pom.project {
74+
name rootProject.name
75+
description 'Description of your module here'
76+
inceptionYear '2013'
77+
packaging 'jar'
78+
79+
url 'Your project url'
80+
81+
developers {
82+
developer {
83+
id 'developer id (e.g. github username)'
84+
name 'developer name'
85+
email 'developer email'
86+
}
87+
}
88+
89+
scm {
90+
url 'url to your repo - e.g. github repo url'
91+
}
92+
93+
licenses {
94+
license {
95+
name 'The name of the license used, e.g.: The Apache Software License, Version 2.0'
96+
url 'URl to the license, e.g.: http://www.apache.org/licenses/LICENSE-2.0.txt'
97+
distribution 'repo'
98+
}
99+
}
100+
101+
properties {
102+
setProperty('project.build.sourceEncoding', 'UTF8')
103+
}
104+
}
105+
}

conf.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Example JSON config file
2+
3+
{
4+
"foo": "bar"
5+
}

gradle.properties

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# E.g. your domain name
2+
modowner=com.mycompany
3+
4+
# Your module name
5+
modname=my-module
6+
7+
# Your module version
8+
version=1.0.0-final
9+
10+
# The test timeout in seconds
11+
testtimeout=300
12+
13+
# Set to true if you want module dependencies to be pulled in and nested inside the module itself
14+
pullInDeps=true
15+
16+
# Set to true if you want to build a fat executable jar containing everything needed to run the module
17+
createFatJar=true
18+
19+
# The version of Groovy language to compile against (if you are using Groovy compiled verticles or VertxTests)
20+
groovyLangModVersion=2.0.0-final
21+
22+
# The version of Groovy to use (if you are using Groovy)
23+
groovyVersion=2.1.5
24+
25+
# Gradle version
26+
gradleVersion=1.10
27+
28+
# The version of Vert.x
29+
vertxVersion=2.1RC2
30+
31+
# The version of Vert.x test tools
32+
toolsVersion=2.0.3-final
33+
34+
# The version of JUnit
35+
junitVersion=4.10
36+
37+
# Command line arguments to use when running any of the variations of ./gradlew runMod
38+
# These are the exact same command line args that you would pass to 'vertx runmod <module-name>' on the command line
39+
runModArgs=-conf conf.json
40+
41+
# e.g.
42+
# runModArgs=-conf foo.json
43+
# runModArgs=-conf someconf.json -ha
44+
# runModArgs=-cluster

gradle/maven.gradle

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright 2012 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
apply plugin: 'maven'
18+
apply plugin: 'signing'
19+
20+
if (!hasProperty('sonatypeUsername')) {
21+
ext.sonatypeUsername = ''
22+
}
23+
if (!hasProperty('sonatypePassword')) {
24+
ext.sonatypePassword = ''
25+
}
26+
27+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28+
// maven task configuration
29+
30+
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
31+
32+
signing {
33+
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
34+
sign configurations.archives
35+
}
36+
37+
uploadArchives {
38+
group 'build'
39+
description = "Does a maven deploy of archives artifacts"
40+
41+
repositories {
42+
mavenDeployer {
43+
// setUniqueVersion(false)
44+
45+
configuration = configurations.archives
46+
47+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
48+
authentication(userName: sonatypeUsername, password: sonatypePassword)
49+
}
50+
51+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
52+
authentication(userName: sonatypeUsername, password: sonatypePassword)
53+
}
54+
55+
if (isReleaseVersion) {
56+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
57+
}
58+
59+
configurePom(pom)
60+
}
61+
}
62+
}
63+
64+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65+
// configuration methods
66+
67+
68+

gradle/setup.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
task wrapper(type: Wrapper, description: "Create a Gradle self-download wrapper") {
3+
group = 'Project Setup'
4+
gradleVersion = rootProject.gradleVersion
5+
}

0 commit comments

Comments
 (0)