diff --git a/.gitignore b/.gitignore index f49213b91..e2a23af44 100644 --- a/.gitignore +++ b/.gitignore @@ -13,10 +13,16 @@ # IntelliJ # User-specific stuff: +.idea .idea/workspace.xml .idea/tasks.xml +.idea/findbugs-idea.xml +.idea/codeStyleSettings.xml .idea/dictionaries +.idea/shelf *.iws +*.ipr +*.iml # Sensitive or high-churn files: .idea/dataSources.ids .idea/dataSources.xml diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 8e283d75b..000000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -ews-java-api \ No newline at end of file diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml deleted file mode 100644 index ddacdf3e8..000000000 --- a/.idea/codeStyleSettings.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index be026393d..000000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf337..000000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 74c0d0a52..000000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml b/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml deleted file mode 100644 index e8a6a9f91..000000000 --- a/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml deleted file mode 100644 index eab40b329..000000000 --- a/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__joda_time_joda_time_2_7.xml b/.idea/libraries/Maven__joda_time_joda_time_2_7.xml deleted file mode 100644 index 1259ecab6..000000000 --- a/.idea/libraries/Maven__joda_time_joda_time_2_7.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_11.xml b/.idea/libraries/Maven__junit_junit_4_11.xml deleted file mode 100644 index f33320d8e..000000000 --- a/.idea/libraries/Maven__junit_junit_4_11.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_5.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_5.xml deleted file mode 100644 index 5601459cf..000000000 --- a/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_3_5.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml deleted file mode 100644 index a821fc2fd..000000000 --- a/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_3_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml deleted file mode 100644 index 56193163f..000000000 --- a/.idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml deleted file mode 100644 index f58bbc112..000000000 --- a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index d1297649f..000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index e9b29f758..000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml deleted file mode 100644 index 922003b84..000000000 --- a/.idea/scopes/scope_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 275077f82..000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/.travis.yml b/.travis.yml index 50138977d..063139190 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,24 @@ +# The MIT License +# Copyright (c) 2012 Microsoft Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + language: java jdk: @@ -5,8 +26,30 @@ jdk: - oraclejdk7 - openjdk6 +# enable container-based infrastructure +sudo: false + +env: + global: + - secure: "V37/WY3//w4fQUxmtKXw9dsU4iH5Z6HvTpBkZj+5DaX5h2Lj98FzALvkGSt7KvqVKQBbgETjs3HTMQkz6hwbLgX2okLKCQbmhZu3vQLqkWe6KPqnO1NOKSaU4vhCoGpScNWMiVxrzCHLHZf5tQu7d+1WVMk5GNlgGqeKVSnz5LY=" + - secure: "O9Mjx/mU5MLQsngcVbTf7AVMFo2Bh3ZWXwTyiLVXAfU7/VZX39vx30Mf2laNpewYqbiouix7fOkK76YS8459QRoLVBAQSwzjuGsZAwQvz7b7+r3kCS7rwGm7eCobJDbwItoxAxA00rI3gpyX/BnaX8aFutQw/0ZoPSPOH+LzR+4=" + +# cache local repository for speed of build +cache: + directories: + - $HOME/.m2/repository +before_cache: + - rm -rf $HOME/.m2/repository/com/microsoft/ews-java-api + notifications: webhooks: urls: - - https://webhooks.gitter.im/e/04643d955d03eb39e24e + - https://webhooks.gitter.im/e/04643d955d03eb39e24e on_success: change + +before_install: + - chmod +x ./deploy_snapshot.sh + +after_success: + - bash <(curl -s https://codecov.io/bash) + - ./deploy_snapshot.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6bc079ca..9be0ef785 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,57 +1,4 @@ -## Contributing to Exchange Web Services Java API -*ews-java-api* is released under the [MIT License](license.txt) and contributors are welcome. +## Contributing.md -There are several ways to contribute to the project: - -* Report bugs and features in the [issue tracker](https://github.com/officedev/ews-java-api/issues). -* Submit and review pull requests -* Help with documentation -* Help with testing - -GitHub supports [markdown](http://github.github.com/github-flavored-markdown/), so when filing bugs make sure you check the formatting before clicking submit. - -### Contributing code and content -Before submitting a feature or substantial code contribution please discuss it with the team and ensure it follows the product roadmap. You might also read these two blogs posts on contributing code: - -* [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza -* [Don't "Push" Your Pull Requests](http://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. - -### Coding Conventions -The project is using the _google-styleguide for Java_. Documentation of this style can be found here: [Google Java Style](https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html) - -#### Using IntelliJ -`Settings` -> `Code Style` -> `Scheme` -> _Choose_ `Project` -#### Using Eclipse -* Open *google-styleguide for Java* by clicking on: [google-styleguide](https://google-styleguide.googlecode.com/svn-history/r122/trunk/eclipse-java-google-style.xml) -* Download the file with: “Right click and save as” -* Import the new formatter: - `Window` -> `Preferences` -> `Java` -> `Code Style` -> `Formatter` -> _Choose_ `Import` and `select` the _eclipse-java-google-style.xml_ - -### Pull Requests -If you don't know what a pull request is read the "[Using pull requests](https://help.github.com/articles/using-pull-requests)" article. - -Some guidelines for pull requests: - -* Use a descriptive title and description. -* Include a single logical change. -* Base on master branch - once accepted, can be ported to stable branches. -* Should cleanly merge with target branch. - -### Sign the Contributor License Agreement (CLA) -Before your pull request can be accepted and merged to the main repository you need to sign the [Contributor License Agreement (CLA)](https://cla.azure.com). - -### Commit Messages -1. Separate subject from body with a blank line -2. Limit the subject line to 50 characters -3. Capitalize the subject line -4. Do not end the subject line with a period -5. Use the imperative mood in the subject line (e.g. Fix #123: Make pigs fly). -6. Wrap the body at 72 characters -7. Use the body to explain what and why. The how should be mostly covered by the diff. - -References: - -* [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/) -* [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) -* [Guidelines for Commit Messages](https://wiki.gnome.org/Git/CommitMessages) -* [On commit messages](http://who-t.blogspot.de/2009/12/on-commit-messages.html) +### To participate, please visit the project wiki for more information. +*Guidelines can be found* [**HERE**](https://github.com/OfficeDev/ews-java-api/wiki/Contributing) \ No newline at end of file diff --git a/deploy_snapshot.sh b/deploy_snapshot.sh new file mode 100644 index 000000000..09f13b0c5 --- /dev/null +++ b/deploy_snapshot.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# The MIT License +# Copyright (c) 2012 Microsoft Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +if [ "$TRAVIS_REPO_SLUG" != "OfficeDev/ews-java-api" ]; then + echo "[DEPLOY] Skipping snapshot deployment for repo:'$TRAVIS_REPO_SLUG'." +elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo "[DEPLOY] Skipping snapshot deployment for a pull request." +elif [ "$TRAVIS_SECURE_ENV_VARS" == "false" ]; then + echo "[DEPLOY] Skipping snapshot deployment due to TRAVIS_SECURE_ENV_VARS is set to '$TRAVIS_SECURE_ENV_VARS'." +elif [ "$TRAVIS_JDK_VERSION" != "oraclejdk7" ]; then + echo "[DEPLOY] Skipping snapshot deployment for jdk:'$TRAVIS_JDK_VERSION'." +else + echo "[DEPLOY] Deploying snapshot for commit:'$TRAVIS_COMMIT' @ build-id:'$TRAVIS_BUILD_ID'" + # create settings.xml + echo "ossrh-snapshot${OSSRHUSER}${OSSRHPASS}" > $HOME/.m2/settings.xml + # deploy + if [ -z "${GPG_PASSPHRASE+xxx}" ]; then + echo "[INFO] Deploying unsigned artifacts" + mvn clean deploy --settings="$HOME/.m2/settings.xml" -Dmaven.test.skip=true -Dcheckstyle.skip=true + else + echo "[INFO] Deploying signed artifacts" + mvn clean deploy --settings="$HOME/.m2/settings.xml" -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dgpg.passphrase=$GPG_PASSPHRASE + fi + # clean up + rm -f $HOME/.m2/settings.xml +fi diff --git a/ews-java-api.iml b/ews-java-api.iml deleted file mode 100644 index e555cc0d3..000000000 --- a/ews-java-api.iml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 45990c479..e303359bc 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ com.microsoft.ews-java-api ews-java-api - 2.0-SNAPSHOT + 2.1-SNAPSHOT Exchange Web Services Java API Exchange Web Services (EWS) Java API @@ -53,12 +53,61 @@ http://www.microsoft.com/ + + + vboctor + Victor Boctor + vboctor@users.noreply.github.com + http://www.github.com/officedev/ews-java-api + Microsoft + http://www.microsoft.com + + administrator + developer + + America/New_York + + http://www.example.com/jdoe/pic + + + + UTF-8 1.6 + + + 2.16 + 1.6 + 2.10.3 + 3.3 + 1.6.5 + 2.4 + 1.14 + 1.1 + + 3.4 + 2.8 + 2.2 + 2.5 + 2.18.1 + 0.7.5.201505241946 + + 4.4.1 + 4.4.1 + 1.2 + 2.8 + 3.4 + 2.4 + + 4.12 + 1.3 + 1.10.19 + 1.7.12 + 1.1.3 @@ -72,6 +121,60 @@ -Xdoclint:none + + + java-7-or-later-profile + + [1.7,) + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + true + google_checks.xml + + + + verify + + checkstyle + + + + + + + + + release-sign-artifacts + + + gpg.passphrase + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + sign-artifacts + verify + + sign + + + + + + + @@ -100,7 +203,7 @@ - ossrh + ossrh-snapshot https://oss.sonatype.org/content/repositories/snapshots @@ -113,47 +216,81 @@ org.apache.httpcomponents httpclient - 4.3.5 + ${httpclient.version} org.apache.httpcomponents httpcore - 4.3.3 + ${httpcore.version} + + + + commons-io + commons-io + ${commons-io.version} commons-logging commons-logging - 1.2 + ${commons-logging.version} + + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} joda-time joda-time - 2.7 + ${joda-time.version} junit junit - 4.11 + ${junit.version} test org.hamcrest hamcrest-all - 1.3 + ${hamcrest-all.version} test org.mockito - mockito-all - 1.9.5 + mockito-core + ${mockito-core.version} + test + + + + org.slf4j + slf4j-api + ${slf4j.version} + test + + + + ch.qos.logback + logback-classic + ${logback.version} + test + + + + org.slf4j + jcl-over-slf4j + ${slf4j.version} test + @@ -162,17 +299,19 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.5 + ${nexus-staging-maven-plugin.version} true true + ossrh + https://oss.sonatype.org/ org.apache.maven.plugins maven-compiler-plugin - 3.2 + ${maven-compiler-plugin.version} ${project.build.sourceEncoding} ${javaLanguage.version} @@ -182,7 +321,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.10.1 + ${maven-javadoc-plugin.version} true ${javadoc.doclint.param} @@ -199,7 +338,7 @@ org.apache.maven.plugins maven-source-plugin - 2.4 + ${maven-source-plugin.version} attach-sources @@ -209,6 +348,47 @@ + + org.codehaus.mojo + animal-sniffer-maven-plugin + ${animal-sniffer-maven-plugin.version} + + + org.codehaus.mojo.signature + java16-sun + ${animal-sniffer-maven-plugin.signature.version} + + + + + check-java16-sun + test + + check + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + + prepare-agent + + + + report + test + + report + + + + + + + + false + + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n + + + + + + +