Skip to content

Commit

Permalink
Create new package for annotations
Browse files Browse the repository at this point in the history
Update headers, update maven wrapper
  • Loading branch information
ralscha committed Nov 13, 2017
1 parent 3e77aee commit 379e137
Show file tree
Hide file tree
Showing 46 changed files with 106 additions and 488 deletions.
Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ script:
env:
global:
- SONATYPE_USERNAME=ralscha23
- secure: t7/fSzRn+H4VjbmYrL0N5CqYcynwR6r95STDf57ZfiCT1QaAPMTpVMpu1tuOaEFzSpL2xBcqtxeBpoA3Lq7ViDVL5vv1jKs581uzDdr0OcxSiFUHQkn43N0+ab8wvT2VQpTZ3wVypOYyUHiA46I0gQk2HvplWcDR3r1ix0izZwMFEHl93CqS30EP0bS/NXLY6mOINP0cCy1uqB3dy8uekuFUdPBlJ4tz45h7P1M26VRGtKC2iK0+tzeGZU+dNbwE5FCTX//37eh31XnTruYkDEvQOtCV6eEposUlFdgpGs4KqNz1j5iWZ5SzZa7LaIEWBRsvXsMWqmW69w0kM/dLDorqQ/bVZQr3yPpLlWq+llLIcz9l6JWVjXbYC5fboNmyDQpJNPJek/mCURfkwT8QJraKysIg+/U5FzMyNqOot28gvg7hsviIPAKJhvqRtoN0/mdgI8pNv2+6DKqD2MLUkFRRWCapfrRqiLUVpipzE9rFQPDgiRK1trv+U0/p1NYgISYPDKSLLE3a96qYo1CwWnlm7PbJ4Sk4EWtG9mH+df2/HOX+8ys2gtASt9UHlegsJHifE7BrrVs/rVizveg4GDEp207fLnCostEc52yVjQoFr7vR9+XPnL7wUWeMtByb9dvrGM8+I3V3JWxt3XgYsU90t/9zLoskCMl1jDILz94=

after_success:
- cd ..
Expand Down
77 changes: 34 additions & 43 deletions mvnw
Original file line number Diff line number Diff line change
Expand Up @@ -54,38 +54,16 @@ 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
;;
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac

if [ -z "$JAVA_HOME" ] ; then
Expand Down Expand Up @@ -130,7 +108,7 @@ if $cygwin ; then
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

# For Migwn, ensure paths are in UNIX format before anything is touched
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
Expand Down Expand Up @@ -187,14 +165,25 @@ 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)

if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi

basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
wdir=$(cd "$wdir/.."; pwd)
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}
Expand All @@ -206,7 +195,15 @@ concat_lines() {
fi
}

export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi

export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# For Cygwin, switch paths to Windows format before running java
Expand All @@ -221,14 +218,8 @@ if $cygwin; then
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" \
Expand Down
38 changes: 20 additions & 18 deletions mvnw.cmd
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM Copyright 2015-2017 Ralph Schaer <ralphschaer@gmail.com>
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM See the License for the specific language governing permissions and
@REM limitations under the License.
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
Expand All @@ -32,6 +35,8 @@

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%

Expand Down Expand Up @@ -77,8 +82,6 @@ goto error

:init

set MAVEN_CMD_LINE_ARGS=%MAVEN_CONFIG% %*

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

Expand Down Expand Up @@ -114,11 +117,10 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

set WRAPPER_JAR=""%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar""

set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

# avoid using MAVEN_CMD_LINE_ARGS below since that would loose parameter escaping in %*
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
Expand Down
20 changes: 13 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,17 @@
</properties>

<dependencies>

<dependency>
<groupId>ch.rasc</groupId>
<artifactId>bsoncodec-annotations</artifactId>
<version>1.0.5-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.mongodb</groupId>
<artifactId>bson</artifactId>
<version>3.5.0</version>
<version>3.6.0-beta2</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -82,7 +89,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>23.3-jre</version>
<version>23.4-jre</version>
</dependency>

<!-- TEST dependencies -->
Expand All @@ -95,7 +102,7 @@
<dependency>
<groupId>com.google.testing.compile</groupId>
<artifactId>compile-testing</artifactId>
<version>0.11</version>
<version>0.12</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -105,7 +112,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand Down Expand Up @@ -185,11 +192,9 @@
<version>3.0</version>
<configuration>
<header>${basedir}/src/main/config/header.txt</header>
<properties>
<owner>Ralph Schaer</owner>
<properties>
<year>${project.inceptionYear}</year>
<currentYear>2017</currentYear>
<email>ralphschaer@gmail.com</email>
</properties>
<excludes>
<exclude>**/AnnotationHierarchyUtil.java</exclude>
Expand All @@ -201,6 +206,7 @@
<exclude>**/.gitignore</exclude>
<exclude>.factorypath</exclude>
<exclude>mvnw</exclude>
<exclude>mvnw.cmd</exclude>
<exclude>test/**/*</exclude>
<exclude>.apt_generated/</exclude>
<exclude>**/maven-wrapper.properties</exclude>
Expand Down
2 changes: 1 addition & 1 deletion src/main/config/header.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright ${year}-${currentYear} ${owner} <${email}>
Copyright ${year}-${currentYear} the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015-2017 Ralph Schaer <ralphschaer@gmail.com>
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/rasc/bsoncodec/CodecCodeGenerator.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015-2017 Ralph Schaer <ralphschaer@gmail.com>
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/rasc/bsoncodec/ProviderCodeGenerator.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015-2017 Ralph Schaer <ralphschaer@gmail.com>
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/rasc/bsoncodec/Util.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015-2017 Ralph Schaer <ralphschaer@gmail.com>
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
64 changes: 0 additions & 64 deletions src/main/java/ch/rasc/bsoncodec/annotation/BsonDocument.java

This file was deleted.

Loading

0 comments on commit 379e137

Please sign in to comment.