Skip to content

Commit

Permalink
Merge pull request #2 from objectiser/setup
Browse files Browse the repository at this point in the history
Initial project setup
  • Loading branch information
objectiser authored Jun 18, 2017
2 parents 069055d + b4f0a1a commit 539d5d5
Show file tree
Hide file tree
Showing 14 changed files with 910 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Build / maven artifacts
*.class
target/
pom.xml.versionsBackup

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# IntelliJ project files
.idea/
*.iml

# Eclipse
.project
.classpath
.settings

Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
43 changes: 43 additions & 0 deletions .settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2017 The OpenTracing Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and limitations under
the License.
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>sonatype</id>
<username>${env.SONATYPE_USER}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
<server>
<id>bintray</id>
<username>${env.BINTRAY_USER}</username>
<password>${env.BINTRAY_KEY}</password>
</server>
<server>
<id>jfrog-snapshots</id>
<username>${env.BINTRAY_USER}</username>
<password>${env.BINTRAY_KEY}</password>
</server>
<server>
<id>github.com</id>
<username>${env.GH_USER}</username>
<password>${env.GH_TOKEN}</password>
</server>
</servers>
</settings>
43 changes: 43 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
sudo: required
dist: trusty

language: java
jdk:
- oraclejdk8

cache:
directories:
- $HOME/.m2/repository

before_install:
# allocate commits to CI, not the owner of the deploy key
- git config user.name "opentracingci"
- git config user.email "[email protected]"

# setup https authentication credentials, used by ./mvnw release:prepare
- git config credential.helper "store --file=.git/credentials"
- echo "https://$GH_TOKEN:@github.com" > .git/credentials

install:
# Override default travis to use the maven wrapper
- ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V

script:
- ./travis/publish.sh

branches:
except:
- /^[0-9]/

env:
global:
# Ex. travis encrypt -r org/repo GH_TOKEN=XXX-https://github.com/settings/tokens-XXX
- secure: "Ou7BCMOXuitko2VkLRHSh56ucuRF7pv7HQot9pwySp8rLYneME4yqcVEVv/1+eu/LSGkQJ+eO3EL8hFPn3Nk6VRfdGCtz/3UFyzJqTZOZdg2Aw7RibiDb81jPvdD9XOhQx2qQYwoxWbeKgkGJsbHbq7j39b0t61X+hp7BmW0e94O7y8velCTskT7JRxBvJiy/DnEQ+GCHGN0nzEhclyGthvz8mll2lwZ3tRd+EblERLgQNvhUa4r+r4lgvmtgly4UibMVe6fyZLyvK5SHoeUFHn+aSFXNl7a6czxCf5Ed1n6bYpHYcBH/7jbS02BdYCZNgKlEVJ5XeJOExQmxk20HaFnV++H0h7u/wuYIOJEOdh2ZyvXJs9JjgLKhSJpocNyeoAWBw+Dhr8szr/8BQUSaO6WeR5jzQyvXF7JA4veLShrjwK81F7Wg+OaPlU6v8MX4pG3ktsEbFRCVV1cVU5FceJepufA3QcBI7yw0w/UOiiftdEIo91hYbAHdq9ZSJZehF76zEJbqV/jCivIWPkUCEnq9NQ/v5RhSY8wmgQ+N1Oz9tbShfIRbC4BOpD7w8jWN9+hr1jrfLK4a62ayujEU3eP/Jnga/nGCEKkbNAGsQZogtn7s+fsiE2x66jNjlfbzjlPsg/o3g39kz+AtCSkQykfIyJM5Q4+jpUAglvwUgA="
# Ex. travis encrypt -r org/repo SONATYPE_USER=your_sonatype_account
- secure: "n1NdUm2haaFukpR3188URxAcfUuo08gQFyzPdZ7RlmFlJldi77nxmv3sNprphgj2rP/kcpdSHEsnxZqgfB34jLvv3PKwsO+auLn8biXPZN6DjBAlkT3mkNIdSNvs9rub2/E5u8EmCSUe4oseHHVflfaTzESHabX1rhMRQAGuLQE2cfDZp5JXnEdAUmZl6RyGGXazQvY36dx+kfEQaJJWqS2bZC03cwkjh/k/pGVpplrirD4LuidF/q+v0YlCI1XMWZYiYrkU7Cphhs46tq4n+2cCKS6Ymmj1Ck7WOk9x17KfHO2/DnwqaxjBTqIqJm7m7ObK5Cng8W13XKlbYGfsePBui9mgW6iJK4ClFtFrNqeys187qMU2ejT09PXcUEeGU6JL0TBUKGEiWJTAYG8fF5K6gJTyDM3jJBZfaR+Sl13DkHHUn7qxFLVbCaLWDUeRjsLiq05ipDhqSX9j+jat647SY9kU8sXugGxC20045uvv5TregpFa1xm4izBK1gB4a0TuFCAkqQX8L6u+PplD4mACVhY8tUeOkmdcSwuGsguL7zOZnbXQWdTTHanoJn9BsdVd21oZkE/TwfYshjH7UfASGd595SU+PXSS6BFwCnoD42w+X8ljfSGzf80LWY1XmTCrEXf3bcOVx+mef76SQJT/bm+zZ0FJ5AToY+xihms="
# Ex. travis encrypt -r org/repo SONATYPE_PASSWORD=your_sonatype_password
- secure: "haWMaoQ5Q43xCdSTj3o0r6urglrEU/Xj9cw6eV7DhMPBHFXt1mJqxYoVgObYf/s/agjwHghaZIekq/aTtPXZjMvW+FSHu2J9ktNhAMJ3u0ZBlUO/tUCpmTyIP+ODok3N6521oP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c/GNp7NQ5IAlmQgxJcuFMGO4vu/LRdtxXj6Uur3fd4Hfvr5kYRGogClKod9AOBWTpGebjI39y6PmPZmLb4XAsR9NGvFIBfo8TJLN58AKp3Ugie9zriWN1ebtkPhaZSCsVmQSgHMKWdaWJz7ZVXIXpuYsoWDu9Ir+w3+547KUk/ZkA1HSdGHt+fdlOJ6ic6c61fTDjCJCsHEjFoo="
# Ex. travis encrypt -r org/repo BINTRAY_KEY=xxx-https://bintray.com/profile/edit-xxx
- secure: "oOLl7a3a0ofBLr4Rm1Y/+n5B49S8R4oBywIYZZiDUZj+aluZnOY70TuXeMgvSyl/7rlwkpIe+kOR13kNsJtPgLA2GY0+bfiE3XVqk9gdXSqGfPRoaTbyLCg/09xg9PDKGOQdHvBI8mHMVLmeiQuiQzLiuJh+pF/W12sYWT8C/HGPjF6exckPLus9o8DBjbeiCLGzpA5gXefplGGZS+7eegpLU3SoK9lYddjmS9cudqF7YDq33e0/t+eAe4YsCHoQoolyHFVjMRN0+fUDVvPvUVjVFhkmS/GC91bqR2FmJ6Lk8gyk09vk0da3D2rBYQXNzDTCUwCUBLPIPrxS68UfE2jXKV7FcPPzTFbgF+TNbC4JpBmZJIDEg6h8euOHRNaNJMqDoR+BkPKhkcvEnb/Trpita3QzxoH+L+kou3sMKmhcoaZ2eK0VaUnT7EXFm2duY2jHLwYIV/sqWCmc6Hjgz/Egt5FqAz214l05olOzzG8caxQl7yZWjUkqftxnSKlMwjcX9L6UW1aXR9rapm36bfKlfAj+QJkBzaXrQ7Qu3iTfI8I+T0QpJ0LsXWPuERTZqoJZ77QW+wP8yNMk28sHvsCgW9F9VfyY74gKYuQno+ApwrVoujgznU44/e1ByxH/xqXzlQbDOEDkzKyHLUkSlTgvC6fvqfm9reM8X5fS/3E="
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# java-observer
Span life cycle observer API
[![Build Status][ci-img]][ci] [![Released Version][maven-img]][maven]

# OpenTracing Observer

This project provides an observer API for the OpenTracing Tracer.

## Release
Follow instructions in [RELEASE](RELEASE.md)

[ci-img]: https://travis-ci.org/opentracing-contrib/java-observer.svg?branch=master
[ci]: https://travis-ci.org/opentracing-contrib/java-observer
[maven-img]: https://img.shields.io/maven-central/v/io.opentracing.contrib/opentracing-observer.svg?maxAge=2592000
[maven]: http://search.maven.org/#search%7Cga%7C1%7Copentracing-observer
7 changes: 7 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# OpenTracing Release Process

This repo uses semantic versions. Please keep this in mind when choosing version numbers.

For the up-to-date release process, please refer the
[release process from the OpenTracing Java API](https://github.com/opentracing/opentracing-java/blob/master/RELEASE.md).

11 changes: 11 additions & 0 deletions header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright ${project.inceptionYear} The OpenTracing Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and limitations under
the License.
236 changes: 236 additions & 0 deletions mvnw
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------

if [ -z "$MAVEN_SKIP_RC" ] ; then

if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi

if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi

fi

# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
#
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
# for the new JDKs provided by Oracle.
#
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
#
# Apple JDKs
#
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
fi

if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
#
# Apple JDKs
#
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
fi

if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
#
# Oracle JDKs
#
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
fi

if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
#
# Apple JDKs
#
export JAVA_HOME=`/usr/libexec/java_home`
fi
;;
esac

if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi

if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"

# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done

saveddir=`pwd`

M2_HOME=`dirname "$PRG"`/..

# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`

cd "$saveddir"
# echo Using m2 at $M2_HOME
fi

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

# For Migwn, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
# TODO classpath?
fi

if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi

if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`which java`"
fi
fi

if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi

if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi

CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher

# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
local basedir=$(pwd)
local wdir=$(pwd)
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
wdir=$(cd "$wdir/.."; pwd)
done
echo "${basedir}"
}

# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
fi
}

export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi

# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS

WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

# avoid using MAVEN_CMD_LINE_ARGS below since that would loose parameter escaping in $@
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
Loading

0 comments on commit 539d5d5

Please sign in to comment.