Compare commits
48 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e41360b4a3 | |||
| e2e06539fc | |||
| 93f59a228b | |||
| b2bb014492 | |||
| 062910c2c4 | |||
| 40fdb5a60d | |||
| 2fa0da5cde | |||
| c5f4ae5c0a | |||
| c68c1c55ff | |||
| be2595bc66 | |||
| dddd71439f | |||
| 95a1ccb52c | |||
| 4060f83261 | |||
| f9a7ae0a6f | |||
| 425d008f1d | |||
| b73104c9d1 | |||
| 895ef6cf76 | |||
| cb4bb463da | |||
| 5fd81eeaf1 | |||
| a332e2a728 | |||
| 9daf058a6e | |||
| 839cc5e851 | |||
| 0087128be8 | |||
| bfc9c5e18f | |||
| 6fbd038111 | |||
| 700bda68b7 | |||
| 53870ab3de | |||
| fe13b488a1 | |||
| c38495bfaf | |||
| c4b210b580 | |||
| 1a28b4f849 | |||
| 63cd52d1a6 | |||
| 895ae0ac55 | |||
| e6c268add0 | |||
| 82d471a592 | |||
| f48a006034 | |||
| b7a0959ede | |||
| 29f4193529 | |||
| ab59adbfd2 | |||
| de4b3a4310 | |||
| e691906dbc | |||
| 5a06fbd984 | |||
| 34b55242fe | |||
| 26e34368c0 | |||
| 0fb7c24cbb | |||
| 0351883dfa | |||
| 95132d9fe3 | |||
| bf9f1de6e1 |
+1
-1
@@ -1,5 +1,5 @@
|
||||
# EditorConfig for Spring Security
|
||||
# see https://github.com/spring-projects/spring-security/blob/master/CONTRIBUTING.adoc#mind-the-whitespace
|
||||
# see https://github.com/spring-projects/spring-security/blob/master/CONTRIBUTING.md#mind-the-whitespace
|
||||
|
||||
root = true
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
# Normalize line endings to auto.
|
||||
* text auto
|
||||
|
||||
# Ensure that line endings for DOS batch files are not modified.
|
||||
*.bat -text
|
||||
|
||||
# Ensure the following are treated as binary.
|
||||
*.cer binary
|
||||
*.graffle binary
|
||||
@@ -14,4 +11,3 @@
|
||||
*.odg binary
|
||||
*.otg binary
|
||||
*.png binary
|
||||
*.hsx binary
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
For Security Vulnerabilities, please use https://spring.io/security-policy
|
||||
For Security Vulnerabilities, please use https://pivotal.io/security#reporting
|
||||
-->
|
||||
|
||||
### Summary
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"index_name": "security-docs",
|
||||
"start_urls": [
|
||||
"https://docs.spring.io/spring-security/reference/"
|
||||
],
|
||||
"selectors": {
|
||||
"lvl0": {
|
||||
"selector": "//nav[@class='crumbs']//li[@class='crumb'][last()-1]",
|
||||
"type": "xpath",
|
||||
"global": true,
|
||||
"default_value": "Home"
|
||||
},
|
||||
"lvl1": ".doc h1",
|
||||
"lvl2": ".doc h2",
|
||||
"lvl3": ".doc h3",
|
||||
"lvl4": ".doc h4",
|
||||
"text": ".doc p, .doc td.content, .doc th.tableblock"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
HOST="$1"
|
||||
HOST_PATH="$2"
|
||||
SSH_PRIVATE_KEY="$3"
|
||||
SSH_KNOWN_HOST="$4"
|
||||
|
||||
|
||||
if [ "$#" -ne 4 ]; then
|
||||
echo -e "not enough arguments USAGE:\n\n$0 \$HOST \$HOST_PATH \$SSH_PRIVATE_KEY \$SSH_KNOWN_HOSTS \n\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use a non-default path to avoid overriding when testing locally
|
||||
SSH_PRIVATE_KEY_PATH=~/.ssh/github-actions-docs
|
||||
install -m 600 -D /dev/null "$SSH_PRIVATE_KEY_PATH"
|
||||
echo "$SSH_PRIVATE_KEY" > "$SSH_PRIVATE_KEY_PATH"
|
||||
echo "$SSH_KNOWN_HOST" > ~/.ssh/known_hosts
|
||||
rsync --delete -avze "ssh -i $SSH_PRIVATE_KEY_PATH" docs/build/site/ "$HOST:$HOST_PATH"
|
||||
rm -f "$SSH_PRIVATE_KEY_PATH"
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
###
|
||||
# Docs
|
||||
# config.json https://docsearch.algolia.com/docs/config-file
|
||||
# Run the crawler https://docsearch.algolia.com/docs/run-your-own/#run-the-crawl-from-the-docker-image
|
||||
|
||||
### USAGE
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo -e "not enough arguments USAGE:\n\n$0 \$ALGOLIA_APPLICATION_ID \$ALGOLIA_API_KEY \$CONFIG_FILE\n\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Script Parameters
|
||||
APPLICATION_ID=$1
|
||||
API_KEY=$2
|
||||
CONFIG_FILE=$3
|
||||
|
||||
#### Script
|
||||
script_dir=$(dirname $0)
|
||||
docker run -e "APPLICATION_ID=$APPLICATION_ID" -e "API_KEY=$API_KEY" -e "CONFIG=$(cat $CONFIG_FILE | jq -r tostring)" algolia/docsearch-scraper
|
||||
@@ -1,5 +0,0 @@
|
||||
REPOSITORY_REF="$1"
|
||||
TOKEN="$2"
|
||||
|
||||
curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${TOKEN}" --request POST --data '{"event_type": "request-build-reference"}' https://api.github.com/repos/${REPOSITORY_REF}/dispatches
|
||||
echo "Requested Build for $REPOSITORY_REF"
|
||||
@@ -1,16 +0,0 @@
|
||||
name: Update Algolia Index
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 10 * * *' # Once per day at 10am UTC
|
||||
workflow_dispatch: # Manual trigger
|
||||
|
||||
jobs:
|
||||
update:
|
||||
name: Update Algolia Index
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v2
|
||||
- name: Update Index
|
||||
run: ${GITHUB_WORKSPACE}/.github/actions/algolia-docsearch-scraper.sh "${{ secrets.ALGOLIA_APPLICATION_ID }}" "${{ secrets.ALGOLIA_WRITE_API_KEY }}" "${GITHUB_WORKSPACE}/.github/actions/algolia-config.json"
|
||||
@@ -1,30 +0,0 @@
|
||||
name: Generate Antora Files and Request Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'gh-pages'
|
||||
|
||||
env:
|
||||
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v2
|
||||
- name: Generate antora.yml
|
||||
run: ./gradlew :spring-security-docs:generateAntora
|
||||
- name: Extract Branch Name
|
||||
id: extract_branch_name
|
||||
run: echo "##[set-output name=generated_branch_name;]$(echo ${GITHUB_REPOSITORY}/${GITHUB_REF##*/})"
|
||||
- name: Push generated antora files to the spring-generated-docs
|
||||
uses: JamesIves/github-pages-deploy-action@4.1.4
|
||||
with:
|
||||
branch: ${{ steps.extract_branch_name.outputs.generated_branch_name }} # The branch the action should deploy to.
|
||||
folder: "docs/build/generateAntora" # The folder the action should deploy.
|
||||
repository-name: "spring-io/spring-generated-docs"
|
||||
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
||||
- name: Dispatch Build Request
|
||||
run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-projects/spring-security' "$GH_ACTIONS_REPO_TOKEN"
|
||||
@@ -13,7 +13,6 @@ env:
|
||||
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
|
||||
COMMIT_OWNER: ${{ github.event.pusher.name }}
|
||||
COMMIT_SHA: ${{ github.sha }}
|
||||
STRUCTURE101_LICENSEID: ${{ secrets.STRUCTURE101_LICENSEID }}
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}
|
||||
@@ -46,7 +45,7 @@ jobs:
|
||||
- name: Setup gradle user name
|
||||
run: |
|
||||
mkdir -p ~/.gradle
|
||||
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
||||
echo 'systemProp.user.name=spring-builds' >> ~/.gradle/gradle.properties
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
@@ -72,18 +71,21 @@ jobs:
|
||||
- name: Setup gradle user name
|
||||
run: |
|
||||
mkdir -p ~/.gradle
|
||||
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
||||
echo 'systemProp.user.name=spring-builds' >> ~/.gradle/gradle.properties
|
||||
- name: Snapshot Tests
|
||||
run: |
|
||||
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
||||
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
||||
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
||||
./gradlew test --refresh-dependencies -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PforceMavenRepositories=snapshot -PspringVersion='5.+' -PreactorVersion='20+' -PspringDataVersion='Neumann-BUILD-SNAPSHOT' -PrsocketVersion=1.1.0-SNAPSHOT -PspringBootVersion=2.4.0-SNAPSHOT -PlocksDisabled --stacktrace
|
||||
check_samples:
|
||||
name: Check Samples project
|
||||
sonar_analysis:
|
||||
name: Static Code Analysis
|
||||
needs: [prerequisites]
|
||||
runs-on: ubuntu-latest
|
||||
if: needs.prerequisites.outputs.runjobs
|
||||
env:
|
||||
SONAR_URL: ${{ secrets.SONAR_URL }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK
|
||||
@@ -93,37 +95,25 @@ jobs:
|
||||
- name: Setup gradle user name
|
||||
run: |
|
||||
mkdir -p ~/.gradle
|
||||
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
||||
- name: Check samples project
|
||||
echo 'systemProp.user.name=spring-builds' >> ~/.gradle/gradle.properties
|
||||
- name: Run Sonar on given (non-main) branch
|
||||
if: ${{ github.ref != 'refs/heads/main' }}
|
||||
run: |
|
||||
export BRANCH=${GITHUB_REF#refs/heads/}
|
||||
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
||||
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
||||
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
||||
./gradlew sonarqube -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PexcludeProjects='**/samples/**' -Dsonar.projectKey="spring-security-${GITHUB_REF#refs/heads/}" -Dsonar.projectName="spring-security-${GITHUB_REF#refs/heads/}" -Dsonar.host.url="$SONAR_URL" -Dsonar.login="$SONAR_TOKEN" --stacktrace
|
||||
- name: Run Sonar on main
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
||||
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
||||
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
||||
./gradlew checkSamples --stacktrace
|
||||
check_tangles:
|
||||
name: Check for Package Tangles
|
||||
needs: [ prerequisites ]
|
||||
runs-on: ubuntu-latest
|
||||
if: needs.prerequisites.outputs.runjobs
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '11'
|
||||
- name: Setup gradle user name
|
||||
run: |
|
||||
mkdir -p ~/.gradle
|
||||
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
||||
- name: Check for package tangles
|
||||
run: |
|
||||
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
||||
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
|
||||
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
|
||||
./gradlew check s101 -Ps101.licenseId="$STRUCTURE101_LICENSEID" --stacktrace
|
||||
./gradlew sonarqube -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PexcludeProjects='**/samples/**' -Dsonar.host.url="$SONAR_URL" -Dsonar.login="$SONAR_TOKEN" --stacktrace
|
||||
deploy_artifacts:
|
||||
name: Deploy Artifacts
|
||||
needs: [build_jdk_11, snapshot_tests, check_samples, check_tangles]
|
||||
needs: [build_jdk_11, snapshot_tests, sonar_analysis]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -134,7 +124,7 @@ jobs:
|
||||
- name: Setup gradle user name
|
||||
run: |
|
||||
mkdir -p ~/.gradle
|
||||
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
||||
echo 'systemProp.user.name=spring-builds' >> ~/.gradle/gradle.properties
|
||||
- name: Deploy artifacts
|
||||
run: |
|
||||
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
||||
@@ -150,7 +140,7 @@ jobs:
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
deploy_docs:
|
||||
name: Deploy Docs
|
||||
needs: [build_jdk_11, snapshot_tests, check_samples, check_tangles]
|
||||
needs: [build_jdk_11, snapshot_tests, sonar_analysis]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -161,7 +151,7 @@ jobs:
|
||||
- name: Setup gradle user name
|
||||
run: |
|
||||
mkdir -p ~/.gradle
|
||||
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
||||
echo 'systemProp.user.name=spring-builds' >> ~/.gradle/gradle.properties
|
||||
- name: Deploy Docs
|
||||
run: |
|
||||
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
||||
@@ -174,7 +164,7 @@ jobs:
|
||||
DOCS_HOST: ${{ secrets.DOCS_HOST }}
|
||||
deploy_schema:
|
||||
name: Deploy Schema
|
||||
needs: [build_jdk_11, snapshot_tests, check_samples, check_tangles]
|
||||
needs: [build_jdk_11, snapshot_tests, sonar_analysis]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -185,7 +175,7 @@ jobs:
|
||||
- name: Setup gradle user name
|
||||
run: |
|
||||
mkdir -p ~/.gradle
|
||||
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
|
||||
echo 'systemProp.user.name=spring-builds' >> ~/.gradle/gradle.properties
|
||||
- name: Deploy Schema
|
||||
run: |
|
||||
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
|
||||
@@ -198,7 +188,7 @@ jobs:
|
||||
DOCS_HOST: ${{ secrets.DOCS_HOST }}
|
||||
notify_result:
|
||||
name: Check for failures
|
||||
needs: [build_jdk_11, snapshot_tests, check_samples, check_tangles, deploy_artifacts, deploy_docs, deploy_schema]
|
||||
needs: [build_jdk_11, snapshot_tests, sonar_analysis, deploy_artifacts, deploy_docs, deploy_schema]
|
||||
if: failure()
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
name: Build & Deploy Reference
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: request-build-reference
|
||||
schedule:
|
||||
- cron: '0 10 * * *' # Once per day at 10am UTC
|
||||
workflow_dispatch: # Manual trigger
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew :spring-security-docs:antora --stacktrace
|
||||
- name: Cleanup Gradle Cache
|
||||
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
|
||||
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
|
||||
run: |
|
||||
rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
||||
rm -f ~/.gradle/caches/modules-2/gc.properties
|
||||
- name: Deploy
|
||||
run: ${GITHUB_WORKSPACE}/.github/actions/algolia-deploy.sh "${{ secrets.DOCS_USERNAME }}@${{ secrets.DOCS_HOST }}" "/opt/www/domains/spring.io/docs/htdocs/spring-security/reference/" "${{ secrets.DOCS_SSH_KEY }}" "${{ secrets.DOCS_SSH_HOST_KEY }}"
|
||||
@@ -1,33 +0,0 @@
|
||||
name: Check Milestone
|
||||
on:
|
||||
milestone:
|
||||
types: [created, opened, edited]
|
||||
env:
|
||||
DUE_ON: ${{ github.event.milestone.due_on }}
|
||||
TITLE: ${{ github.event.milestone.title }}
|
||||
jobs:
|
||||
spring-releasetrain-checks:
|
||||
name: Check DueOn is on a Release Date
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Print Milestone Being Checked
|
||||
run: echo "Validating DueOn '$DUE_ON' for milestone '$TITLE'"
|
||||
- name: Validate DueOn
|
||||
if: env.DUE_ON != ''
|
||||
run: |
|
||||
export TOOL_VERSION=0.1.1
|
||||
wget "https://repo.maven.apache.org/maven2/io/spring/releasetrain/spring-release-train-tools/$TOOL_VERSION/spring-release-train-tools-$TOOL_VERSION.jar"
|
||||
java -cp "spring-release-train-tools-$TOOL_VERSION.jar" io.spring.releasetrain.CheckMilestoneDueOnMain --dueOn "$DUE_ON" --expectedDayOfWeek MONDAY --expectedMondayCount 3
|
||||
notify_result:
|
||||
name: Check for failures
|
||||
needs: [spring-releasetrain-checks]
|
||||
if: failure()
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send Slack message
|
||||
uses: Gamesight/slack-workflow-status@v1.0.1
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
channel: '#spring-security-ci'
|
||||
name: 'CI Notifier'
|
||||
+2
-2
@@ -22,7 +22,7 @@ Be sure to read the https://docs.spring.io/spring-security/site/docs/current/ref
|
||||
Extensive JavaDoc for the Spring Security code is also available in the https://docs.spring.io/spring-security/site/docs/current/api/[Spring Security API Documentation].
|
||||
|
||||
== Quick Start
|
||||
See https://docs.spring.io/spring-security/site/docs/current/reference/html5/#servlet-hello[Hello Spring Security] to get started with a "Hello, World" application.
|
||||
See https://docs.spring.io/spring-security/site/docs/5.5.x/reference/html5/#servlet-hello[Hello Spring Security] to get started with a "Hello, World" application.
|
||||
|
||||
== Building from Source
|
||||
Spring Security uses a https://gradle.org[Gradle]-based build system.
|
||||
@@ -43,7 +43,7 @@ git clone git@github.com:spring-projects/spring-security.git
|
||||
=== Install all spring-\* jars into your local Maven cache
|
||||
[indent=0]
|
||||
----
|
||||
./gradlew publishToMavenLocal
|
||||
./gradlew install
|
||||
----
|
||||
|
||||
=== Compile and test; build all jars, distribution zips, and docs
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ Generate the Release Notes replacing:
|
||||
* <next-version> - Replace with the milestone you are releasing now (i.e. 5.5.0-RC1)
|
||||
|
||||
----
|
||||
$ ./gradlew generateChangelog -PnextVersion=<next-version>
|
||||
$ ./gradlew generateChangelog -P<next-version>
|
||||
----
|
||||
|
||||
* Copy the release notes to your clipboard (your mileage may vary with
|
||||
|
||||
@@ -11,15 +11,9 @@ dependencies {
|
||||
|
||||
optional 'net.sf.ehcache:ehcache'
|
||||
|
||||
testImplementation "org.assertj:assertj-core"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-params"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-engine"
|
||||
testImplementation "org.mockito:mockito-core"
|
||||
testImplementation "org.mockito:mockito-junit-jupiter"
|
||||
testImplementation 'org.springframework:spring-beans'
|
||||
testImplementation 'org.springframework:spring-context-support'
|
||||
testImplementation "org.springframework:spring-test"
|
||||
testImplementation 'org.springframework:spring-test'
|
||||
|
||||
testRuntimeOnly 'org.hsqldb:hsqldb'
|
||||
}
|
||||
|
||||
@@ -37,9 +37,7 @@ import org.springframework.util.Assert;
|
||||
* {@link PermissionGrantingStrategy} and {@link AclAuthorizationStrategy} instances.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @deprecated since 5.6. In favor of JCache based implementations
|
||||
*/
|
||||
@Deprecated
|
||||
public class EhCacheBasedAclCache implements AclCache {
|
||||
|
||||
private final Ehcache cache;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.security.acls;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.domain.AclFormattingUtils;
|
||||
import org.springframework.security.acls.model.Permission;
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.domain.ObjectIdentityImpl;
|
||||
import org.springframework.security.acls.model.AclService;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package org.springframework.security.acls;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.model.Acl;
|
||||
import org.springframework.security.acls.model.AclService;
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.access.SecurityConfig;
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.security.acls.domain;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.model.AccessControlEntry;
|
||||
import org.springframework.security.acls.model.Acl;
|
||||
|
||||
+8
-8
@@ -18,12 +18,12 @@ package org.springframework.security.acls.domain;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import org.springframework.security.acls.model.Acl;
|
||||
import org.springframework.security.authentication.TestingAuthenticationToken;
|
||||
@@ -37,7 +37,7 @@ import static org.mockito.BDDMockito.given;
|
||||
* @author Rob Winch
|
||||
*
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class AclAuthorizationStrategyImplTests {
|
||||
|
||||
@Mock
|
||||
@@ -47,7 +47,7 @@ public class AclAuthorizationStrategyImplTests {
|
||||
|
||||
AclAuthorizationStrategyImpl strategy;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setup() {
|
||||
this.authority = new SimpleGrantedAuthority("ROLE_AUTH");
|
||||
TestingAuthenticationToken authentication = new TestingAuthenticationToken("foo", "bar",
|
||||
@@ -56,7 +56,7 @@ public class AclAuthorizationStrategyImplTests {
|
||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void cleanup() {
|
||||
SecurityContextHolder.clearContext();
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.model.AccessControlEntry;
|
||||
import org.springframework.security.acls.model.Acl;
|
||||
@@ -83,7 +83,7 @@ public class AclImplTests {
|
||||
|
||||
private DefaultPermissionFactory permissionFactory;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setUp() {
|
||||
SecurityContextHolder.getContext().setAuthentication(this.auth);
|
||||
this.authzStrategy = mock(AclAuthorizationStrategy.class);
|
||||
@@ -93,7 +93,7 @@ public class AclImplTests {
|
||||
this.permissionFactory = new DefaultPermissionFactory();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void tearDown() {
|
||||
SecurityContextHolder.clearContext();
|
||||
}
|
||||
|
||||
+5
-5
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.springframework.security.acls.domain;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.acls.model.Acl;
|
||||
@@ -43,12 +43,12 @@ public class AclImplementationSecurityCheckTests {
|
||||
|
||||
private static final String TARGET_CLASS = "org.springframework.security.acls.TargetObject";
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setUp() {
|
||||
SecurityContextHolder.clearContext();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void tearDown() {
|
||||
SecurityContextHolder.clearContext();
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ package org.springframework.security.acls.domain;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.model.AccessControlEntry;
|
||||
import org.springframework.security.acls.model.AuditableAccessControlEntry;
|
||||
@@ -45,7 +45,7 @@ public class AuditLoggerTests {
|
||||
|
||||
private AuditableAccessControlEntry ace;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setUp() {
|
||||
this.logger = new ConsoleAuditLogger();
|
||||
this.ace = mock(AuditableAccessControlEntry.class);
|
||||
@@ -53,7 +53,7 @@ public class AuditLoggerTests {
|
||||
System.setOut(new PrintStream(this.bytes));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void tearDown() {
|
||||
System.setOut(this.console);
|
||||
this.bytes.reset();
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.security.acls.domain;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.model.ObjectIdentity;
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.security.acls.domain;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.model.ObjectIdentity;
|
||||
import org.springframework.security.acls.model.ObjectIdentityRetrievalStrategy;
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.springframework.security.acls.domain;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.model.Permission;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class PermissionTests {
|
||||
|
||||
private DefaultPermissionFactory permissionFactory;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void createPermissionfactory() {
|
||||
this.permissionFactory = new DefaultPermissionFactory();
|
||||
}
|
||||
|
||||
+10
-10
@@ -26,11 +26,11 @@ import javax.sql.DataSource;
|
||||
import net.sf.ehcache.Cache;
|
||||
import net.sf.ehcache.CacheManager;
|
||||
import net.sf.ehcache.Ehcache;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.security.acls.TargetObject;
|
||||
@@ -81,19 +81,19 @@ public abstract class AbstractBasicLookupStrategyTests {
|
||||
|
||||
public abstract DataSource getDataSource();
|
||||
|
||||
@BeforeAll
|
||||
@BeforeClass
|
||||
public static void initCacheManaer() {
|
||||
cacheManager = CacheManager.create();
|
||||
cacheManager.addCache(new Cache("basiclookuptestcache", 500, false, false, 30, 30));
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
@AfterClass
|
||||
public static void shutdownCacheManager() {
|
||||
cacheManager.removalAll();
|
||||
cacheManager.shutdown();
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void populateDatabase() {
|
||||
String query = "INSERT INTO acl_sid(ID,PRINCIPAL,SID) VALUES (1,1,'ben');"
|
||||
+ "INSERT INTO acl_class(ID,CLASS) VALUES (2,'" + TARGET_CLASS + "');"
|
||||
@@ -107,7 +107,7 @@ public abstract class AbstractBasicLookupStrategyTests {
|
||||
getJdbcTemplate().execute(query);
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void initializeBeans() {
|
||||
this.strategy = new BasicLookupStrategy(getDataSource(), aclCache(), aclAuthStrategy(),
|
||||
new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger()));
|
||||
@@ -123,7 +123,7 @@ public abstract class AbstractBasicLookupStrategyTests {
|
||||
new AclAuthorizationStrategyImpl(new SimpleGrantedAuthority("ROLE_USER")));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void emptyDatabase() {
|
||||
String query = "DELETE FROM acl_entry;" + "DELETE FROM acl_object_identity WHERE ID = 9;"
|
||||
+ "DELETE FROM acl_object_identity WHERE ID = 8;" + "DELETE FROM acl_object_identity WHERE ID = 7;"
|
||||
|
||||
@@ -22,11 +22,11 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
|
||||
@@ -39,7 +39,7 @@ import static org.mockito.BDDMockito.given;
|
||||
*
|
||||
* @author paulwheeler
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class AclClassIdUtilsTests {
|
||||
|
||||
private static final Long DEFAULT_IDENTIFIER = 999L;
|
||||
@@ -56,7 +56,7 @@ public class AclClassIdUtilsTests {
|
||||
|
||||
private AclClassIdUtils aclClassIdUtils;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setUp() {
|
||||
this.aclClassIdUtils = new AclClassIdUtils();
|
||||
}
|
||||
|
||||
+4
-4
@@ -18,8 +18,8 @@ package org.springframework.security.acls.jdbc;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
@@ -33,12 +33,12 @@ public class BasicLookupStrategyTests extends AbstractBasicLookupStrategyTests {
|
||||
|
||||
private static final BasicLookupStrategyTestsDbHelper DATABASE_HELPER = new BasicLookupStrategyTestsDbHelper();
|
||||
|
||||
@BeforeAll
|
||||
@BeforeClass
|
||||
public static void createDatabase() throws Exception {
|
||||
DATABASE_HELPER.createDatabase();
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
@AfterClass
|
||||
public static void dropDatabase() {
|
||||
DATABASE_HELPER.getDataSource().destroy();
|
||||
}
|
||||
|
||||
+13
-13
@@ -21,10 +21,11 @@ import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import junit.framework.Assert;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.core.convert.ConversionFailedException;
|
||||
import org.springframework.core.convert.support.DefaultConversionService;
|
||||
@@ -36,7 +37,6 @@ import org.springframework.security.acls.domain.ObjectIdentityImpl;
|
||||
import org.springframework.security.acls.model.Acl;
|
||||
import org.springframework.security.acls.model.ObjectIdentity;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
/**
|
||||
@@ -60,18 +60,18 @@ public class BasicLookupStrategyWithAclClassTypeTests extends AbstractBasicLooku
|
||||
return DATABASE_HELPER.getDataSource();
|
||||
}
|
||||
|
||||
@BeforeAll
|
||||
@BeforeClass
|
||||
public static void createDatabase() throws Exception {
|
||||
DATABASE_HELPER.createDatabase();
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
@AfterClass
|
||||
public static void dropDatabase() {
|
||||
DATABASE_HELPER.getDataSource().destroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void initializeBeans() {
|
||||
super.initializeBeans();
|
||||
this.uuidEnabledStrategy = new BasicLookupStrategy(getDataSource(), aclCache(), aclAuthStrategy(),
|
||||
@@ -81,7 +81,7 @@ public class BasicLookupStrategyWithAclClassTypeTests extends AbstractBasicLooku
|
||||
this.uuidEnabledStrategy.setConversionService(new DefaultConversionService());
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void populateDatabaseForAclClassTypeTests() {
|
||||
String query = "INSERT INTO acl_class(ID,CLASS,CLASS_ID_TYPE) VALUES (3,'" + TARGET_CLASS_WITH_UUID
|
||||
+ "', 'java.util.UUID');"
|
||||
@@ -99,8 +99,8 @@ public class BasicLookupStrategyWithAclClassTypeTests extends AbstractBasicLooku
|
||||
ObjectIdentity oid = new ObjectIdentityImpl(TARGET_CLASS_WITH_UUID, OBJECT_IDENTITY_UUID);
|
||||
Map<ObjectIdentity, Acl> foundAcls = this.uuidEnabledStrategy.readAclsById(Arrays.asList(oid),
|
||||
Arrays.asList(BEN_SID));
|
||||
assertThat(foundAcls).hasSize(1);
|
||||
assertThat(foundAcls.get(oid)).isNotNull();
|
||||
Assert.assertEquals(1, foundAcls.size());
|
||||
Assert.assertNotNull(foundAcls.get(oid));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -108,8 +108,8 @@ public class BasicLookupStrategyWithAclClassTypeTests extends AbstractBasicLooku
|
||||
ObjectIdentity oid = new ObjectIdentityImpl(TARGET_CLASS, 100L);
|
||||
Map<ObjectIdentity, Acl> foundAcls = this.uuidEnabledStrategy.readAclsById(Arrays.asList(oid),
|
||||
Arrays.asList(BEN_SID));
|
||||
assertThat(foundAcls).hasSize(1);
|
||||
assertThat(foundAcls.get(oid)).isNotNull();
|
||||
Assert.assertEquals(1, foundAcls.size());
|
||||
Assert.assertNotNull(foundAcls.get(oid));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+8
-8
@@ -26,14 +26,14 @@ import java.util.List;
|
||||
|
||||
import net.sf.ehcache.Ehcache;
|
||||
import net.sf.ehcache.Element;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.Captor;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import org.springframework.security.acls.domain.AclAuthorizationStrategy;
|
||||
import org.springframework.security.acls.domain.AclAuthorizationStrategyImpl;
|
||||
@@ -62,7 +62,7 @@ import static org.mockito.Mockito.verify;
|
||||
*
|
||||
* @author Andrei Stefan
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class EhCacheBasedAclCacheTests {
|
||||
|
||||
private static final String TARGET_CLASS = "org.springframework.security.acls.TargetObject";
|
||||
@@ -77,7 +77,7 @@ public class EhCacheBasedAclCacheTests {
|
||||
|
||||
private MutableAcl acl;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setup() {
|
||||
this.myCache = new EhCacheBasedAclCache(this.cache,
|
||||
new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger()),
|
||||
@@ -89,7 +89,7 @@ public class EhCacheBasedAclCacheTests {
|
||||
this.acl = new AclImpl(identity, 1L, aclAuthorizationStrategy, new ConsoleAuditLogger());
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void cleanup() {
|
||||
SecurityContextHolder.clearContext();
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@ import java.util.UUID;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
@@ -56,7 +56,7 @@ import static org.mockito.BDDMockito.given;
|
||||
*
|
||||
* @author Nena Raab
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class JdbcAclServiceTests {
|
||||
|
||||
private EmbeddedDatabase embeddedDatabase;
|
||||
@@ -74,20 +74,23 @@ public class JdbcAclServiceTests {
|
||||
|
||||
private JdbcAclService aclService;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setUp() {
|
||||
this.aclService = new JdbcAclService(this.jdbcOperations, this.lookupStrategy);
|
||||
this.aclServiceIntegration = new JdbcAclService(this.embeddedDatabase, this.lookupStrategy);
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpEmbeddedDatabase() {
|
||||
// @formatter:off
|
||||
this.embeddedDatabase = new EmbeddedDatabaseBuilder()
|
||||
.addScript("createAclSchemaWithAclClassIdType.sql")
|
||||
.addScript("db/sql/test_data_hierarchy.sql")
|
||||
.build();
|
||||
// @formatter:on
|
||||
|
||||
this.aclService = new JdbcAclService(this.jdbcOperations, this.lookupStrategy);
|
||||
this.aclServiceIntegration = new JdbcAclService(this.embeddedDatabase, this.lookupStrategy);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void tearDownEmbeddedDatabase() {
|
||||
this.embeddedDatabase.shutdown();
|
||||
}
|
||||
|
||||
+3
-6
@@ -22,8 +22,7 @@ import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
@@ -50,7 +49,7 @@ import org.springframework.security.authentication.TestingAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
|
||||
import org.springframework.test.context.transaction.AfterTransaction;
|
||||
import org.springframework.test.context.transaction.BeforeTransaction;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -67,10 +66,8 @@ import static org.mockito.Mockito.spy;
|
||||
* @author Ben Alex
|
||||
* @author Andrei Stefan
|
||||
*/
|
||||
@Transactional
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ContextConfiguration(locations = { "/jdbcMutableAclServiceTests-context.xml" })
|
||||
public class JdbcMutableAclServiceTests {
|
||||
public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4SpringContextTests {
|
||||
|
||||
private static final String TARGET_CLASS = TargetObject.class.getName();
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package org.springframework.security.acls.jdbc;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.TargetObjectWithUUID;
|
||||
import org.springframework.security.acls.domain.ObjectIdentityImpl;
|
||||
|
||||
+5
-5
@@ -18,9 +18,9 @@ package org.springframework.security.acls.jdbc;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.CacheManager;
|
||||
@@ -56,7 +56,7 @@ public class SpringCacheBasedAclCacheTests {
|
||||
|
||||
private static CacheManager cacheManager;
|
||||
|
||||
@BeforeAll
|
||||
@BeforeClass
|
||||
public static void initCacheManaer() {
|
||||
cacheManager = new ConcurrentMapCacheManager();
|
||||
// Use disk caching immediately (to test for serialization issue reported in
|
||||
@@ -64,7 +64,7 @@ public class SpringCacheBasedAclCacheTests {
|
||||
cacheManager.getCache("springcasebasedacltests");
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void clearContext() {
|
||||
SecurityContextHolder.clearContext();
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package org.springframework.security.acls.sid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.access.hierarchicalroles.RoleHierarchy;
|
||||
import org.springframework.security.acls.domain.GrantedAuthoritySid;
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.security.acls.sid;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.security.acls.domain.GrantedAuthoritySid;
|
||||
import org.springframework.security.acls.domain.PrincipalSid;
|
||||
|
||||
@@ -10,13 +10,6 @@ dependencies {
|
||||
api 'org.springframework:spring-core'
|
||||
|
||||
testImplementation 'org.springframework:spring-aop'
|
||||
testImplementation "org.assertj:assertj-core"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-params"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-engine"
|
||||
testImplementation "org.mockito:mockito-core"
|
||||
testImplementation "org.mockito:mockito-junit-jupiter"
|
||||
testImplementation "org.springframework:spring-test"
|
||||
testAspect sourceSets.main.output
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -20,9 +20,9 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
@@ -74,7 +74,7 @@ public class AnnotationSecurityAspectTests {
|
||||
|
||||
private PrePostSecured prePostSecured = new PrePostSecured();
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public final void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
this.interceptor = new AspectJMethodSecurityInterceptor();
|
||||
@@ -88,7 +88,7 @@ public class AnnotationSecurityAspectTests {
|
||||
secAspect.setSecurityInterceptor(this.interceptor);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void clearContext() {
|
||||
SecurityContextHolder.clearContext();
|
||||
}
|
||||
|
||||
+5
-24
@@ -1,10 +1,10 @@
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath "io.spring.javaformat:spring-javaformat-gradle-plugin:$springJavaformatVersion"
|
||||
classpath 'io.spring.nohttp:nohttp-gradle:0.0.10'
|
||||
classpath "io.freefair.gradle:aspectj-plugin:6.2.0"
|
||||
classpath 'io.spring.nohttp:nohttp-gradle:0.0.8'
|
||||
classpath "io.freefair.gradle:aspectj-plugin:5.3.3.3"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||
classpath "com.netflix.nebula:nebula-project-plugin:8.2.0"
|
||||
classpath "com.netflix.nebula:nebula-project-plugin:8.0.0"
|
||||
}
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/plugins-snapshot' }
|
||||
@@ -14,9 +14,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'io.spring.nohttp'
|
||||
apply plugin: 'locks'
|
||||
apply plugin: 's101'
|
||||
apply plugin: 'io.spring.convention.root'
|
||||
apply plugin: 'io.spring.convention.include-check-remote'
|
||||
apply plugin: 'org.jetbrains.kotlin.jvm'
|
||||
apply plugin: 'org.springframework.security.update-dependencies'
|
||||
apply plugin: 'org.springframework.security.sagan'
|
||||
@@ -58,22 +56,18 @@ updateDependenciesSettings {
|
||||
}
|
||||
addFiles({
|
||||
return [
|
||||
project.file("buildSrc/src/main/java/io/spring/gradle/convention/AsciidoctorConventionPlugin.java"),
|
||||
project.file("buildSrc/src/main/groovy/io/spring/gradle/convention/CheckstylePlugin.groovy")
|
||||
]
|
||||
})
|
||||
dependencyExcludes {
|
||||
majorVersionBump()
|
||||
minorVersionBump()
|
||||
alphaBetaVersions()
|
||||
releaseCandidatesVersions()
|
||||
milestoneVersions()
|
||||
snapshotVersions()
|
||||
addRule { components ->
|
||||
components.withModule("commons-codec:commons-codec") { selection ->
|
||||
ModuleComponentIdentifier candidate = selection.getCandidate();
|
||||
if (!candidate.getVersion().equals(selection.getCurrentVersion())) {
|
||||
selection.reject("commons-codec updates break saml tests");
|
||||
}
|
||||
}
|
||||
components.withModule("org.python:jython") { selection ->
|
||||
ModuleComponentIdentifier candidate = selection.getCandidate();
|
||||
if (!candidate.getVersion().equals(selection.getCurrentVersion())) {
|
||||
@@ -104,7 +98,6 @@ subprojects {
|
||||
}
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
options.compilerArgs.add("-parameters")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,15 +140,3 @@ nohttp {
|
||||
source.exclude "buildSrc/build/**"
|
||||
|
||||
}
|
||||
|
||||
tasks.register('checkSamples') {
|
||||
includeCheckRemote {
|
||||
repository = 'spring-projects/spring-security-samples'
|
||||
ref = samplesBranch
|
||||
}
|
||||
dependsOn checkRemote
|
||||
}
|
||||
|
||||
s101 {
|
||||
configurationDirectory = project.file("etc/s101")
|
||||
}
|
||||
|
||||
+12
-19
@@ -56,10 +56,6 @@ gradlePlugin {
|
||||
id = "org.springframework.github.changelog"
|
||||
implementationClass = "org.springframework.gradle.github.changelog.GitHubChangelogPlugin"
|
||||
}
|
||||
s101 {
|
||||
id = "s101"
|
||||
implementationClass = "s101.S101Plugin"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,31 +72,28 @@ dependencies {
|
||||
implementation localGroovy()
|
||||
|
||||
implementation 'io.github.gradle-nexus:publish-plugin:1.1.0'
|
||||
implementation 'io.projectreactor:reactor-core:3.4.12'
|
||||
implementation 'io.projectreactor:reactor-core:3.4.6'
|
||||
implementation 'gradle.plugin.org.gretty:gretty:3.0.1'
|
||||
implementation 'com.apollographql.apollo:apollo-runtime:2.4.5'
|
||||
implementation 'com.github.ben-manes:gradle-versions-plugin:0.38.0'
|
||||
implementation 'com.github.spullara.mustache.java:compiler:0.9.4'
|
||||
implementation 'io.spring.gradle:docbook-reference-plugin:0.3.1'
|
||||
implementation 'io.spring.gradle:propdeps-plugin:0.0.10.RELEASE'
|
||||
implementation 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.15'
|
||||
implementation 'io.spring.nohttp:nohttp-gradle:0.0.10'
|
||||
implementation 'net.sourceforge.htmlunit:htmlunit:2.37.0'
|
||||
implementation 'io.spring.nohttp:nohttp-gradle:0.0.8'
|
||||
implementation 'org.aim42:htmlSanityCheck:1.1.6'
|
||||
implementation 'org.asciidoctor:asciidoctor-gradle-jvm:3.1.0'
|
||||
implementation 'org.asciidoctor:asciidoctor-gradle-jvm-pdf:3.1.0'
|
||||
implementation 'org.hidetake:gradle-ssh-plugin:2.10.1'
|
||||
implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:4.24.20'
|
||||
implementation 'org.jfrog.buildinfo:build-info-extractor-gradle:4.9.10'
|
||||
implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1'
|
||||
|
||||
testImplementation platform('org.junit:junit-bom:5.8.1')
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-api"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-params"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-engine"
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'org.apache.commons:commons-io:1.3.2'
|
||||
testImplementation 'org.assertj:assertj-core:3.13.2'
|
||||
testImplementation 'org.mockito:mockito-core:3.12.4'
|
||||
testImplementation 'org.mockito:mockito-junit-jupiter:3.12.4'
|
||||
testImplementation 'org.mockito:mockito-core:3.0.0'
|
||||
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
|
||||
testImplementation "com.squareup.okhttp3:mockwebserver:3.14.9"
|
||||
}
|
||||
|
||||
|
||||
test {
|
||||
onlyIf { !project.hasProperty("buildSrc.skipTests") }
|
||||
useJUnitPlatform()
|
||||
}
|
||||
test.onlyIf { !project.hasProperty("buildSrc.skipTests") }
|
||||
|
||||
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
|
||||
package io.spring.gradle
|
||||
|
||||
import groovy.transform.CompileStatic
|
||||
import groovy.transform.TypeChecked
|
||||
import groovy.transform.TypeCheckingMode
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
/**
|
||||
* Checkout a project template from a git repository.
|
||||
*
|
||||
* @author Marcus Da Coregio
|
||||
*/
|
||||
@CompileStatic
|
||||
abstract class IncludeRepoTask extends DefaultTask {
|
||||
|
||||
private static final String DEFAULT_URI_PREFIX = 'https://github.com/'
|
||||
|
||||
/**
|
||||
* Git repository to use. Will be prefixed with {@link #DEFAULT_URI_PREFIX} if it isn't already
|
||||
* @return
|
||||
*/
|
||||
@Input
|
||||
abstract Property<String> getRepository();
|
||||
|
||||
/**
|
||||
* Git reference to use.
|
||||
*/
|
||||
@Input
|
||||
abstract Property<String> getRef()
|
||||
|
||||
/**
|
||||
* Directory where the project template should be copied.
|
||||
*/
|
||||
@OutputDirectory
|
||||
final File outputDirectory = project.file("$project.buildDir/$name")
|
||||
|
||||
@TaskAction
|
||||
void checkoutAndCopy() {
|
||||
outputDirectory.deleteDir()
|
||||
File checkoutDir = checkout(this, getRemoteUri(), ref.get())
|
||||
moveToOutputDir(checkoutDir, outputDirectory)
|
||||
}
|
||||
|
||||
private static File cleanTemporaryDir(Task task, File tmpDir) {
|
||||
if (tmpDir.exists()) {
|
||||
task.project.delete(tmpDir)
|
||||
}
|
||||
return tmpDir
|
||||
}
|
||||
|
||||
static File checkout(Task task, String remoteUri, String ref) {
|
||||
checkout(task, remoteUri, ref, task.getTemporaryDir())
|
||||
}
|
||||
|
||||
@TypeChecked(TypeCheckingMode.SKIP)
|
||||
static File checkout(Task task, String remoteUri, String ref, File checkoutDir) {
|
||||
cleanTemporaryDir(task, checkoutDir)
|
||||
task.project.exec {
|
||||
commandLine = ["git", "clone", "--no-checkout", remoteUri, checkoutDir.absolutePath]
|
||||
errorOutput = System.err
|
||||
}
|
||||
task.project.exec {
|
||||
commandLine = ["git", "checkout", ref]
|
||||
workingDir = checkoutDir
|
||||
errorOutput = System.err
|
||||
}
|
||||
return checkoutDir
|
||||
}
|
||||
|
||||
private static void moveToOutputDir(File tmpDir, File outputDirectory) {
|
||||
File baseDir = tmpDir
|
||||
baseDir.renameTo(outputDirectory)
|
||||
}
|
||||
|
||||
private String getRemoteUri() {
|
||||
String remoteUri = this.repository.get()
|
||||
if (remoteUri.startsWith(DEFAULT_URI_PREFIX)) {
|
||||
return remoteUri
|
||||
}
|
||||
return DEFAULT_URI_PREFIX + remoteUri
|
||||
}
|
||||
}
|
||||
+13
-9
@@ -16,17 +16,20 @@
|
||||
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import io.spring.gradle.propdeps.PropDepsMavenPlugin;
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.plugins.GroovyPlugin;
|
||||
import org.gradle.api.plugins.JavaPlugin
|
||||
import org.gradle.api.plugins.JavaPlugin;
|
||||
import org.gradle.api.plugins.MavenPlugin;
|
||||
import org.gradle.api.plugins.PluginManager;
|
||||
import org.gradle.internal.impldep.org.apache.maven.Maven;
|
||||
import org.gradle.plugins.ide.eclipse.EclipseWtpPlugin;
|
||||
import org.gradle.plugins.ide.idea.IdeaPlugin;
|
||||
import org.springframework.gradle.CopyPropertiesPlugin
|
||||
import org.springframework.gradle.propdeps.PropDepsEclipsePlugin
|
||||
import org.springframework.gradle.propdeps.PropDepsIdeaPlugin
|
||||
import org.springframework.gradle.propdeps.PropDepsPlugin;
|
||||
import io.spring.gradle.propdeps.PropDepsEclipsePlugin;
|
||||
import io.spring.gradle.propdeps.PropDepsIdeaPlugin;
|
||||
import io.spring.gradle.propdeps.PropDepsPlugin
|
||||
import org.springframework.gradle.CopyPropertiesPlugin;
|
||||
|
||||
/**
|
||||
* @author Rob Winch
|
||||
@@ -37,7 +40,7 @@ public abstract class AbstractSpringJavaPlugin implements Plugin<Project> {
|
||||
public final void apply(Project project) {
|
||||
PluginManager pluginManager = project.getPluginManager();
|
||||
pluginManager.apply(JavaPlugin.class);
|
||||
pluginManager.apply(ManagementConfigurationPlugin.class)
|
||||
pluginManager.apply(ManagementConfigurationPlugin.class);
|
||||
if (project.file("src/main/groovy").exists()
|
||||
|| project.file("src/test/groovy").exists()
|
||||
|| project.file("src/integration-test/groovy").exists()) {
|
||||
@@ -49,8 +52,12 @@ public abstract class AbstractSpringJavaPlugin implements Plugin<Project> {
|
||||
pluginManager.apply(PropDepsPlugin);
|
||||
pluginManager.apply(PropDepsEclipsePlugin);
|
||||
pluginManager.apply(PropDepsIdeaPlugin);
|
||||
project.getPlugins().withType(MavenPlugin) {
|
||||
pluginManager.apply(PropDepsMavenPlugin);
|
||||
}
|
||||
pluginManager.apply("io.spring.convention.tests-configuration");
|
||||
pluginManager.apply("io.spring.convention.integration-test");
|
||||
pluginManager.apply("io.spring.convention.dependency-set");
|
||||
pluginManager.apply("io.spring.convention.javadoc-options");
|
||||
pluginManager.apply("io.spring.convention.checkstyle");
|
||||
pluginManager.apply(CopyPropertiesPlugin);
|
||||
@@ -62,9 +69,6 @@ public abstract class AbstractSpringJavaPlugin implements Plugin<Project> {
|
||||
manifest.attributes["Implementation-Version"] = project.version
|
||||
manifest.attributes["Automatic-Module-Name"] = project.name.replace('-', '.')
|
||||
}
|
||||
project.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
additionalPlugins(project);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class CheckstylePlugin implements Plugin<Project> {
|
||||
if (checkstyleDir.exists() && checkstyleDir.directory) {
|
||||
project.getPluginManager().apply('checkstyle')
|
||||
project.dependencies.add('checkstyle', 'io.spring.javaformat:spring-javaformat-checkstyle:0.0.15')
|
||||
project.dependencies.add('checkstyle', 'io.spring.nohttp:nohttp-checkstyle:0.0.10')
|
||||
project.dependencies.add('checkstyle', 'io.spring.nohttp:nohttp-checkstyle:0.0.8')
|
||||
|
||||
project.checkstyle {
|
||||
configDirectory = checkstyleDir
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Copyright 2002-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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.JavaPlugin
|
||||
|
||||
/**
|
||||
* Adds sets of dependencies to make it easy to add a grouping of dependencies. The
|
||||
* dependencies added are:
|
||||
*
|
||||
* <ul>
|
||||
* <li>sockDependencies</li>
|
||||
* <li>seleniumDependencies</li>
|
||||
* <li>gebDependencies</li>
|
||||
* <li>powerMockDependencies</li>
|
||||
* <li>slf4jDependencies</li>
|
||||
* <li>jstlDependencies</li>
|
||||
* <li>apachedsDependencies</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Rob Winch
|
||||
*/
|
||||
public class DependencySetPlugin implements Plugin<Project> {
|
||||
@Override
|
||||
public void apply(Project project) {
|
||||
|
||||
project.ext.spockDependencies = [
|
||||
project.dependencies.create("org.spockframework:spock-spring") {
|
||||
exclude group: 'junit', module: 'junit-dep'
|
||||
},
|
||||
project.dependencies.create("org.spockframework:spock-core") {
|
||||
exclude group: 'junit', module: 'junit-dep'
|
||||
}
|
||||
]
|
||||
|
||||
project.ext.seleniumDependencies = [
|
||||
"org.seleniumhq.selenium:htmlunit-driver",
|
||||
"org.seleniumhq.selenium:selenium-support"
|
||||
]
|
||||
|
||||
project.ext.gebDependencies = project.spockDependencies +
|
||||
project.seleniumDependencies + [
|
||||
"org.gebish:geb-spock",
|
||||
'commons-httpclient:commons-httpclient',
|
||||
"org.codehaus.groovy:groovy",
|
||||
"org.codehaus.groovy:groovy-all"
|
||||
]
|
||||
|
||||
project.ext.powerMockDependencies = [
|
||||
"org.powermock:powermock-core",
|
||||
"org.powermock:powermock-api-support",
|
||||
"org.powermock:powermock-module-junit4-common",
|
||||
"org.powermock:powermock-module-junit4",
|
||||
project.dependencies.create("org.powermock:powermock-api-mockito") {
|
||||
exclude group: 'org.mockito', module: 'mockito-all'
|
||||
},
|
||||
"org.powermock:powermock-reflect"
|
||||
]
|
||||
|
||||
project.ext.powerMock2Dependencies = [
|
||||
"org.powermock:powermock-core",
|
||||
"org.powermock:powermock-api-support",
|
||||
"org.powermock:powermock-module-junit4-common",
|
||||
"org.powermock:powermock-module-junit4",
|
||||
project.dependencies.create("org.powermock:powermock-api-mockito2") {
|
||||
exclude group: 'org.mockito', module: 'mockito-all'
|
||||
},
|
||||
"org.powermock:powermock-reflect"
|
||||
]
|
||||
|
||||
project.ext.slf4jDependencies = [
|
||||
"org.slf4j:slf4j-api",
|
||||
"org.slf4j:jcl-over-slf4j",
|
||||
"org.slf4j:log4j-over-slf4j",
|
||||
"ch.qos.logback:logback-classic"
|
||||
]
|
||||
|
||||
project.ext.springCoreDependency = [
|
||||
project.dependencies.create("org.springframework:spring-core") {
|
||||
exclude(group: 'commons-logging', module: 'commons-logging')
|
||||
}
|
||||
]
|
||||
|
||||
project.ext.testDependencies = [
|
||||
"junit:junit",
|
||||
"org.mockito:mockito-core",
|
||||
"org.springframework:spring-test",
|
||||
"org.assertj:assertj-core"
|
||||
]
|
||||
|
||||
project.ext.jstlDependencies = [
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api",
|
||||
"org.apache.taglibs:taglibs-standard-jstlel"
|
||||
]
|
||||
|
||||
project.ext.apachedsDependencies = [
|
||||
"org.apache.directory.server:apacheds-core",
|
||||
"org.apache.directory.server:apacheds-core-entry",
|
||||
"org.apache.directory.server:apacheds-protocol-shared",
|
||||
"org.apache.directory.server:apacheds-protocol-ldap",
|
||||
"org.apache.directory.server:apacheds-server-jndi",
|
||||
'org.apache.directory.shared:shared-ldap'
|
||||
]
|
||||
|
||||
project.plugins.withType(JavaPlugin) {
|
||||
project.dependencies {
|
||||
testImplementation project.testDependencies
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import org.aim42.htmlsanitycheck.HtmlSanityCheckPlugin
|
||||
import org.aim42.htmlsanitycheck.HtmlSanityCheckTask
|
||||
import org.aim42.htmlsanitycheck.check.BrokenHttpLinksChecker
|
||||
import org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.plugins.BasePlugin
|
||||
import org.gradle.api.plugins.PluginManager
|
||||
import org.gradle.api.tasks.bundling.Zip
|
||||
|
||||
@@ -16,18 +19,54 @@ public class DocsPlugin implements Plugin<Project> {
|
||||
public void apply(Project project) {
|
||||
|
||||
PluginManager pluginManager = project.getPluginManager();
|
||||
pluginManager.apply(BasePlugin);
|
||||
pluginManager.apply("org.asciidoctor.jvm.convert");
|
||||
pluginManager.apply("org.asciidoctor.jvm.pdf");
|
||||
pluginManager.apply(AsciidoctorConventionPlugin);
|
||||
pluginManager.apply(DeployDocsPlugin);
|
||||
pluginManager.apply(JavadocApiPlugin);
|
||||
pluginManager.apply(HtmlSanityCheckPlugin)
|
||||
|
||||
String projectName = Utils.getProjectName(project);
|
||||
String pdfFilename = projectName + "-reference.pdf";
|
||||
|
||||
project.tasks.withType(AbstractAsciidoctorTask) { t ->
|
||||
project.configure(t) {
|
||||
sources {
|
||||
include "**/*.adoc"
|
||||
exclude '_*/**'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project.tasks.withType(HtmlSanityCheckTask) { HtmlSanityCheckTask t ->
|
||||
project.configure(t) {
|
||||
t.dependsOn 'asciidoctor'
|
||||
t.checkerClasses = [BrokenHttpLinksChecker]
|
||||
t.checkingResultsDir = new File(project.getBuildDir(), "/report/htmlchecks")
|
||||
t.failOnErrors = false
|
||||
t.httpConnectionTimeout = 3000
|
||||
t.sourceDir = new File(project.getBuildDir(), "/docs/asciidoc/")
|
||||
t.sourceDocuments = project.files(new File(project.getBuildDir(), "/docs/asciidoc/index.html"))
|
||||
}
|
||||
}
|
||||
|
||||
Task docsZip = project.tasks.create('docsZip', Zip) {
|
||||
dependsOn 'api'
|
||||
dependsOn 'api', 'asciidoctor'
|
||||
group = 'Distribution'
|
||||
archiveBaseName = project.rootProject.name
|
||||
archiveClassifier = 'docs'
|
||||
description = "Builds -${classifier} archive containing all " +
|
||||
"Docs for deployment at docs.spring.io"
|
||||
|
||||
from(project.tasks.asciidoctor.outputs) {
|
||||
into 'reference/html5'
|
||||
include '**'
|
||||
}
|
||||
from(project.tasks.asciidoctorPdf.outputs) {
|
||||
into 'reference/pdf'
|
||||
include '**'
|
||||
rename "index.pdf", pdfFilename
|
||||
}
|
||||
from(project.tasks.api.outputs) {
|
||||
into 'api'
|
||||
}
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import io.spring.gradle.IncludeRepoTask
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.GradleBuild
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
|
||||
/**
|
||||
* Adds a set of tasks that make easy to clone a remote repository and perform some task
|
||||
*
|
||||
* @author Marcus Da Coregio
|
||||
*/
|
||||
class IncludeCheckRemotePlugin implements Plugin<Project> {
|
||||
@Override
|
||||
void apply(Project project) {
|
||||
IncludeCheckRemoteExtension extension = project.extensions.create('includeCheckRemote', IncludeCheckRemoteExtension)
|
||||
TaskProvider<IncludeRepoTask> includeRepoTask = project.tasks.register('includeRepo', IncludeRepoTask) { IncludeRepoTask it ->
|
||||
it.repository = extension.repository
|
||||
it.ref = extension.ref
|
||||
}
|
||||
project.tasks.register('checkRemote', GradleBuild) {
|
||||
it.dependsOn 'includeRepo'
|
||||
it.dir = includeRepoTask.get().outputDirectory
|
||||
it.tasks = extension.getTasks()
|
||||
}
|
||||
}
|
||||
|
||||
abstract static class IncludeCheckRemoteExtension {
|
||||
|
||||
/**
|
||||
* Git repository to clone
|
||||
*/
|
||||
String repository;
|
||||
|
||||
/**
|
||||
* Git ref to checkout
|
||||
*/
|
||||
String ref
|
||||
|
||||
/**
|
||||
* Task to run in the repository
|
||||
*/
|
||||
List<String> tasks = ['check']
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import io.spring.gradle.propdeps.PropDepsPlugin
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
@@ -23,7 +24,6 @@ import org.gradle.api.plugins.JavaPlugin
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.plugins.ide.eclipse.EclipsePlugin
|
||||
import org.gradle.plugins.ide.idea.IdeaPlugin
|
||||
import org.springframework.gradle.propdeps.PropDepsPlugin
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -54,7 +54,7 @@ public class IntegrationTestPlugin implements Plugin<Project> {
|
||||
}
|
||||
project.configurations {
|
||||
integrationTestCompile {
|
||||
extendsFrom testImplementation
|
||||
extendsFrom testCompile, testImplementation
|
||||
}
|
||||
integrationTestRuntime {
|
||||
extendsFrom integrationTestCompile, testRuntime, testRuntimeOnly
|
||||
@@ -77,7 +77,6 @@ public class IntegrationTestPlugin implements Plugin<Project> {
|
||||
testClassesDirs = project.sourceSets.integrationTest.output.classesDirs
|
||||
classpath = project.sourceSets.integrationTest.runtimeClasspath
|
||||
shouldRunAfter project.tasks.test
|
||||
useJUnitPlatform()
|
||||
}
|
||||
project.tasks.check.dependsOn integrationTestTask
|
||||
|
||||
|
||||
+4
-19
@@ -1,21 +1,7 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
|
||||
import io.spring.gradle.propdeps.PropDepsPlugin;
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.artifacts.ConfigurationContainer;
|
||||
@@ -26,8 +12,6 @@ import org.gradle.api.publish.PublishingExtension;
|
||||
import org.gradle.api.publish.maven.MavenPublication;
|
||||
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;
|
||||
|
||||
import org.springframework.gradle.propdeps.PropDepsPlugin;
|
||||
|
||||
/**
|
||||
* Creates a Management configuration that is appropriate for adding a platform to that is not exposed externally. If
|
||||
* the JavaPlugin is applied, the compileClasspath, runtimeClasspath, testCompileClasspath, and testRuntimeClasspath
|
||||
@@ -71,4 +55,5 @@ public class ManagementConfigurationPlugin implements Plugin<Project> {
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
public class OssrhPlugin implements Plugin<Project> {
|
||||
|
||||
@Override
|
||||
public void apply(Project project) {
|
||||
if(project.hasProperty('ossrhUsername')) {
|
||||
project.uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
||||
authentication(userName: project.ossrhUsername, password: project.ossrhPassword)
|
||||
}
|
||||
|
||||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
||||
authentication(userName: project.ossrhUsername, password: project.ossrhPassword)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,10 @@ class SpringModulePlugin extends AbstractSpringJavaPlugin {
|
||||
def deployArtifacts = project.task("deployArtifacts")
|
||||
deployArtifacts.group = 'Deploy tasks'
|
||||
deployArtifacts.description = "Deploys the artifacts to either Artifactory or Maven Central"
|
||||
if (!Utils.isRelease(project)) {
|
||||
if (Utils.isRelease(project)) {
|
||||
deployArtifacts.dependsOn project.tasks.uploadArchives
|
||||
}
|
||||
else {
|
||||
deployArtifacts.dependsOn project.tasks.artifactoryPublish
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
/*
|
||||
* Copyright 2019-2020 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import org.asciidoctor.gradle.base.AsciidoctorAttributeProvider;
|
||||
import org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask;
|
||||
import org.asciidoctor.gradle.jvm.AsciidoctorJExtension;
|
||||
import org.asciidoctor.gradle.jvm.AsciidoctorJPlugin;
|
||||
import org.asciidoctor.gradle.jvm.AsciidoctorTask;
|
||||
import org.gradle.api.Action;
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.artifacts.Configuration;
|
||||
import org.gradle.api.artifacts.DependencySet;
|
||||
import org.gradle.api.artifacts.dsl.RepositoryHandler;
|
||||
import org.gradle.api.file.CopySpec;
|
||||
import org.gradle.api.file.FileTree;
|
||||
import org.gradle.api.tasks.Sync;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Conventions that are applied in the presence of the {@link AsciidoctorJPlugin}. When
|
||||
* the plugin is applied:
|
||||
*
|
||||
* <ul>
|
||||
* <li>All warnings are made fatal.
|
||||
* <li>A task is created to resolve and unzip our documentation resources (CSS and
|
||||
* Javascript).
|
||||
* <li>For each {@link AsciidoctorTask} (HTML only):
|
||||
* <ul>
|
||||
* <li>A configuration named asciidoctorExtensions is ued to add the
|
||||
* <a href="https://github.com/spring-io/spring-asciidoctor-extensions#block-switch">block
|
||||
* switch</a> extension
|
||||
* <li>{@code doctype} {@link AsciidoctorTask#options(Map) option} is configured.
|
||||
* <li>{@link AsciidoctorTask#attributes(Map) Attributes} are configured for syntax
|
||||
* highlighting, CSS styling, docinfo, etc.
|
||||
* </ul>
|
||||
* <li>For each {@link AbstractAsciidoctorTask} (HTML and PDF):
|
||||
* <ul>
|
||||
* <li>{@link AsciidoctorTask#attributes(Map) Attributes} are configured to enable
|
||||
* warnings for references to missing attributes, the year is added as @{code today-year},
|
||||
* etc
|
||||
* <li>{@link AbstractAsciidoctorTask#baseDirFollowsSourceDir() baseDirFollowsSourceDir()}
|
||||
* is enabled.
|
||||
* </ul>
|
||||
* </ul>
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @author Rob Winch
|
||||
*/
|
||||
public class AsciidoctorConventionPlugin implements Plugin<Project> {
|
||||
|
||||
public void apply(Project project) {
|
||||
project.getPlugins().withType(AsciidoctorJPlugin.class, (asciidoctorPlugin) -> {
|
||||
createDefaultAsciidoctorRepository(project);
|
||||
makeAllWarningsFatal(project);
|
||||
Sync unzipResources = createUnzipDocumentationResourcesTask(project);
|
||||
project.getTasks().withType(AbstractAsciidoctorTask.class, (asciidoctorTask) -> {
|
||||
asciidoctorTask.dependsOn(unzipResources);
|
||||
configureExtensions(project, asciidoctorTask);
|
||||
configureCommonAttributes(project, asciidoctorTask);
|
||||
configureOptions(asciidoctorTask);
|
||||
asciidoctorTask.baseDirFollowsSourceDir();
|
||||
asciidoctorTask.useIntermediateWorkDir();
|
||||
asciidoctorTask.resources(new Action<CopySpec>() {
|
||||
@Override
|
||||
public void execute(CopySpec resourcesSpec) {
|
||||
resourcesSpec.from(unzipResources);
|
||||
resourcesSpec.from(asciidoctorTask.getSourceDir(), new Action<CopySpec>() {
|
||||
@Override
|
||||
public void execute(CopySpec resourcesSrcDirSpec) {
|
||||
// https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/523
|
||||
// For now copy the entire sourceDir over so that include files are
|
||||
// available in the intermediateWorkDir
|
||||
// resourcesSrcDirSpec.include("images/**");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (asciidoctorTask instanceof AsciidoctorTask) {
|
||||
configureHtmlOnlyAttributes(project, asciidoctorTask);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private void createDefaultAsciidoctorRepository(Project project) {
|
||||
project.getGradle().afterProject(new Action<Project>() {
|
||||
@Override
|
||||
public void execute(Project project) {
|
||||
RepositoryHandler repositories = project.getRepositories();
|
||||
if (repositories.isEmpty()) {
|
||||
repositories.mavenCentral();
|
||||
repositories.maven(repo -> {
|
||||
repo.setUrl(URI.create("https://repo.spring.io/release"));
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void makeAllWarningsFatal(Project project) {
|
||||
project.getExtensions().getByType(AsciidoctorJExtension.class).fatalWarnings(".*");
|
||||
}
|
||||
|
||||
private void configureExtensions(Project project, AbstractAsciidoctorTask asciidoctorTask) {
|
||||
Configuration extensionsConfiguration = project.getConfigurations().maybeCreate("asciidoctorExtensions");
|
||||
extensionsConfiguration.defaultDependencies(new Action<DependencySet>() {
|
||||
@Override
|
||||
public void execute(DependencySet dependencies) {
|
||||
dependencies.add(project.getDependencies().create("io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch:0.4.2.RELEASE"));
|
||||
}
|
||||
});
|
||||
asciidoctorTask.configurations(extensionsConfiguration);
|
||||
}
|
||||
|
||||
private Sync createUnzipDocumentationResourcesTask(Project project) {
|
||||
Configuration documentationResources = project.getConfigurations().maybeCreate("documentationResources");
|
||||
documentationResources.getDependencies()
|
||||
.add(project.getDependencies().create("io.spring.docresources:spring-doc-resources:0.2.5"));
|
||||
Sync unzipResources = project.getTasks().create("unzipDocumentationResources",
|
||||
Sync.class, new Action<Sync>() {
|
||||
@Override
|
||||
public void execute(Sync sync) {
|
||||
sync.dependsOn(documentationResources);
|
||||
sync.from(new Callable<List<FileTree>>() {
|
||||
@Override
|
||||
public List<FileTree> call() throws Exception {
|
||||
List<FileTree> result = new ArrayList<>();
|
||||
documentationResources.getAsFileTree().forEach(new Consumer<File>() {
|
||||
@Override
|
||||
public void accept(File file) {
|
||||
result.add(project.zipTree(file));
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
});
|
||||
File destination = new File(project.getBuildDir(), "docs/resources");
|
||||
sync.into(project.relativePath(destination));
|
||||
}
|
||||
});
|
||||
return unzipResources;
|
||||
}
|
||||
|
||||
private void configureOptions(AbstractAsciidoctorTask asciidoctorTask) {
|
||||
asciidoctorTask.options(Collections.singletonMap("doctype", "book"));
|
||||
}
|
||||
|
||||
private void configureHtmlOnlyAttributes(Project project, AbstractAsciidoctorTask asciidoctorTask) {
|
||||
Map<String, Object> attributes = new HashMap<>();
|
||||
attributes.put("source-highlighter", "highlight.js");
|
||||
attributes.put("highlightjsdir", "js/highlight");
|
||||
attributes.put("highlightjs-theme", "github");
|
||||
attributes.put("linkcss", true);
|
||||
attributes.put("icons", "font");
|
||||
attributes.put("stylesheet", "css/spring.css");
|
||||
asciidoctorTask.getAttributeProviders().add(new AsciidoctorAttributeProvider() {
|
||||
@Override
|
||||
public Map<String, Object> getAttributes() {
|
||||
Object version = project.getVersion();
|
||||
Map<String, Object> attrs = new HashMap<>();
|
||||
if (version != null && version.toString() != Project.DEFAULT_VERSION) {
|
||||
attrs.put("revnumber", version);
|
||||
}
|
||||
return attrs;
|
||||
}
|
||||
});
|
||||
asciidoctorTask.attributes(attributes);
|
||||
}
|
||||
|
||||
private void configureCommonAttributes(Project project, AbstractAsciidoctorTask asciidoctorTask) {
|
||||
Map<String, Object> attributes = new HashMap<>();
|
||||
attributes.put("attribute-missing", "warn");
|
||||
attributes.put("icons", "font");
|
||||
attributes.put("idprefix", "");
|
||||
attributes.put("idseparator", "-");
|
||||
attributes.put("docinfo", "shared");
|
||||
attributes.put("sectanchors", "");
|
||||
attributes.put("sectnums", "");
|
||||
attributes.put("today-year", LocalDate.now().getYear());
|
||||
asciidoctorTask.attributes(attributes);
|
||||
}
|
||||
}
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package org.springframework.gradle.propdeps
|
||||
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.plugins.ide.eclipse.EclipsePlugin
|
||||
|
||||
/**
|
||||
* Plugin to allow optional and provided dependency configurations to work with the
|
||||
* standard gradle 'eclipse' plugin
|
||||
*
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
class PropDepsEclipsePlugin implements Plugin<Project> {
|
||||
|
||||
public void apply(Project project) {
|
||||
project.plugins.apply(PropDepsPlugin)
|
||||
project.plugins.apply(EclipsePlugin)
|
||||
|
||||
project.eclipse {
|
||||
classpath {
|
||||
plusConfigurations += [project.configurations.provided, project.configurations.optional]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package org.springframework.gradle.propdeps
|
||||
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.plugins.ide.idea.IdeaPlugin
|
||||
|
||||
/**
|
||||
* Plugin to allow optional and provided dependency configurations to work with the
|
||||
* standard gradle 'idea' plugin
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Brian Clozel
|
||||
* @link https://youtrack.jetbrains.com/issue/IDEA-107046
|
||||
* @link https://youtrack.jetbrains.com/issue/IDEA-117668
|
||||
*/
|
||||
class PropDepsIdeaPlugin implements Plugin<Project> {
|
||||
|
||||
public void apply(Project project) {
|
||||
project.plugins.apply(PropDepsPlugin)
|
||||
project.plugins.apply(IdeaPlugin)
|
||||
project.idea.module {
|
||||
// IDEA internally deals with 4 scopes : COMPILE, TEST, PROVIDED, RUNTIME
|
||||
// but only PROVIDED seems to be picked up
|
||||
scopes.PROVIDED.plus += [project.configurations.provided]
|
||||
scopes.PROVIDED.plus += [project.configurations.optional]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package org.springframework.gradle.propdeps
|
||||
|
||||
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.Configuration
|
||||
import org.gradle.api.plugins.JavaLibraryPlugin
|
||||
import org.gradle.api.plugins.JavaPlugin
|
||||
import org.gradle.api.tasks.javadoc.Javadoc
|
||||
|
||||
/**
|
||||
* Plugin to allow 'optional' and 'provided' dependency configurations
|
||||
*
|
||||
* As stated in the maven documentation, provided scope "is only available on the compilation and test classpath,
|
||||
* and is not transitive".
|
||||
*
|
||||
* This plugin creates two new configurations, and each one:
|
||||
* <ul>
|
||||
* <li>is a parent of the compile configuration</li>
|
||||
* <li>is not visible, not transitive</li>
|
||||
* <li>all dependencies are excluded from the default configuration</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Brian Clozel
|
||||
* @author Rob Winch
|
||||
*
|
||||
* @see <a href="https://www.gradle.org/docs/current/userguide/java_plugin.html#N121CF">Maven documentation</a>
|
||||
* @see <a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope">Gradle configurations</a>
|
||||
* @see PropDepsEclipsePlugin
|
||||
* @see PropDepsIdeaPlugin
|
||||
*/
|
||||
class PropDepsPlugin implements Plugin<Project> {
|
||||
|
||||
public void apply(Project project) {
|
||||
project.plugins.apply(JavaPlugin)
|
||||
|
||||
Configuration provided = addConfiguration(project, "provided")
|
||||
Configuration optional = addConfiguration(project, "optional")
|
||||
|
||||
Javadoc javadoc = project.tasks.getByName(JavaPlugin.JAVADOC_TASK_NAME)
|
||||
javadoc.classpath = javadoc.classpath.plus(provided).plus(optional)
|
||||
}
|
||||
|
||||
private Configuration addConfiguration(Project project, String name) {
|
||||
Configuration configuration = project.configurations.create(name)
|
||||
configuration.extendsFrom(project.configurations.implementation)
|
||||
project.plugins.withType(JavaLibraryPlugin, {
|
||||
configuration.extendsFrom(project.configurations.api)
|
||||
})
|
||||
|
||||
project.sourceSets.all {
|
||||
compileClasspath += configuration
|
||||
runtimeClasspath += configuration
|
||||
}
|
||||
|
||||
return configuration
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -166,7 +166,7 @@ public class UpdateDependenciesExtension {
|
||||
}
|
||||
|
||||
public DependencyExcludes releaseCandidatesVersions() {
|
||||
this.actions.add(excludeVersionWithRegex("(?i).*?rc.*", "a release candidate version"));
|
||||
this.actions.add(excludeVersionWithRegex("(?i).*?rc\\d+.*", "a release candidate version"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package s101;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.gradle.api.DefaultTask;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
|
||||
public class S101Configure extends DefaultTask {
|
||||
@TaskAction
|
||||
public void configure() throws Exception {
|
||||
S101PluginExtension extension = getProject().getExtensions().getByType(S101PluginExtension.class);
|
||||
File buildDirectory = extension.getInstallationDirectory().get();
|
||||
File projectDirectory = extension.getConfigurationDirectory().get();
|
||||
S101Configurer configurer = new S101Configurer(getProject());
|
||||
configurer.configure(buildDirectory, projectDirectory);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,307 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package s101;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarInputStream;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.github.mustachejava.DefaultMustacheFactory;
|
||||
import com.github.mustachejava.Mustache;
|
||||
import com.github.mustachejava.MustacheFactory;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.logging.Logger;
|
||||
import org.gradle.api.tasks.SourceSet;
|
||||
import org.gradle.api.tasks.SourceSetContainer;
|
||||
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
public class S101Configurer {
|
||||
private static final Pattern VERSION = Pattern.compile("<local-project .* version=\"(.*?)\"");
|
||||
|
||||
private static final int BUFFER = 1024;
|
||||
private static final long TOOBIG = 0x10000000; // ~268M
|
||||
private static final int TOOMANY = 200;
|
||||
|
||||
private final MustacheFactory mustache = new DefaultMustacheFactory();
|
||||
private final Mustache hspTemplate;
|
||||
private final Mustache repositoryTemplate;
|
||||
|
||||
private final Path licenseDirectory;
|
||||
|
||||
private final Project project;
|
||||
private final Logger logger;
|
||||
|
||||
public S101Configurer(Project project) {
|
||||
this.project = project;
|
||||
this.logger = project.getLogger();
|
||||
Resource template = new ClassPathResource("s101/project.java.hsp");
|
||||
try (InputStream is = template.getInputStream()) {
|
||||
this.hspTemplate = this.mustache.compile(new InputStreamReader(is), "project");
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedIOException(ex);
|
||||
}
|
||||
template = new ClassPathResource("s101/repository.xml");
|
||||
try (InputStream is = template.getInputStream()) {
|
||||
this.repositoryTemplate = this.mustache.compile(new InputStreamReader(is), "repository");
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedIOException(ex);
|
||||
}
|
||||
this.licenseDirectory = new File(System.getProperty("user.home") + "/.Structure101/java").toPath();
|
||||
}
|
||||
|
||||
public void license(String licenseId) {
|
||||
Path licenseFile = this.licenseDirectory.resolve(".structure101license.properties");
|
||||
if (needsLicense(licenseFile, licenseId)) {
|
||||
writeLicense(licenseFile, licenseId);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean needsLicense(Path licenseFile, String licenseId) {
|
||||
if (!licenseFile.toFile().exists()) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
String license = new String(Files.readAllBytes(licenseFile));
|
||||
return !license.contains(licenseId);
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void writeLicense(Path licenseFile, String licenseId) {
|
||||
if (!this.licenseDirectory.toFile().mkdirs()) {
|
||||
this.licenseDirectory.forEach((path) -> path.toFile().delete());
|
||||
}
|
||||
try (PrintWriter pw = new PrintWriter(licenseFile.toFile())) {
|
||||
pw.println("licensecode=" + licenseId);
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void install(File installationDirectory, File configurationDirectory) {
|
||||
deleteDirectory(installationDirectory);
|
||||
installBuildTool(installationDirectory, configurationDirectory);
|
||||
}
|
||||
|
||||
public void configure(File installationDirectory, File configurationDirectory) {
|
||||
deleteDirectory(configurationDirectory);
|
||||
String version = computeVersionFromInstallation(installationDirectory);
|
||||
configureProject(version, configurationDirectory);
|
||||
}
|
||||
|
||||
private String computeVersionFromInstallation(File installationDirectory) {
|
||||
File buildJar = new File(installationDirectory, "structure101-java-build.jar");
|
||||
try (JarInputStream input = new JarInputStream(new FileInputStream(buildJar))) {
|
||||
JarEntry entry;
|
||||
while ((entry = input.getNextJarEntry()) != null) {
|
||||
if (entry.getName().contains("structure101-build.properties")) {
|
||||
Properties properties = new Properties();
|
||||
properties.load(input);
|
||||
return properties.getProperty("s101-build");
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
throw new IllegalStateException("Unable to determine Structure101 version");
|
||||
}
|
||||
|
||||
private boolean deleteDirectory(File directoryToBeDeleted) {
|
||||
File[] allContents = directoryToBeDeleted.listFiles();
|
||||
if (allContents != null) {
|
||||
for (File file : allContents) {
|
||||
deleteDirectory(file);
|
||||
}
|
||||
}
|
||||
return directoryToBeDeleted.delete();
|
||||
}
|
||||
|
||||
private String installBuildTool(File installationDirectory, File configurationDirectory) {
|
||||
String source = "https://structure101.com/binaries/v6";
|
||||
try (final WebClient webClient = new WebClient()) {
|
||||
HtmlPage page = webClient.getPage(source);
|
||||
for (HtmlAnchor anchor : page.getAnchors()) {
|
||||
Matcher matcher = Pattern.compile("(structure101-build-java-all-)(.*).zip").matcher(anchor.getHrefAttribute());
|
||||
if (matcher.find()) {
|
||||
copyZipToFilesystem(source, installationDirectory, matcher.group(1) + matcher.group(2));
|
||||
return matcher.group(2);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} catch (Exception ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void copyZipToFilesystem(String source, File destination, String name) {
|
||||
try (ZipInputStream in = new ZipInputStream(new URL(source + "/" + name + ".zip").openStream())) {
|
||||
ZipEntry entry;
|
||||
String build = destination.getName();
|
||||
int entries = 0;
|
||||
long size = 0;
|
||||
while ((entry = in.getNextEntry()) != null) {
|
||||
if (entry.getName().equals(name + "/")) {
|
||||
destination.mkdirs();
|
||||
} else if (entry.getName().startsWith(name)) {
|
||||
if (entries++ > TOOMANY) {
|
||||
throw new IllegalArgumentException("Zip file has more entries than expected");
|
||||
}
|
||||
if (size + BUFFER > TOOBIG) {
|
||||
throw new IllegalArgumentException("Zip file is larger than expected");
|
||||
}
|
||||
String filename = entry.getName().replace(name, build);
|
||||
if (filename.contains("maven")) {
|
||||
continue;
|
||||
}
|
||||
if (filename.contains("jxbrowser")) {
|
||||
continue;
|
||||
}
|
||||
if (filename.contains("jetty")) {
|
||||
continue;
|
||||
}
|
||||
if (filename.contains("jfreechart")) {
|
||||
continue;
|
||||
}
|
||||
if (filename.contains("piccolo2d")) {
|
||||
continue;
|
||||
}
|
||||
if (filename.contains("plexus")) {
|
||||
continue;
|
||||
}
|
||||
if (filename.contains("websocket")) {
|
||||
continue;
|
||||
}
|
||||
validateFilename(filename, build);
|
||||
this.logger.info("Downloading " + filename);
|
||||
try (OutputStream out = new FileOutputStream(new File(destination.getParentFile(), filename))) {
|
||||
byte[] data = new byte[BUFFER];
|
||||
int read;
|
||||
while ((read = in.read(data, 0, BUFFER)) != -1 && TOOBIG - size >= read) {
|
||||
out.write(data, 0, read);
|
||||
size += read;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private String validateFilename(String filename, String intendedDir)
|
||||
throws java.io.IOException {
|
||||
File f = new File(filename);
|
||||
String canonicalPath = f.getCanonicalPath();
|
||||
|
||||
File iD = new File(intendedDir);
|
||||
String canonicalID = iD.getCanonicalPath();
|
||||
|
||||
if (canonicalPath.startsWith(canonicalID)) {
|
||||
return canonicalPath;
|
||||
} else {
|
||||
throw new IllegalArgumentException("File is outside extraction target directory.");
|
||||
}
|
||||
}
|
||||
|
||||
private void configureProject(String version, File configurationDirectory) {
|
||||
configurationDirectory.mkdirs();
|
||||
Map<String, Object> model = hspTemplateValues(version, configurationDirectory);
|
||||
copyToProject(this.hspTemplate, model, new File(configurationDirectory, "project.java.hsp"));
|
||||
copyToProject("s101/config.xml", new File(configurationDirectory, "config.xml"));
|
||||
File repository = new File(configurationDirectory, "repository");
|
||||
File snapshots = new File(repository, "snapshots");
|
||||
if (!snapshots.exists() && !snapshots.mkdirs()) {
|
||||
throw new IllegalStateException("Unable to create snapshots directory");
|
||||
}
|
||||
copyToProject(this.repositoryTemplate, model, new File(repository, "repository.xml"));
|
||||
}
|
||||
|
||||
private void copyToProject(String location, File destination) {
|
||||
Resource resource = new ClassPathResource(location);
|
||||
try (InputStream is = resource.getInputStream();
|
||||
OutputStream os = new FileOutputStream(destination)) {
|
||||
IOUtils.copy(is, os);
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedIOException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void copyToProject(Mustache view, Map<String, Object> model, File destination) {
|
||||
try (OutputStream os = new FileOutputStream(destination)) {
|
||||
view.execute(new OutputStreamWriter(os), model).flush();
|
||||
} catch (IOException ex) {
|
||||
throw new UncheckedIOException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, Object> hspTemplateValues(String version, File configurationDirectory) {
|
||||
Map<String, Object> values = new LinkedHashMap<>();
|
||||
values.put("version", version);
|
||||
values.put("patchVersion", version.split("\\.")[2]);
|
||||
values.put("relativeTo", "const(THIS_FILE)/" + configurationDirectory.toPath().relativize(this.project.getProjectDir().toPath()));
|
||||
|
||||
List<Map<String, Object>> entries = new ArrayList<>();
|
||||
Set<Project> projects = this.project.getAllprojects();
|
||||
for (Project p : projects) {
|
||||
SourceSetContainer sourceSets = (SourceSetContainer) p.getExtensions().findByName("sourceSets");
|
||||
if (sourceSets == null) {
|
||||
continue;
|
||||
}
|
||||
for (SourceSet source : sourceSets) {
|
||||
Set<File> classDirs = source.getOutput().getClassesDirs().getFiles();
|
||||
for (File directory : classDirs) {
|
||||
Map<String, Object> entry = new HashMap<>();
|
||||
entry.put("path", this.project.getProjectDir().toPath().relativize(directory.toPath()));
|
||||
entry.put("module", p.getName());
|
||||
entries.add(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
values.put("entries", entries);
|
||||
return values;
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package s101;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.gradle.api.DefaultTask;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
|
||||
public class S101Install extends DefaultTask {
|
||||
@TaskAction
|
||||
public void install() throws Exception {
|
||||
S101PluginExtension extension = getProject().getExtensions().getByType(S101PluginExtension.class);
|
||||
File installationDirectory = extension.getInstallationDirectory().get();
|
||||
File configurationDirectory = extension.getConfigurationDirectory().get();
|
||||
S101Configurer configurer = new S101Configurer(getProject());
|
||||
configurer.install(installationDirectory, configurationDirectory);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package s101;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
|
||||
import org.gradle.api.Plugin;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.provider.Property;
|
||||
import org.gradle.api.tasks.JavaExec;
|
||||
|
||||
public class S101Plugin implements Plugin<Project> {
|
||||
@Override
|
||||
public void apply(Project project) {
|
||||
project.getExtensions().add("s101", new S101PluginExtension(project));
|
||||
project.getTasks().register("s101Install", S101Install.class, this::configure);
|
||||
project.getTasks().register("s101Configure", S101Configure.class, this::configure);
|
||||
project.getTasks().register("s101", JavaExec.class, this::configure);
|
||||
}
|
||||
|
||||
private void configure(S101Install install) {
|
||||
install.setDescription("Installs Structure101 to your filesystem");
|
||||
}
|
||||
|
||||
private void configure(S101Configure configure) {
|
||||
configure.setDescription("Applies a default Structure101 configuration to the project");
|
||||
}
|
||||
|
||||
private void configure(JavaExec exec) {
|
||||
exec.setDescription("Runs Structure101 headless analysis, installing and configuring if necessary");
|
||||
exec.dependsOn("check");
|
||||
Project project = exec.getProject();
|
||||
S101PluginExtension extension = project.getExtensions().getByType(S101PluginExtension.class);
|
||||
exec
|
||||
.workingDir(extension.getInstallationDirectory())
|
||||
.classpath(new File(extension.getInstallationDirectory().get(), "structure101-java-build.jar"))
|
||||
.args(new File(new File(project.getBuildDir(), "s101"), "config.xml"))
|
||||
.systemProperty("s101.label", computeLabel(extension).get())
|
||||
.doFirst((task) -> {
|
||||
installAndConfigureIfNeeded(project);
|
||||
copyConfigurationToBuildDirectory(extension, project);
|
||||
})
|
||||
.doLast((task) -> {
|
||||
copyResultsBackToConfigurationDirectory(extension, project);
|
||||
});
|
||||
}
|
||||
|
||||
private Property<String> computeLabel(S101PluginExtension extension) {
|
||||
boolean hasBaseline = extension.getConfigurationDirectory().get().toPath()
|
||||
.resolve("repository").resolve("snapshots").resolve("baseline").toFile().exists();
|
||||
if (!hasBaseline) {
|
||||
return extension.getLabel().convention("baseline");
|
||||
}
|
||||
return extension.getLabel().convention("recent");
|
||||
}
|
||||
|
||||
private void installAndConfigureIfNeeded(Project project) {
|
||||
S101Configurer configurer = new S101Configurer(project);
|
||||
S101PluginExtension extension = project.getExtensions().getByType(S101PluginExtension.class);
|
||||
String licenseId = extension.getLicenseId().getOrNull();
|
||||
if (licenseId != null) {
|
||||
configurer.license(licenseId);
|
||||
}
|
||||
File installationDirectory = extension.getInstallationDirectory().get();
|
||||
File configurationDirectory = extension.getConfigurationDirectory().get();
|
||||
if (!installationDirectory.exists()) {
|
||||
configurer.install(installationDirectory, configurationDirectory);
|
||||
}
|
||||
if (!configurationDirectory.exists()) {
|
||||
configurer.configure(installationDirectory, configurationDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
private void copyConfigurationToBuildDirectory(S101PluginExtension extension, Project project) {
|
||||
Path configurationDirectory = extension.getConfigurationDirectory().get().toPath();
|
||||
Path buildDirectory = project.getBuildDir().toPath();
|
||||
copyDirectory(project, configurationDirectory, buildDirectory);
|
||||
}
|
||||
|
||||
private void copyResultsBackToConfigurationDirectory(S101PluginExtension extension, Project project) {
|
||||
Path buildConfigurationDirectory = project.getBuildDir().toPath().resolve("s101");
|
||||
String label = extension.getLabel().get();
|
||||
if ("baseline".equals(label)) { // a new baseline was created
|
||||
copyDirectory(project, buildConfigurationDirectory.resolve("repository").resolve("snapshots"),
|
||||
extension.getConfigurationDirectory().get().toPath().resolve("repository"));
|
||||
copyDirectory(project, buildConfigurationDirectory.resolve("repository"),
|
||||
extension.getConfigurationDirectory().get().toPath());
|
||||
}
|
||||
}
|
||||
|
||||
private void copyDirectory(Project project, Path source, Path destination) {
|
||||
try {
|
||||
Files.walk(source)
|
||||
.forEach(each -> {
|
||||
Path relativeToSource = source.getParent().relativize(each);
|
||||
Path resolvedDestination = destination.resolve(relativeToSource);
|
||||
if (each.toFile().isDirectory()) {
|
||||
resolvedDestination.toFile().mkdirs();
|
||||
return;
|
||||
}
|
||||
InputStream input;
|
||||
if ("project.java.hsp".equals(each.toFile().getName())) {
|
||||
Path relativeTo = project.getBuildDir().toPath().resolve("s101").relativize(project.getProjectDir().toPath());
|
||||
String value = "const(THIS_FILE)/" + relativeTo;
|
||||
input = replace(each, "<property name=\"relative-to\" value=\"(.*)\" />", "<property name=\"relative-to\" value=\"" + value + "\" />");
|
||||
} else if (each.toFile().toString().endsWith(".xml")) {
|
||||
input = replace(each, "\\r\\n", "\n");
|
||||
} else {
|
||||
input = input(each);
|
||||
}
|
||||
try {
|
||||
Files.copy(input, resolvedDestination, StandardCopyOption.REPLACE_EXISTING);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private InputStream replace(Path file, String search, String replace) {
|
||||
try {
|
||||
byte[] b = Files.readAllBytes(file);
|
||||
String contents = new String(b).replaceAll(search, replace);
|
||||
return new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private InputStream input(Path file) {
|
||||
try {
|
||||
return new FileInputStream(file.toFile());
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package s101;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.provider.Property;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.gradle.api.tasks.InputDirectory;
|
||||
|
||||
public class S101PluginExtension {
|
||||
private final Property<String> licenseId;
|
||||
private final Property<File> installationDirectory;
|
||||
private final Property<File> configurationDirectory;
|
||||
private final Property<String> label;
|
||||
|
||||
@Input
|
||||
public Property<String> getLicenseId() {
|
||||
return this.licenseId;
|
||||
}
|
||||
|
||||
public void setLicenseId(String licenseId) {
|
||||
this.licenseId.set(licenseId);
|
||||
}
|
||||
|
||||
@InputDirectory
|
||||
public Property<File> getInstallationDirectory() {
|
||||
return this.installationDirectory;
|
||||
}
|
||||
|
||||
public void setInstallationDirectory(String installationDirectory) {
|
||||
this.installationDirectory.set(new File(installationDirectory));
|
||||
}
|
||||
|
||||
@InputDirectory
|
||||
public Property<File> getConfigurationDirectory() {
|
||||
return this.configurationDirectory;
|
||||
}
|
||||
|
||||
public void setConfigurationDirectory(String configurationDirectory) {
|
||||
this.configurationDirectory.set(new File(configurationDirectory));
|
||||
}
|
||||
|
||||
@Input
|
||||
public Property<String> getLabel() {
|
||||
return this.label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label.set(label);
|
||||
}
|
||||
|
||||
public S101PluginExtension(Project project) {
|
||||
this.licenseId = project.getObjects().property(String.class);
|
||||
if (project.hasProperty("s101.licenseId")) {
|
||||
setLicenseId((String) project.findProperty("s101.licenseId"));
|
||||
}
|
||||
this.installationDirectory = project.getObjects().property(File.class)
|
||||
.convention(new File(project.getBuildDir(), "s101"));
|
||||
this.configurationDirectory = project.getObjects().property(File.class)
|
||||
.convention(new File(project.getProjectDir(), "s101"));
|
||||
this.label = project.getObjects().property(String.class);
|
||||
if (project.hasProperty("s101.label")) {
|
||||
setLabel((String) project.findProperty("s101.label"));
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
implementation-class=io.spring.gradle.convention.DependencySetPlugin
|
||||
-1
@@ -1 +0,0 @@
|
||||
implementation-class=io.spring.gradle.convention.IncludeCheckRemotePlugin
|
||||
+1
@@ -0,0 +1 @@
|
||||
implementation-class=io.spring.gradle.convention.OssrhPlugin
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<headless version="1.0">
|
||||
<operations>
|
||||
<operation type="publish">
|
||||
<argument name="overwrite" value="true"/>
|
||||
<argument name="diagrams" value="true"/>
|
||||
</operation>
|
||||
<operation type="check-key-measures">
|
||||
<argument name="baseline" value="baseline"/>
|
||||
<argument name="useProjectFileSpec" value="true"/>
|
||||
<argument name="useProjectFileDiagrams" value="true"/>
|
||||
<argument name="fail-on-architecture-violations" value="false"/>
|
||||
<argument name="fail-on-fat-package" value="false"/>
|
||||
<argument name="fail-on-fat-class" value="false"/>
|
||||
<argument name="fail-on-fat-method" value="false"/>
|
||||
<argument name="fail-on-feedback-dependencies" value="true"/>
|
||||
<argument name="fail-on-spec-violation-dependencies" value="false"/>
|
||||
<argument name="fail-on-total-problem-dependencies" value="false"/>
|
||||
<argument name="fail-on-spec-item-violations" value="false"/>
|
||||
<argument name="fail-on-biggest-class-tangle" value="true"/>
|
||||
<argument name="fail-on-tangled-package" value="true"/>
|
||||
<argument name="fail-on-architecture-violations" value="false"/>
|
||||
<argument name="fail-on-total-problem-dependencies" value="true"/>
|
||||
<argument name="identifier-on-violation" value="S101 key measure violation"/>
|
||||
</operation>
|
||||
</operations>
|
||||
<arguments>
|
||||
<argument name="local-project" value="const(THIS_FILE)/project.java.hsp"/>
|
||||
<argument name="repository" value="const(THIS_FILE)/repository"/>
|
||||
<argument name="project" value="snapshots"/>
|
||||
</arguments>
|
||||
</headless>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<local-project language="java" version="{{version}}" xml-version="3" flavor="j2se">
|
||||
<property name="show-as-module" value="false" />
|
||||
<property name="publish-architecture-artifacts" value="true" />
|
||||
<property name="force-classpath" value="false" />
|
||||
<property name="project-type" value="classpath" />
|
||||
<property name="hide-externals" value="true" />
|
||||
<property name="parse-archive-in-archive" value="false" />
|
||||
<property name="include-injected-dependency" value="false" />
|
||||
<property name="relative-to" value="{{relativeTo}}" />
|
||||
<property name="action-set-mod" value="1" />
|
||||
<property name="detail-mode" value="true" />
|
||||
<property name="hide-deprecated" value="false" />
|
||||
<property name="resolve-name-clashes" value="true" />
|
||||
<property name="project-excluded" />
|
||||
<property name="show-needs-to-compile" value="false" />
|
||||
<classpath>
|
||||
{{#entries}}
|
||||
<classpathentry kind="lib" path="{{path}}" module="{{module}}" />
|
||||
{{/entries}}
|
||||
</classpath>
|
||||
<pom-root-files />
|
||||
<modules-in-scope />
|
||||
<restructuring>
|
||||
<set version="3" name="Action list 1" hiview="Codemap" active="true" todo="false" list="0" />
|
||||
</restructuring>
|
||||
<grid-set sep="." version="{{version}}" />
|
||||
</local-project>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<structure101-repository language="java" version="{{patchVersion}}">
|
||||
<xs-configuration>
|
||||
<entry metric="Tangled" scope="design" threshold="0" color="153,53,0" />
|
||||
<entry metric="Fat" scope="design" threshold="120" color="255,153,0" />
|
||||
<entry metric="Fat" scope="leaf package" threshold="120" color="0,153,153" />
|
||||
<entry metric="Fat" scope="class" threshold="120" color="255,153,153" />
|
||||
<entry metric="Fat" scope="method" threshold="15" color="51,255,51" />
|
||||
</xs-configuration>
|
||||
<!--Note: All date strings are stored in short US format e.g. 2/1/06 for 1st Feb 2006-->
|
||||
<project name="snapshots" dir="snapshots" baselineSnapshot="default" version="{{patchVersion}}">
|
||||
<snapshot label="baseline" location="baseline" timestamp="3/16/21, 4:42 PM" version="{{patchVersion}}" detail="true" good="true" size="20" />
|
||||
</project>
|
||||
</structure101-repository>
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2002-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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import io.spring.gradle.testkit.junit.rules.TestKit
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.junit.Rule
|
||||
import spock.lang.Specification
|
||||
|
||||
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
|
||||
|
||||
class DependencySetPluginITest extends Specification {
|
||||
@Rule final TestKit testKit = new TestKit()
|
||||
|
||||
def "dependencies"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/dependencyset")
|
||||
.withArguments('dependencies')
|
||||
.build();
|
||||
then:
|
||||
result.task(":dependencies").outcome == SUCCESS
|
||||
!result.output.contains("FAILED")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright 2002-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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import io.spring.gradle.testkit.junit.rules.TestKit
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.junit.Rule
|
||||
import spock.lang.Specification
|
||||
|
||||
import java.util.zip.ZipFile
|
||||
|
||||
import static org.gradle.testkit.runner.TaskOutcome.FAILED
|
||||
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
|
||||
|
||||
class DocsPluginITest extends Specification {
|
||||
@Rule final TestKit testKit = new TestKit()
|
||||
|
||||
def "build triggers docs"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/docs/simple/")
|
||||
.withArguments('build')
|
||||
.build();
|
||||
then:
|
||||
result.task(":build").outcome == SUCCESS
|
||||
and:
|
||||
result.task(":docs").outcome == SUCCESS
|
||||
and:
|
||||
result.task(":docsZip").outcome == SUCCESS
|
||||
and:
|
||||
def zip = new File(testKit.getRootDir(), 'build/distributions/simple-1.0.0.BUILD-SNAPSHOT-docs.zip')
|
||||
def names = new ZipFile(zip).entries()*.name
|
||||
names.contains("docs/reference/html5/index.html")
|
||||
names.contains("docs/reference/pdf/simple-reference.pdf")
|
||||
}
|
||||
|
||||
def "asciidoc copies images"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/docs/simple/")
|
||||
.withArguments('asciidoctor')
|
||||
.build();
|
||||
then:
|
||||
result.task(":asciidoctor").outcome == SUCCESS
|
||||
new File(testKit.getRootDir(), "build/docs/asciidoc/images").exists()
|
||||
}
|
||||
|
||||
def "asciidoc docinfo from resources used"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/docs/simple/")
|
||||
.withArguments('asciidoctor')
|
||||
.build();
|
||||
then:
|
||||
result.task(":asciidoctor").outcome == SUCCESS
|
||||
new File(testKit.getRootDir(), "build/docs/asciidoc/index.html").getText().contains("""<script type="text/javascript" src="js/tocbot/tocbot.min.js"></script>""")
|
||||
}
|
||||
|
||||
def "missing attribute fails"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/docs/missing-attribute/")
|
||||
.withArguments(':asciidoctor')
|
||||
.buildAndFail();
|
||||
then:
|
||||
result.task(":asciidoctor").outcome == FAILED
|
||||
}
|
||||
|
||||
def "missing include"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/docs/missing-include/")
|
||||
.withArguments(':asciidoctor')
|
||||
.buildAndFail();
|
||||
then:
|
||||
result.task(":asciidoctor").outcome == FAILED
|
||||
}
|
||||
|
||||
def "missing cross reference"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/docs/missing-cross-reference/")
|
||||
.withArguments(':asciidoctor')
|
||||
.buildAndFail();
|
||||
then:
|
||||
result.task(":asciidoctor").outcome == FAILED
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2016-2018 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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import io.spring.gradle.testkit.junit.rules.TestKit
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.junit.Rule
|
||||
import spock.lang.Specification
|
||||
|
||||
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
|
||||
|
||||
class IntegrationTestPluginITest extends Specification {
|
||||
@Rule final TestKit testKit = new TestKit()
|
||||
|
||||
def "check with java plugin"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/integrationtest/withjava/")
|
||||
.withArguments('check')
|
||||
.build();
|
||||
then:
|
||||
result.task(":check").outcome == SUCCESS
|
||||
and:
|
||||
new File(testKit.getRootDir(), 'build/test-results/integrationTest/').exists()
|
||||
new File(testKit.getRootDir(), 'build/reports/tests/integrationTest/').exists()
|
||||
}
|
||||
|
||||
def "check with propdeps"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/integrationtest/withpropdeps/")
|
||||
.withArguments('check')
|
||||
.build();
|
||||
then:
|
||||
result.task(":check").outcome == SUCCESS
|
||||
and:
|
||||
new File(testKit.getRootDir(), 'build/test-results/integrationTest/').exists()
|
||||
new File(testKit.getRootDir(), 'build/reports/tests/integrationTest/').exists()
|
||||
}
|
||||
|
||||
def "check with groovy plugin"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/integrationtest/withgroovy/")
|
||||
.withArguments('check')
|
||||
.build();
|
||||
then:
|
||||
result.task(":check").outcome == SUCCESS
|
||||
and:
|
||||
new File(testKit.getRootDir(), 'build/test-results/integrationTest/').exists()
|
||||
new File(testKit.getRootDir(), 'build/reports/tests/integrationTest/').exists()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2002-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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import io.spring.gradle.testkit.junit.rules.TestKit
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.junit.Rule
|
||||
import spock.lang.Specification
|
||||
|
||||
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
|
||||
|
||||
class JacocoPluginITest extends Specification {
|
||||
@Rule final TestKit testKit = new TestKit()
|
||||
|
||||
def "check with java plugin"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/jacoco/java/")
|
||||
.withArguments('check')
|
||||
.build();
|
||||
then:
|
||||
result.task(":check").outcome == SUCCESS
|
||||
and:
|
||||
new File(testKit.getRootDir(), 'build/jacoco').exists()
|
||||
new File(testKit.getRootDir(), 'build/reports/jacoco/test/html/').exists()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2002-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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.gradle.testkit.runner.GradleRunner
|
||||
import org.junit.Rule
|
||||
import org.junit.rules.TemporaryFolder
|
||||
import spock.lang.Specification
|
||||
|
||||
import static org.gradle.testkit.runner.TaskOutcome.*;
|
||||
|
||||
import io.spring.gradle.testkit.junit.rules.TestKit
|
||||
import org.apache.commons.io.FileUtils
|
||||
|
||||
class JavadocApiPluginITest extends Specification {
|
||||
@Rule final TestKit testKit = new TestKit()
|
||||
|
||||
def "multimodule api"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/javadocapi/multimodule/")
|
||||
.withArguments('api')
|
||||
.build();
|
||||
then:
|
||||
result.task(":api").outcome == SUCCESS
|
||||
and:
|
||||
File allClasses = new File(testKit.getRootDir(), 'build/api/allclasses-noframe.html');
|
||||
File index = new File(testKit.getRootDir(), 'build/api/allclasses.html');
|
||||
new File(testKit.getRootDir(), "build/api/").listFiles().each { println it }
|
||||
File listing = allClasses.exists() ? allClasses : index
|
||||
listing.text.contains('sample/Api.html')
|
||||
listing.text.contains('sample/Impl.html')
|
||||
!listing.text.contains('sample/Sample.html')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* Copyright 2016-2019 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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import io.spring.gradle.testkit.junit.rules.TestKit
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.gradle.testkit.runner.TaskOutcome
|
||||
import org.junit.Rule
|
||||
import spock.lang.Ignore
|
||||
import spock.lang.Specification
|
||||
|
||||
class ShowcaseITest extends Specification {
|
||||
|
||||
@Rule final TestKit testKit = new TestKit()
|
||||
|
||||
def "build"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/showcase/")
|
||||
.withArguments('build','--stacktrace')
|
||||
.forwardOutput()
|
||||
.build();
|
||||
then: 'entire build passes'
|
||||
result.output.contains("BUILD SUCCESSFUL")
|
||||
}
|
||||
|
||||
@Ignore
|
||||
def "install"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/showcase/")
|
||||
.withArguments('install','--stacktrace')
|
||||
.build();
|
||||
then:
|
||||
result.output.contains("SUCCESS")
|
||||
|
||||
and: 'pom exists'
|
||||
File pom = new File(testKit.getRootDir(), 'sgbcs-core/build/poms/pom-default.xml')
|
||||
pom.exists()
|
||||
String pomText = pom.getText()
|
||||
|
||||
and: 'pom does not contain <dependencyManagement>'
|
||||
!pomText.contains('<dependencyManagement>')
|
||||
|
||||
and: 'creates optional dependencies correctly'
|
||||
pomText.replaceAll('\\s','').contains("""<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<version>4.3.6.RELEASE</version>
|
||||
</dependency>""".replaceAll('\\s',''))
|
||||
|
||||
and: 'adds author'
|
||||
pomText.replaceAll('\\s','').contains("""<developers>
|
||||
<developer>
|
||||
<id>rwinch</id>
|
||||
<name>Rob Winch</name>
|
||||
<email>rwinch@pivotal.io</email>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jgrandja</id>
|
||||
<name>Joe Grandja</name>
|
||||
<email>jgrandja@pivotal.io</email>
|
||||
</developer>
|
||||
</developers>""".replaceAll('\\s',''))
|
||||
|
||||
and: 'adds repositories'
|
||||
pomText.replaceAll('\\s','').contains("""<scm>
|
||||
<connection>scm:git:git://github.com/spring-projects/spring-security</connection>
|
||||
<developerConnection>scm:git:git://github.com/spring-projects/spring-security</developerConnection>
|
||||
<url>https://github.com/spring-projects/spring-security</url>
|
||||
</scm>""".replaceAll('\\s',''))
|
||||
|
||||
and: 'adds description & url'
|
||||
pomText.contains('<description>sgbcs-core</description>')
|
||||
pomText.contains('<url>https://spring.io/spring-security</url>')
|
||||
|
||||
and: 'adds organization'
|
||||
pomText.replaceAll('\\s','').contains('''<organization>
|
||||
<name>spring.io</name>
|
||||
<url>https://spring.io/</url>
|
||||
</organization>'''.replaceAll('\\s',''))
|
||||
|
||||
and: 'adds licenses'
|
||||
pomText.replaceAll('\\s','').contains(''' <licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>'''.replaceAll('\\s',''))
|
||||
|
||||
and: 'adds scm'
|
||||
pomText.replaceAll('\\s','').replaceAll('\\s','').contains("""<scm>
|
||||
<connection>scm:git:git://github.com/spring-projects/spring-security</connection>
|
||||
<developerConnection>scm:git:git://github.com/spring-projects/spring-security</developerConnection>
|
||||
<url>https://github.com/spring-projects/spring-security</url>
|
||||
</scm>""".replaceAll('\\s',''))
|
||||
|
||||
and: 'bom created'
|
||||
File bom = new File(testKit.getRootDir(), 'bom/build/poms/pom-default.xml')
|
||||
bom.exists()
|
||||
String bomText = bom.getText()
|
||||
bomText.contains("""<artifactId>sgbcs-core</artifactId>""")
|
||||
|
||||
when: 'mavenBom ran again'
|
||||
result = testKit.withProjectResource("samples/showcase/")
|
||||
.withArguments('mavenBom','--stacktrace')
|
||||
.build();
|
||||
then: 'mavenBom is not up to date since install is never up to date'
|
||||
result.task(':bom:mavenBom').getOutcome() == TaskOutcome.SUCCESS
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright 2016-2019 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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import io.spring.gradle.testkit.junit.rules.TestKit
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.junit.Rule
|
||||
import spock.lang.Ignore
|
||||
import spock.lang.Specification
|
||||
|
||||
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
|
||||
|
||||
class SpringMavenPluginITest extends Specification {
|
||||
|
||||
@Rule final TestKit testKit = new TestKit()
|
||||
|
||||
@Ignore
|
||||
def "install"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/maven/install")
|
||||
.withArguments('install')
|
||||
.build();
|
||||
then: 'pom contains optional'
|
||||
result.output.contains("SUCCESS")
|
||||
File pom = new File(testKit.getRootDir(), 'build/poms/pom-default.xml')
|
||||
pom.exists()
|
||||
String pomText = pom.getText()
|
||||
pomText.replaceAll('\\s','').contains("""<dependency>
|
||||
<groupId>aopalliance</groupId>
|
||||
<artifactId>aopalliance</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>""".replaceAll('\\s',''))
|
||||
}
|
||||
|
||||
@Ignore
|
||||
def "signArchives when in memory"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/maven/signing")
|
||||
.withArguments('signArchives')
|
||||
.withEnvironment(["ORG_GRADLE_PROJECT_signingKey" : signingKey,
|
||||
"ORG_GRADLE_PROJECT_signingPassword" : "password"])
|
||||
.forwardOutput()
|
||||
.build();
|
||||
then:
|
||||
result.output.contains("SUCCESS")
|
||||
File jar = new File(testKit.getRootDir(), 'build/libs/signing-1.0.0.RELEASE.jar')
|
||||
jar.exists()
|
||||
File signature = new File("${jar.absolutePath}.asc")
|
||||
signature.exists()
|
||||
}
|
||||
|
||||
def "upload"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/maven/upload")
|
||||
.withArguments('uploadArchives')
|
||||
.forwardOutput()
|
||||
.build();
|
||||
then: 'pom contains optional'
|
||||
result.output.contains("SUCCESS")
|
||||
File pom = new File(testKit.getRootDir(), 'build/poms/pom-default.xml')
|
||||
pom.exists()
|
||||
String pomText = pom.getText()
|
||||
pomText.replaceAll('\\s','').contains("""<dependency>
|
||||
<groupId>aopalliance</groupId>
|
||||
<artifactId>aopalliance</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>""".replaceAll('\\s',''))
|
||||
}
|
||||
|
||||
def getSigningKey() {
|
||||
getClass().getResource("/test-private.pgp").text
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2002-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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
package io.spring.gradle.convention
|
||||
|
||||
import io.spring.gradle.testkit.junit.rules.TestKit
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.junit.Rule
|
||||
import spock.lang.Specification
|
||||
|
||||
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
|
||||
|
||||
class TestsConfigurationPluginITest extends Specification {
|
||||
@Rule final TestKit testKit = new TestKit()
|
||||
|
||||
def "can find dependency"() {
|
||||
when:
|
||||
BuildResult result = testKit.withProjectResource("samples/testsconfiguration")
|
||||
.withArguments('check')
|
||||
.build();
|
||||
then:
|
||||
result.task(":web:check").outcome == SUCCESS
|
||||
}
|
||||
}
|
||||
+27
-10
@@ -13,25 +13,42 @@
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package io.spring.gradle;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.gradle.testkit.runner.GradleRunner;
|
||||
import org.junit.runner.Description;
|
||||
import org.junit.runners.model.Statement;
|
||||
package io.spring.gradle.testkit.junit.rules;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Enumeration;
|
||||
|
||||
public class TestKit {
|
||||
final File buildDir;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.gradle.testkit.runner.GradleRunner;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.junit.rules.TestRule;
|
||||
import org.junit.runner.Description;
|
||||
import org.junit.runners.model.Statement;
|
||||
|
||||
public TestKit(File buildDir) {
|
||||
this.buildDir = buildDir;
|
||||
public class TestKit implements TestRule {
|
||||
final TemporaryFolder testProjectDir = new TemporaryFolder();
|
||||
File buildDir;
|
||||
|
||||
@Override
|
||||
public Statement apply(Statement base, Description description) {
|
||||
Statement wrapped = new Statement() {
|
||||
|
||||
@Override
|
||||
public void evaluate() throws Throwable {
|
||||
try {
|
||||
buildDir = testProjectDir.newFolder();
|
||||
} catch(IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
base.evaluate();
|
||||
}
|
||||
};
|
||||
return testProjectDir.apply(wrapped, description);
|
||||
}
|
||||
|
||||
public File getRootDir() {
|
||||
@@ -1,111 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2021 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. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* https://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.
|
||||
*/
|
||||
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import io.spring.gradle.IncludeRepoTask;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.tasks.GradleBuild;
|
||||
import org.gradle.testfixtures.ProjectBuilder;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class IncludeCheckRemotePluginTest {
|
||||
|
||||
Project rootProject;
|
||||
|
||||
@AfterEach
|
||||
public void cleanup() throws Exception {
|
||||
if (rootProject != null) {
|
||||
FileUtils.deleteDirectory(rootProject.getProjectDir());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void applyWhenExtensionPropertiesNoTasksThenCreateCheckRemoteTaskWithDefaultTask() {
|
||||
this.rootProject = ProjectBuilder.builder().build();
|
||||
this.rootProject.getPluginManager().apply(IncludeCheckRemotePlugin.class);
|
||||
this.rootProject.getExtensions().configure(IncludeCheckRemotePlugin.IncludeCheckRemoteExtension.class,
|
||||
(includeCheckRemoteExtension) -> {
|
||||
includeCheckRemoteExtension.setProperty("repository", "my-project/my-repository");
|
||||
includeCheckRemoteExtension.setProperty("ref", "main");
|
||||
});
|
||||
|
||||
GradleBuild checkRemote = (GradleBuild) this.rootProject.getTasks().named("checkRemote").get();
|
||||
assertThat(checkRemote.getTasks()).containsExactly("check");
|
||||
}
|
||||
|
||||
@Test
|
||||
void applyWhenExtensionPropertiesTasksThenCreateCheckRemoteWithProvidedTasks() {
|
||||
this.rootProject = ProjectBuilder.builder().build();
|
||||
this.rootProject.getPluginManager().apply(IncludeCheckRemotePlugin.class);
|
||||
this.rootProject.getExtensions().configure(IncludeCheckRemotePlugin.IncludeCheckRemoteExtension.class,
|
||||
(includeCheckRemoteExtension) -> {
|
||||
includeCheckRemoteExtension.setProperty("repository", "my-project/my-repository");
|
||||
includeCheckRemoteExtension.setProperty("ref", "main");
|
||||
includeCheckRemoteExtension.setProperty("tasks", Arrays.asList("clean", "build", "test"));
|
||||
});
|
||||
|
||||
GradleBuild checkRemote = (GradleBuild) this.rootProject.getTasks().named("checkRemote").get();
|
||||
assertThat(checkRemote.getTasks()).containsExactly("clean", "build", "test");
|
||||
}
|
||||
|
||||
@Test
|
||||
void applyWhenExtensionPropertiesThenRegisterIncludeRepoTaskWithExtensionProperties() {
|
||||
this.rootProject = ProjectBuilder.builder().build();
|
||||
this.rootProject.getPluginManager().apply(IncludeCheckRemotePlugin.class);
|
||||
this.rootProject.getExtensions().configure(IncludeCheckRemotePlugin.IncludeCheckRemoteExtension.class,
|
||||
(includeCheckRemoteExtension) -> {
|
||||
includeCheckRemoteExtension.setProperty("repository", "my-project/my-repository");
|
||||
includeCheckRemoteExtension.setProperty("ref", "main");
|
||||
});
|
||||
|
||||
IncludeRepoTask includeRepo = (IncludeRepoTask) this.rootProject.getTasks().named("includeRepo").get();
|
||||
assertThat(includeRepo).isNotNull();
|
||||
assertThat(includeRepo.getRepository().get()).isEqualTo("my-project/my-repository");
|
||||
assertThat(includeRepo.getRef().get()).isEqualTo("main");
|
||||
}
|
||||
|
||||
@Test
|
||||
void applyWhenRegisterTasksThenCheckRemoteDirSameAsIncludeRepoOutputDir() {
|
||||
this.rootProject = ProjectBuilder.builder().build();
|
||||
this.rootProject.getPluginManager().apply(IncludeCheckRemotePlugin.class);
|
||||
this.rootProject.getExtensions().configure(IncludeCheckRemotePlugin.IncludeCheckRemoteExtension.class,
|
||||
(includeCheckRemoteExtension) -> {
|
||||
includeCheckRemoteExtension.setProperty("repository", "my-project/my-repository");
|
||||
includeCheckRemoteExtension.setProperty("ref", "main");
|
||||
});
|
||||
IncludeRepoTask includeRepo = (IncludeRepoTask) this.rootProject.getTasks().named("includeRepo").get();
|
||||
GradleBuild checkRemote = (GradleBuild) this.rootProject.getTasks().named("checkRemote").get();
|
||||
assertThat(checkRemote.getDir()).isEqualTo(includeRepo.getOutputDirectory());
|
||||
}
|
||||
|
||||
@Test
|
||||
void applyWhenNoExtensionPropertiesThenRegisterTasks() {
|
||||
this.rootProject = ProjectBuilder.builder().build();
|
||||
this.rootProject.getPluginManager().apply(IncludeCheckRemotePlugin.class);
|
||||
IncludeRepoTask includeRepo = (IncludeRepoTask) this.rootProject.getTasks().named("includeRepo").get();
|
||||
GradleBuild checkRemote = (GradleBuild) this.rootProject.getTasks().named("checkRemote").get();
|
||||
assertThat(includeRepo).isNotNull();
|
||||
assertThat(checkRemote).isNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,9 +19,10 @@ package io.spring.gradle.convention;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.plugins.JavaPlugin;
|
||||
import org.gradle.api.tasks.javadoc.Javadoc;
|
||||
import org.gradle.testfixtures.ProjectBuilder;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -33,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
public class IntegrationPluginTest {
|
||||
Project rootProject;
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void cleanup() throws Exception {
|
||||
if (rootProject != null) {
|
||||
FileUtils.deleteDirectory(rootProject.getProjectDir());
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import io.spring.gradle.TestKit;
|
||||
import org.gradle.testkit.runner.BuildResult;
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class IntegrationTestPluginITest {
|
||||
private io.spring.gradle.TestKit testKit;
|
||||
|
||||
@BeforeEach
|
||||
void setup(@TempDir Path tempDir) {
|
||||
this.testKit = new TestKit(tempDir.toFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkWithJavaPlugin() throws Exception {
|
||||
BuildResult result = this.testKit.withProjectResource("samples/integrationtest/withjava/")
|
||||
.withArguments("check")
|
||||
.build();
|
||||
assertThat(result.task(":check").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
assertThat(new File(testKit.getRootDir(), "build/test-results/integrationTest/")).exists();
|
||||
assertThat(new File(testKit.getRootDir(), "build/reports/tests/integrationTest/")).exists();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkWithPropdeps() throws Exception {
|
||||
BuildResult result = this.testKit.withProjectResource("samples/integrationtest/withpropdeps/")
|
||||
.withArguments("check")
|
||||
.build();
|
||||
assertThat(result.task(":check").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
assertThat(new File(testKit.getRootDir(), "build/test-results/integrationTest/")).exists();
|
||||
assertThat(new File(testKit.getRootDir(), "build/reports/tests/integrationTest/")).exists();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkWithGroovy() throws Exception {
|
||||
BuildResult result = this.testKit.withProjectResource("samples/integrationtest/withgroovy/")
|
||||
.withArguments("check")
|
||||
.build();
|
||||
assertThat(result.task(":check").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
assertThat(new File(testKit.getRootDir(), "build/test-results/integrationTest/")).exists();
|
||||
assertThat(new File(testKit.getRootDir(), "build/reports/tests/integrationTest/")).exists();
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import org.gradle.testkit.runner.BuildResult;
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class JacocoPluginITest{
|
||||
private io.spring.gradle.TestKit testKit;
|
||||
|
||||
@BeforeEach
|
||||
void setup(@TempDir Path tempDir) {
|
||||
this.testKit = new io.spring.gradle.TestKit(tempDir.toFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkWithJavaPlugin() throws Exception {
|
||||
BuildResult result = this.testKit.withProjectResource("samples/jacoco/java/")
|
||||
.withArguments("check")
|
||||
.build();
|
||||
assertThat(result.task(":check").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
assertThat(new File(testKit.getRootDir(), "build/jacoco")).exists();
|
||||
assertThat(new File(testKit.getRootDir(), "build/reports/jacoco/test/html/")).exists();
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import io.spring.gradle.TestKit;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.gradle.testkit.runner.BuildResult;
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class JavadocApiPluginITest {
|
||||
private TestKit testKit;
|
||||
|
||||
@BeforeEach
|
||||
void setup(@TempDir Path tempDir) {
|
||||
this.testKit = new TestKit(tempDir.toFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multiModuleApi() throws Exception {
|
||||
BuildResult result = this.testKit.withProjectResource("samples/javadocapi/multimodule/")
|
||||
.withArguments("api")
|
||||
.build();
|
||||
assertThat(result.task(":api").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
File allClasses = new File(testKit.getRootDir(), "build/api/allclasses-noframe.html");
|
||||
File index = new File(testKit.getRootDir(), "build/api/allclasses.html");
|
||||
File listing = allClasses.exists() ? allClasses : index;
|
||||
String listingText = FileUtils.readFileToString(listing);
|
||||
assertThat(listingText).contains("sample/Api.html");
|
||||
assertThat(listingText).contains("sample/Impl.html");
|
||||
assertThat(listingText).doesNotContain("sample/Sample.html");
|
||||
}
|
||||
}
|
||||
@@ -23,8 +23,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.tasks.javadoc.Javadoc;
|
||||
import org.gradle.testfixtures.ProjectBuilder;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Rob Winch
|
||||
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
|
||||
public class JavadocApiPluginTest {
|
||||
Project rootProject;
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void cleanup() throws Exception {
|
||||
if (rootProject != null) {
|
||||
FileUtils.deleteDirectory(rootProject.getProjectDir());
|
||||
|
||||
+3
-3
@@ -22,8 +22,8 @@ import org.gradle.api.artifacts.repositories.ArtifactRepository;
|
||||
import org.gradle.api.artifacts.repositories.MavenArtifactRepository;
|
||||
import org.gradle.api.plugins.ExtraPropertiesExtension;
|
||||
import org.gradle.testfixtures.ProjectBuilder;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class RepositoryConventionPluginTests {
|
||||
|
||||
private Project project = ProjectBuilder.builder().build();
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setUp() {
|
||||
this.project.getProperties().clear();
|
||||
}
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import io.spring.gradle.TestKit;
|
||||
import org.gradle.testkit.runner.BuildResult;
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class ShowcaseITest {
|
||||
private TestKit testKit;
|
||||
|
||||
@BeforeEach
|
||||
void setup(@TempDir Path tempDir) {
|
||||
this.testKit = new TestKit(tempDir.toFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void build() throws Exception {
|
||||
BuildResult result = this.testKit.withProjectResource("samples/showcase/")
|
||||
.withArguments("build", "--stacktrace")
|
||||
.forwardOutput()
|
||||
.build();
|
||||
assertThat(result.getOutput()).contains("BUILD SUCCESSFUL");
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void install() throws Exception {
|
||||
BuildResult result = this.testKit
|
||||
.withProjectResource("samples/showcase/")
|
||||
.withArguments("install", "--stacktrace")
|
||||
.build();
|
||||
|
||||
assertThat(result.getOutput()).contains("SUCCESS");
|
||||
|
||||
File pom = new File(testKit.getRootDir(), "sgbcs-core/build/poms/pom-default.xml");
|
||||
assertThat(pom).exists();
|
||||
|
||||
String pomText = new String(Files.readAllBytes(pom.toPath()));
|
||||
String pomTextNoSpace = pomText.replaceAll("\\s", "");
|
||||
|
||||
assertThat(pomText).doesNotContain("<dependencyManagement>");
|
||||
|
||||
assertThat(pomTextNoSpace).contains("<dependency>\n <groupId>org.springframework</groupId>\n <artifactId>spring-test</artifactId>\n <scope>test</scope>\n <version>4.3.6.RELEASE</version>\n </dependency>".replaceAll("\\s", ""));
|
||||
assertThat(pomTextNoSpace).contains("<developers>\n <developer>\n <id>rwinch</id>\n <name>Rob Winch</name>\n <email>rwinch@pivotal.io</email>\n </developer>\n <developer>\n <id>jgrandja</id>\n <name>Joe Grandja</name>\n <email>jgrandja@pivotal.io</email>\n </developer>\n </developers>".replaceAll("\\s", ""));
|
||||
assertThat(pomTextNoSpace).contains("<scm>\n <connection>scm:git:git://github.com/spring-projects/spring-security</connection>\n <developerConnection>scm:git:git://github.com/spring-projects/spring-security</developerConnection>\n <url>https://github.com/spring-projects/spring-security</url>\n </scm>".replaceAll("\\s", ""));
|
||||
assertThat(pomTextNoSpace).contains("<description>sgbcs-core</description>");
|
||||
assertThat(pomTextNoSpace).contains("<url>https://spring.io/spring-security</url>");
|
||||
assertThat(pomTextNoSpace).contains("<organization>\n <name>spring.io</name>\n <url>https://spring.io/</url>\n </organization>".replaceAll("\\s", ""));
|
||||
assertThat(pomTextNoSpace).contains(" <licenses>\n <license>\n <name>The Apache Software License, Version 2.0</name>\n <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>\n <distribution>repo</distribution>\n </license>\n </licenses>".replaceAll("\\s", ""));
|
||||
assertThat(pomTextNoSpace).contains("<scm>\n <connection>scm:git:git://github.com/spring-projects/spring-security</connection>\n <developerConnection>scm:git:git://github.com/spring-projects/spring-security</developerConnection>\n <url>https://github.com/spring-projects/spring-security</url>\n </scm>".replaceAll("\\s", ""));
|
||||
|
||||
File bom = new File(testKit.getRootDir(), "bom/build/poms/pom-default.xml");
|
||||
assertThat(bom).exists();
|
||||
assertThat(bom).hasContent("<artifactId>sgbcs-core</artifactId>");
|
||||
|
||||
BuildResult secondBuild = this.testKit.withProjectResource("samples/showcase/").withArguments("mavenBom", "--stacktrace").build();
|
||||
// mavenBom is not up to date since install is never up to date
|
||||
assertThat(result.task(":bom:mavenBom").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import io.spring.gradle.TestKit;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.gradle.testkit.runner.BuildResult;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class SpringMavenPluginITest {
|
||||
|
||||
private TestKit testKit;
|
||||
|
||||
@BeforeEach
|
||||
void setup(@TempDir Path tempDir) {
|
||||
this.testKit = new TestKit(tempDir.toFile());
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
public void install() throws Exception {
|
||||
BuildResult result = this.testKit.withProjectResource("samples/maven/install")
|
||||
.withArguments("install")
|
||||
.build();
|
||||
assertThat(result.getOutput()).contains("SUCCESS");
|
||||
File pom = new File(testKit.getRootDir(), "build/poms/pom-default.xml");
|
||||
assertThat(pom).exists();
|
||||
String pomText = new String(Files.readAllBytes(pom.toPath()));
|
||||
assertThat(pomText.replaceAll("\\s", "")).contains("<dependency>\n <groupId>aopalliance</groupId>\n <artifactId>aopalliance</artifactId>\n <version>1.0</version>\n <scope>compile</scope>\n <optional>true</optional>\n </dependency>".replaceAll("\\s", ""));
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
public void signArchivesWhenInMemory() throws Exception {
|
||||
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>(2);
|
||||
map.put("ORG_GRADLE_PROJECT_signingKey", getSigningKey());
|
||||
map.put("ORG_GRADLE_PROJECT_signingPassword", "password");
|
||||
BuildResult result = this.testKit.withProjectResource("samples/maven/signing")
|
||||
.withArguments("signArchives")
|
||||
.withEnvironment(map)
|
||||
.forwardOutput()
|
||||
.build();
|
||||
assertThat(result.getOutput()).contains("SUCCESS");
|
||||
final File jar = new File(testKit.getRootDir(), "build/libs/signing-1.0.0.RELEASE.jar");
|
||||
assertThat(jar).exists();
|
||||
File signature = new File(jar.getAbsolutePath() + ".asc");
|
||||
assertThat(signature).exists();
|
||||
}
|
||||
|
||||
public String getSigningKey() throws Exception {
|
||||
return IOUtils.toString(getClass().getResource("/test-private.pgp"));
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import io.spring.gradle.TestKit;
|
||||
import org.gradle.testkit.runner.BuildResult;
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestsConfigurationPluginITest {
|
||||
|
||||
private TestKit testKit;
|
||||
|
||||
@BeforeEach
|
||||
void setup(@TempDir Path tempDir) {
|
||||
this.testKit = new TestKit(tempDir.toFile());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canFindDepencency() throws Exception {
|
||||
BuildResult result = this.testKit.withProjectResource("samples/testsconfiguration")
|
||||
.withArguments("check")
|
||||
.build();
|
||||
assertThat(result.task(":web:check").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,21 +5,26 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import org.gradle.api.Project;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class UtilsTest {
|
||||
@Mock
|
||||
Project project;
|
||||
@Mock
|
||||
Project rootProject;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
when(project.getRootProject()).thenReturn(rootProject);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getProjectName() {
|
||||
when(project.getRootProject()).thenReturn(rootProject);
|
||||
when(rootProject.getName()).thenReturn("spring-security");
|
||||
|
||||
assertThat(Utils.getProjectName(project)).isEqualTo("spring-security");
|
||||
@@ -27,7 +32,6 @@ public class UtilsTest {
|
||||
|
||||
@Test
|
||||
public void getProjectNameWhenEndsWithBuildThenStrippedOut() {
|
||||
when(project.getRootProject()).thenReturn(rootProject);
|
||||
when(rootProject.getName()).thenReturn("spring-security-build");
|
||||
|
||||
assertThat(Utils.getProjectName(project)).isEqualTo("spring-security");
|
||||
|
||||
@@ -19,9 +19,9 @@ package io.spring.gradle.convention.sagan;
|
||||
import okhttp3.mockwebserver.MockResponse;
|
||||
import okhttp3.mockwebserver.MockWebServer;
|
||||
import okhttp3.mockwebserver.RecordedRequest;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.gradle.sagan.Release;
|
||||
import org.springframework.gradle.sagan.SaganApi;
|
||||
|
||||
@@ -38,7 +38,7 @@ public class SaganApiTests {
|
||||
|
||||
private String baseUrl;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setup() throws Exception {
|
||||
this.server = new MockWebServer();
|
||||
this.server.start();
|
||||
@@ -47,7 +47,7 @@ public class SaganApiTests {
|
||||
this.sagan.setBaseUrl(this.baseUrl);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void cleanup() throws Exception {
|
||||
this.server.shutdown();
|
||||
}
|
||||
|
||||
+5
-5
@@ -3,9 +3,9 @@ package io.spring.gradle.github.milestones;
|
||||
import okhttp3.mockwebserver.MockResponse;
|
||||
import okhttp3.mockwebserver.MockWebServer;
|
||||
import okhttp3.mockwebserver.RecordedRequest;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.gradle.github.milestones.GitHubMilestoneApi;
|
||||
import org.springframework.gradle.github.milestones.RepositoryRef;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class GitHubMilestoneApiTests {
|
||||
|
||||
private String baseUrl;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setup() throws Exception {
|
||||
this.server = new MockWebServer();
|
||||
this.server.start();
|
||||
@@ -33,7 +33,7 @@ public class GitHubMilestoneApiTests {
|
||||
this.github.setBaseUrl(this.baseUrl);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void cleanup() throws Exception {
|
||||
this.server.shutdown();
|
||||
}
|
||||
|
||||
+5
-5
@@ -3,9 +3,9 @@ package org.springframework.gradle.github.milestones;
|
||||
import okhttp3.mockwebserver.MockResponse;
|
||||
import okhttp3.mockwebserver.MockWebServer;
|
||||
import okhttp3.mockwebserver.RecordedRequest;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class GitHubMilestoneApiTests {
|
||||
|
||||
private String baseUrl;
|
||||
|
||||
@BeforeEach
|
||||
@Before
|
||||
public void setup() throws Exception {
|
||||
this.server = new MockWebServer();
|
||||
this.server.start();
|
||||
@@ -31,7 +31,7 @@ public class GitHubMilestoneApiTests {
|
||||
this.github.setBaseUrl(this.baseUrl);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@After
|
||||
public void cleanup() throws Exception {
|
||||
this.server.shutdown();
|
||||
}
|
||||
|
||||
+2
-1
@@ -20,9 +20,10 @@ import com.github.benmanes.gradle.versions.updates.resolutionstrategy.ComponentS
|
||||
import org.gradle.api.Action;
|
||||
import org.gradle.api.artifacts.ComponentSelection;
|
||||
import org.gradle.api.artifacts.component.ModuleComponentIdentifier;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
package org.springframework.security.convention.versions;
|
||||
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
plugins {
|
||||
id 'io.spring.convention.dependency-set'
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply from: "$rootDir/gradle/dependency-management.gradle"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile spockDependencies
|
||||
testCompile gebDependencies
|
||||
testCompile powerMockDependencies
|
||||
testCompile seleniumDependencies
|
||||
testCompile slf4jDependencies
|
||||
testCompile springCoreDependency
|
||||
testCompile jstlDependencies
|
||||
testCompile apachedsDependencies
|
||||
}
|
||||
+724
@@ -0,0 +1,724 @@
|
||||
// we use this to mock dependency management plugin
|
||||
|
||||
def deps = [
|
||||
"antlr:antlr" : "2.7.7",
|
||||
"aopalliance:aopalliance" : "1.0",
|
||||
"biz.paluch.redis:lettuce" : "5.0.0.Beta1",
|
||||
"ch.qos.logback:logback-access" : "1.1.9",
|
||||
"ch.qos.logback:logback-classic" : "1.1.9",
|
||||
"ch.qos.logback:logback-core" : "1.1.9",
|
||||
"com.atomikos:transactions-jdbc" : "3.9.3",
|
||||
"com.atomikos:transactions-jms" : "3.9.3",
|
||||
"com.atomikos:transactions-jta" : "3.9.3",
|
||||
"com.caucho:hessian" : "4.0.38",
|
||||
"com.couchbase.client:couchbase-spring-cache" : "2.1.0",
|
||||
"com.couchbase.client:java-client" : "2.3.7",
|
||||
"com.datastax.cassandra:cassandra-driver-core" : "3.1.3",
|
||||
"com.datastax.cassandra:cassandra-driver-mapping" : "3.1.3",
|
||||
"com.esotericsoftware:kryo" : "3.0.3",
|
||||
"com.esotericsoftware:kryo-shaded" : "3.0.3",
|
||||
"com.fasterxml:classmate" : "1.3.3",
|
||||
"com.fasterxml.jackson.core:jackson-annotations" : "2.8.0",
|
||||
"com.fasterxml.jackson.core:jackson-core" : "2.8.6",
|
||||
"com.fasterxml.jackson.core:jackson-databind" : "2.8.6",
|
||||
"com.fasterxml.jackson.dataformat:jackson-dataformat-avro" : "2.8.6",
|
||||
"com.fasterxml.jackson.dataformat:jackson-dataformat-cbor" : "2.8.6",
|
||||
"com.fasterxml.jackson.dataformat:jackson-dataformat-csv" : "2.8.6",
|
||||
"com.fasterxml.jackson.dataformat:jackson-dataformat-properties" : "2.8.6",
|
||||
"com.fasterxml.jackson.dataformat:jackson-dataformat-protobuf" : "2.8.6",
|
||||
"com.fasterxml.jackson.dataformat:jackson-dataformat-smile" : "2.8.6",
|
||||
"com.fasterxml.jackson.dataformat:jackson-dataformat-xml" : "2.8.6",
|
||||
"com.fasterxml.jackson.dataformat:jackson-dataformat-yaml" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-guava" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-hibernate3" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-hibernate4" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-hibernate5" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-hppc" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-jaxrs" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-jdk8" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-joda" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-json-org" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-jsr353" : "2.8.6",
|
||||
"com.fasterxml.jackson.datatype:jackson-datatype-pcollections" : "2.8.6",
|
||||
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-base" : "2.8.6",
|
||||
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-cbor-provider" : "2.8.6",
|
||||
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider" : "2.8.6",
|
||||
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-smile-provider" : "2.8.6",
|
||||
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-xml-provider" : "2.8.6",
|
||||
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-yaml-provider" : "2.8.6",
|
||||
"com.fasterxml.jackson.jr:jackson-jr-all" : "2.8.6",
|
||||
"com.fasterxml.jackson.jr:jackson-jr-objects" : "2.8.6",
|
||||
"com.fasterxml.jackson.jr:jackson-jr-retrofit2" : "2.8.6",
|
||||
"com.fasterxml.jackson.jr:jackson-jr-stree" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-afterburner" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-guice" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-jaxb-annotations" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-jsonSchema" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-kotlin" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-mrbean" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-osgi" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-parameter-names" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-paranamer" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-scala_2.10" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-scala_2.11" : "2.8.6",
|
||||
"com.fasterxml.jackson.module:jackson-module-scala_2.12" : "2.8.6",
|
||||
"com.gemstone.gemfire:gemfire" : "8.2.0",
|
||||
"com.github.ben-manes.caffeine:caffeine" : "2.3.5",
|
||||
"com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute" : "1.3",
|
||||
"com.github.spullara.redis:client" : "0.7",
|
||||
"com.goldmansachs:gs-collections" : "5.1.0",
|
||||
"com.google.appengine:appengine-api-1.0-sdk" : "1.9.48",
|
||||
"com.google.code.findbugs:annotations" : "2.0.3",
|
||||
"com.google.code.findbugs:jsr305" : "3.0.1",
|
||||
"com.google.code.gson:gson" : "2.8.0",
|
||||
"com.google.code.typica:typica" : "1.3",
|
||||
"com.google.guava:guava" : "20.0",
|
||||
"com.google.inject:guice" : "3.0",
|
||||
"com.google.protobuf:protobuf-java" : "2.6.1",
|
||||
"com.googlecode.json-simple:json-simple" : "1.1.1",
|
||||
"com.googlecode.protobuf-java-format:protobuf-java-format" : "1.4",
|
||||
"com.h2database:h2" : "1.4.193",
|
||||
"com.hazelcast:hazelcast" : "3.7.5",
|
||||
"com.hazelcast:hazelcast-client" : "3.7.5",
|
||||
"com.hazelcast:hazelcast-hibernate4" : "3.7.1",
|
||||
"com.hazelcast:hazelcast-hibernate5" : "1.1.3",
|
||||
"com.hazelcast:hazelcast-spring" : "3.7.5",
|
||||
"com.ibm.jbatch:com.ibm.jbatch-tck-spi" : "1.0",
|
||||
"com.ibm.websphere:uow" : "6.0.2.17",
|
||||
"com.jamonapi:jamon" : "2.81",
|
||||
"com.jayway.jsonpath:json-path" : "2.2.0",
|
||||
"com.jayway.jsonpath:json-path-assert" : "2.2.0",
|
||||
"com.jayway.restassured:rest-assured" : "2.9.0",
|
||||
"com.jcraft:jsch" : "0.1.54",
|
||||
"com.lowagie:itext" : "2.1.7",
|
||||
"com.maxmind.geoip2:geoip2" : "2.3.1",
|
||||
"com.mchange:c3p0" : "0.9.5.2",
|
||||
"com.microsoft.sqlserver:mssql-jdbc" : "6.1.0.jre7",
|
||||
"com.querydsl:querydsl-apt" : "4.1.4",
|
||||
"com.querydsl:querydsl-collections" : "4.1.4",
|
||||
"com.querydsl:querydsl-core" : "4.1.4",
|
||||
"com.querydsl:querydsl-jpa" : "4.1.4",
|
||||
"com.querydsl:querydsl-mongodb" : "4.1.4",
|
||||
"com.rabbitmq:amqp-client" : "4.0.2",
|
||||
"com.rabbitmq:http-client" : "1.1.0.RELEASE",
|
||||
"com.rometools:rome" : "1.6.1",
|
||||
"com.rometools:rome-fetcher" : "1.6.1",
|
||||
"com.samskivert:jmustache" : "1.13",
|
||||
"com.sendgrid:sendgrid-java" : "2.2.2",
|
||||
"com.splunk:splunk" : "1.3.0",
|
||||
"com.squareup.okhttp:okhttp" : "2.7.5",
|
||||
"com.squareup.okhttp3:okhttp" : "3.6.0",
|
||||
"com.sun:ldapbp" : "1.0",
|
||||
"com.sun.facelets:jsf-facelets" : "1.1.14",
|
||||
"com.sun.faces:jsf-api" : "2.2.14",
|
||||
"com.sun.faces:jsf-impl" : "2.2.14",
|
||||
"com.sun.mail:imap" : "1.5.6",
|
||||
"com.sun.mail:javax.mail" : "1.5.6",
|
||||
"com.sun.xml.messaging.saaj:saaj-impl" : "1.3.28",
|
||||
"com.sun.xml.wss:xws-security" : "3.0",
|
||||
"com.thoughtworks.xstream:xstream" : "1.4.9",
|
||||
"com.timgroup:java-statsd-client" : "3.1.0",
|
||||
"com.unboundid:unboundid-ldapsdk" : "3.2.0",
|
||||
"com.zaxxer:HikariCP" : "2.5.1",
|
||||
"com.zaxxer:HikariCP-java6" : "2.3.13",
|
||||
"commons-beanutils:commons-beanutils" : "1.9.3",
|
||||
"commons-cli:commons-cli" : "1.3.1",
|
||||
"commons-codec:commons-codec" : "1.10",
|
||||
"commons-collections:commons-collections" : "3.2.2",
|
||||
"commons-dbcp:commons-dbcp" : "1.4",
|
||||
"commons-digester:commons-digester" : "2.1",
|
||||
"commons-fileupload:commons-fileupload" : "1.3.2",
|
||||
"commons-httpclient:commons-httpclient" : "3.1",
|
||||
"commons-io:commons-io" : "2.5",
|
||||
"commons-lang:commons-lang" : "2.6",
|
||||
"commons-logging:commons-logging" : "1.2",
|
||||
"commons-net:commons-net" : "3.5",
|
||||
"commons-pool:commons-pool" : "1.6",
|
||||
"de.flapdoodle.embed:de.flapdoodle.embed.mongo" : "1.50.5",
|
||||
"dom4j:dom4j" : "1.6.1",
|
||||
"edu.umd.cs.mtc:multithreadedtc" : "1.01",
|
||||
"io.dropwizard.metrics:metrics-core" : "3.1.2",
|
||||
"io.dropwizard.metrics:metrics-ganglia" : "3.1.2",
|
||||
"io.dropwizard.metrics:metrics-graphite" : "3.1.2",
|
||||
"io.dropwizard.metrics:metrics-servlets" : "3.1.2",
|
||||
"io.fastjson:boon" : "0.34",
|
||||
"io.javaslang:javaslang" : "2.0.5",
|
||||
"io.javaslang:javaslang-match" : "2.0.5",
|
||||
"io.netty:netty-all" : "4.0.44.Final",
|
||||
"io.projectreactor:reactor-bus" : "2.0.8.RELEASE",
|
||||
"io.projectreactor:reactor-core" : "2.0.8.RELEASE",
|
||||
"io.projectreactor:reactor-groovy" : "2.0.8.RELEASE",
|
||||
"io.projectreactor:reactor-groovy-extensions" : "2.0.8.RELEASE",
|
||||
"io.projectreactor:reactor-logback" : "2.0.8.RELEASE",
|
||||
"io.projectreactor:reactor-net" : "2.0.8.RELEASE",
|
||||
"io.projectreactor:reactor-stream" : "2.0.8.RELEASE",
|
||||
"io.projectreactor.spring:reactor-spring-context" : "2.0.7.RELEASE",
|
||||
"io.projectreactor.spring:reactor-spring-core" : "2.0.7.RELEASE",
|
||||
"io.projectreactor.spring:reactor-spring-messaging" : "2.0.7.RELEASE",
|
||||
"io.projectreactor.spring:reactor-spring-webmvc" : "2.0.7.RELEASE",
|
||||
"io.searchbox:jest" : "2.0.4",
|
||||
"io.undertow:undertow-core" : "1.4.8.Final",
|
||||
"io.undertow:undertow-servlet" : "1.4.8.Final",
|
||||
"io.undertow:undertow-websockets-jsr" : "1.4.8.Final",
|
||||
"javax.activation:activation" : "1.1.1",
|
||||
"javax.annotation:jsr250-api" : "1.0",
|
||||
"javax.batch:javax.batch-api" : "1.0.1",
|
||||
"javax.cache:cache-api" : "1.0.0",
|
||||
"javax.ejb:javax.ejb-api" : "3.2",
|
||||
"javax.el:javax.el-api" : "2.2.5",
|
||||
"javax.enterprise:cdi-api" : "1.2",
|
||||
"javax.enterprise.concurrent:javax.enterprise.concurrent-api" : "1.0",
|
||||
"javax.faces:javax.faces-api" : "2.2",
|
||||
"javax.inject:javax.inject" : "1",
|
||||
"javax.interceptor:javax.interceptor-api" : "1.2",
|
||||
"javax.jdo:jdo-api" : "3.0.1",
|
||||
"javax.jms:jms-api" : "1.1-rev-1",
|
||||
"javax.mail:javax.mail-api" : "1.5.6",
|
||||
"javax.money:money-api" : "1.0.1",
|
||||
"javax.portlet:portlet-api" : "2.0",
|
||||
"javax.resource:connector-api" : "1.5",
|
||||
"javax.servlet:javax.servlet-api" : "3.1.0",
|
||||
"javax.servlet:jstl" : "1.2",
|
||||
"javax.servlet.jsp:javax.servlet.jsp-api" : "2.3.1",
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api" : "1.2.1",
|
||||
"javax.transaction:javax.transaction-api" : "1.2",
|
||||
"javax.validation:validation-api" : "1.1.0.Final",
|
||||
"javax.websocket:javax.websocket-api" : "1.1",
|
||||
"javax.ws.rs:javax.ws.rs-api" : "2.0.1",
|
||||
"jaxen:jaxen" : "1.1.6",
|
||||
"jline:jline" : "2.14.3",
|
||||
"joda-time:joda-time" : "2.9.7",
|
||||
"junit:junit" : "4.12",
|
||||
"ldapsdk:ldapsdk" : "4.1",
|
||||
"log4j:log4j" : "1.2.17",
|
||||
"mysql:mysql-connector-java" : "5.1.40",
|
||||
"net.java.dev.jna:jna" : "4.2.2",
|
||||
"net.openhft:chronicle" : "3.4.4",
|
||||
"net.openhft:lang" : "6.6.16",
|
||||
"net.sf.ehcache:ehcache" : "2.10.3",
|
||||
"net.sf.jasperreports:jasperreports" : "6.4.0",
|
||||
"net.sf.jopt-simple:jopt-simple" : "5.0.3",
|
||||
"net.sourceforge.htmlunit:htmlunit" : "2.21",
|
||||
"net.sourceforge.jexcelapi:jxl" : "2.6.12",
|
||||
"net.sourceforge.jtds:jtds" : "1.3.1",
|
||||
"net.sourceforge.nekohtml:nekohtml" : "1.9.22",
|
||||
"nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" : "1.4.0",
|
||||
"opensymphony:ognl" : "2.6.11",
|
||||
"org.apache.activemq:activemq-amqp" : "5.14.3",
|
||||
"org.apache.activemq:activemq-blueprint" : "5.14.3",
|
||||
"org.apache.activemq:activemq-broker" : "5.14.3",
|
||||
"org.apache.activemq:activemq-camel" : "5.14.3",
|
||||
"org.apache.activemq:activemq-client" : "5.14.3",
|
||||
"org.apache.activemq:activemq-console" : "5.14.3",
|
||||
"org.apache.activemq:activemq-http" : "5.14.3",
|
||||
"org.apache.activemq:activemq-jaas" : "5.14.3",
|
||||
"org.apache.activemq:activemq-jdbc-store" : "5.14.3",
|
||||
"org.apache.activemq:activemq-jms-pool" : "5.14.3",
|
||||
"org.apache.activemq:activemq-kahadb-store" : "5.14.3",
|
||||
"org.apache.activemq:activemq-karaf" : "5.14.3",
|
||||
"org.apache.activemq:activemq-leveldb-store" : "5.14.3",
|
||||
"org.apache.activemq:activemq-log4j-appender" : "5.14.3",
|
||||
"org.apache.activemq:activemq-mqtt" : "5.14.3",
|
||||
"org.apache.activemq:activemq-openwire-generator" : "5.14.3",
|
||||
"org.apache.activemq:activemq-openwire-legacy" : "5.14.3",
|
||||
"org.apache.activemq:activemq-osgi" : "5.14.3",
|
||||
"org.apache.activemq:activemq-partition" : "5.14.3",
|
||||
"org.apache.activemq:activemq-pool" : "5.14.3",
|
||||
"org.apache.activemq:activemq-ra" : "5.14.3",
|
||||
"org.apache.activemq:activemq-run" : "5.14.3",
|
||||
"org.apache.activemq:activemq-runtime-config" : "5.14.3",
|
||||
"org.apache.activemq:activemq-shiro" : "5.14.3",
|
||||
"org.apache.activemq:activemq-spring" : "5.14.3",
|
||||
"org.apache.activemq:activemq-stomp" : "5.14.3",
|
||||
"org.apache.activemq:activemq-web" : "5.14.3",
|
||||
"org.apache.activemq:artemis-amqp-protocol" : "1.5.2",
|
||||
"org.apache.activemq:artemis-commons" : "1.5.2",
|
||||
"org.apache.activemq:artemis-core-client" : "1.5.2",
|
||||
"org.apache.activemq:artemis-jms-client" : "1.5.2",
|
||||
"org.apache.activemq:artemis-jms-server" : "1.5.2",
|
||||
"org.apache.activemq:artemis-journal" : "1.5.2",
|
||||
"org.apache.activemq:artemis-native" : "1.5.2",
|
||||
"org.apache.activemq:artemis-selector" : "1.5.2",
|
||||
"org.apache.activemq:artemis-server" : "1.5.2",
|
||||
"org.apache.activemq:artemis-service-extensions" : "1.5.2",
|
||||
"org.apache.commons:commons-dbcp2" : "2.1.1",
|
||||
"org.apache.commons:commons-lang3" : "3.5",
|
||||
"org.apache.commons:commons-pool2" : "2.4.2",
|
||||
"org.apache.curator:curator-recipes" : "2.11.1",
|
||||
"org.apache.derby:derby" : "10.13.1.1",
|
||||
"org.apache.derby:derbyclient" : "10.13.1.1",
|
||||
"org.apache.directory.server:apacheds-core" : "1.5.5",
|
||||
"org.apache.directory.server:apacheds-core-entry" : "1.5.5",
|
||||
"org.apache.directory.server:apacheds-protocol-ldap" : "1.5.5",
|
||||
"org.apache.directory.server:apacheds-protocol-shared" : "1.5.5",
|
||||
"org.apache.directory.server:apacheds-server-jndi" : "1.5.5",
|
||||
"org.apache.directory.shared:shared-ldap" : "0.9.15",
|
||||
"org.apache.httpcomponents:httpasyncclient" : "4.1.2",
|
||||
"org.apache.httpcomponents:httpclient" : "4.5.2",
|
||||
"org.apache.httpcomponents:httpcore" : "4.4.6",
|
||||
"org.apache.httpcomponents:httpmime" : "4.5.2",
|
||||
"org.apache.ibatis:ibatis-sqlmap" : "2.3.4.726",
|
||||
"org.apache.kafka:kafka-clients" : "0.10.1.1",
|
||||
"org.apache.kafka:kafka_2.11" : "0.10.1.1",
|
||||
"org.apache.logging.log4j:log4j-1.2-api" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-api" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-api-scala_2.10" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-api-scala_2.11" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-core" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-flume-ng" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-iostreams" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-jcl" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-jmx-gui" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-jul" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-liquibase" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-nosql" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-slf4j-impl" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-taglib" : "2.7",
|
||||
"org.apache.logging.log4j:log4j-web" : "2.7",
|
||||
"org.apache.myfaces.core:myfaces-impl" : "2.2.11",
|
||||
"org.apache.openjpa:openjpa" : "2.4.2",
|
||||
"org.apache.openjpa:openjpa-persistence-jdbc" : "2.4.2",
|
||||
"org.apache.poi:poi" : "3.15",
|
||||
"org.apache.poi:poi-ooxml" : "3.15",
|
||||
"org.apache.poi:poi-scratchpad" : "3.15",
|
||||
"org.apache.solr:solr-core" : "5.5.3",
|
||||
"org.apache.solr:solr-solrj" : "5.5.3",
|
||||
"org.apache.taglibs:taglibs-standard-impl" : "1.2.5",
|
||||
"org.apache.taglibs:taglibs-standard-jstlel" : "1.2.5",
|
||||
"org.apache.taglibs:taglibs-standard-spec" : "1.2.5",
|
||||
"org.apache.tiles:tiles-api" : "3.0.7",
|
||||
"org.apache.tiles:tiles-core" : "3.0.7",
|
||||
"org.apache.tiles:tiles-el" : "3.0.7",
|
||||
"org.apache.tiles:tiles-extras" : "3.0.7",
|
||||
"org.apache.tiles:tiles-jsp" : "3.0.7",
|
||||
"org.apache.tiles:tiles-request-api" : "1.0.6",
|
||||
"org.apache.tiles:tiles-servlet" : "3.0.7",
|
||||
"org.apache.tomcat:tomcat-catalina" : "8.5.11",
|
||||
"org.apache.tomcat:tomcat-dbcp" : "8.5.11",
|
||||
"org.apache.tomcat:tomcat-jdbc" : "8.5.11",
|
||||
"org.apache.tomcat:tomcat-jsp-api" : "8.5.11",
|
||||
"org.apache.tomcat:tomcat-websocket" : "8.5.11",
|
||||
"org.apache.tomcat.embed:tomcat-embed-core" : "8.5.11",
|
||||
"org.apache.tomcat.embed:tomcat-embed-el" : "8.5.11",
|
||||
"org.apache.tomcat.embed:tomcat-embed-jasper" : "8.5.11",
|
||||
"org.apache.tomcat.embed:tomcat-embed-websocket" : "8.5.11",
|
||||
"org.apache.velocity:velocity" : "1.7",
|
||||
"org.apache.ws.commons.axiom:axiom-api" : "1.2.20",
|
||||
"org.apache.ws.commons.axiom:axiom-impl" : "1.2.20",
|
||||
"org.apache.ws.security:wss4j" : "1.6.19",
|
||||
"org.apache.ws.xmlschema:xmlschema-core" : "2.2.1",
|
||||
"org.apache.wss4j:wss4j-ws-security-common" : "2.1.8",
|
||||
"org.apache.wss4j:wss4j-ws-security-dom" : "2.1.8",
|
||||
"org.apache.xmlbeans:xmlbeans" : "2.6.0",
|
||||
"org.aspectj:aspectjrt" : "1.8.9",
|
||||
"org.aspectj:aspectjtools" : "1.8.9",
|
||||
"org.aspectj:aspectjweaver" : "1.8.9",
|
||||
"org.assertj:assertj-core" : "2.6.0",
|
||||
"org.atteo:evo-inflector" : "1.2.2",
|
||||
"org.beanshell:bsh" : "2.0b4",
|
||||
"org.bouncycastle:bcpkix-jdk15on" : "1.56",
|
||||
"org.codehaus.btm:btm" : "2.1.4",
|
||||
"org.codehaus.castor:castor-xml" : "1.4.1",
|
||||
"org.codehaus.fabric3.api:commonj" : "1.1.1",
|
||||
"org.codehaus.groovy:groovy" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-all" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-ant" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-bsf" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-console" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-docgenerator" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-groovydoc" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-groovysh" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-jmx" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-json" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-jsr223" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-nio" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-servlet" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-sql" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-swing" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-templates" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-test" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-testng" : "2.4.7",
|
||||
"org.codehaus.groovy:groovy-xml" : "2.4.7",
|
||||
"org.codehaus.jackson:jackson-core-asl" : "1.9.13",
|
||||
"org.codehaus.jackson:jackson-mapper-asl" : "1.9.13",
|
||||
"org.codehaus.janino:janino" : "2.7.8",
|
||||
"org.codehaus.jettison:jettison" : "1.2",
|
||||
"org.codehaus.woodstox:woodstox-core-asl" : "4.4.1",
|
||||
"org.crashub:crash.cli" : "1.3.2",
|
||||
"org.crashub:crash.connectors.ssh" : "1.3.2",
|
||||
"org.crashub:crash.connectors.telnet" : "1.3.2",
|
||||
"org.crashub:crash.embed.spring" : "1.3.2",
|
||||
"org.crashub:crash.plugins.cron" : "1.3.2",
|
||||
"org.crashub:crash.plugins.mail" : "1.3.2",
|
||||
"org.crashub:crash.shell" : "1.3.2",
|
||||
"org.eclipse.jetty:apache-jsp" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:apache-jstl" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-annotations" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-client" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-continuation" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-deploy" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-http" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-io" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-jmx" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-plus" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-proxy" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-security" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-server" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-servlet" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-servlets" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-util" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-webapp" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty:jetty-xml" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty.orbit:javax.servlet.jsp" : "2.2.0.v201112011158",
|
||||
"org.eclipse.jetty.websocket:javax-websocket-server-impl" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty.websocket:websocket-client" : "9.4.1.v20170120",
|
||||
"org.eclipse.jetty.websocket:websocket-server" : "9.4.1.v20170120",
|
||||
"org.eclipse.paho:org.eclipse.paho.client.mqttv3" : "1.1.0",
|
||||
"org.eclipse.persistence:javax.persistence" : "2.1.1",
|
||||
"org.eclipse.persistence:org.eclipse.persistence.core" : "2.6.4",
|
||||
"org.eclipse.persistence:org.eclipse.persistence.jpa" : "2.6.4",
|
||||
"org.ehcache:ehcache" : "3.2.0",
|
||||
"org.ehcache:ehcache-clustered" : "3.2.0",
|
||||
"org.ehcache:ehcache-transactions" : "3.2.0",
|
||||
"org.elasticsearch:elasticsearch" : "2.4.4",
|
||||
"org.firebirdsql.jdbc:jaybird-jdk16" : "2.2.12",
|
||||
"org.firebirdsql.jdbc:jaybird-jdk17" : "2.2.12",
|
||||
"org.firebirdsql.jdbc:jaybird-jdk18" : "2.2.12",
|
||||
"org.flywaydb:flyway-core" : "3.2.1",
|
||||
"org.freemarker:freemarker" : "2.3.25-incubating",
|
||||
"org.glassfish:javax.el" : "3.0.0",
|
||||
"org.glassfish.jersey.containers:jersey-container-servlet" : "2.25.1",
|
||||
"org.glassfish.jersey.containers:jersey-container-servlet-core" : "2.25.1",
|
||||
"org.glassfish.jersey.core:jersey-server" : "2.25.1",
|
||||
"org.glassfish.jersey.ext:jersey-bean-validation" : "2.25.1",
|
||||
"org.glassfish.jersey.ext:jersey-spring3" : "2.25.1",
|
||||
"org.glassfish.jersey.media:jersey-media-json-jackson" : "2.25.1",
|
||||
"org.glassfish.tyrus:tyrus-container-servlet" : "1.3.5",
|
||||
"org.glassfish.tyrus:tyrus-core" : "1.3.5",
|
||||
"org.glassfish.tyrus:tyrus-server" : "1.3.5",
|
||||
"org.glassfish.tyrus:tyrus-spi" : "1.3.5",
|
||||
"org.hamcrest:hamcrest-all" : "1.3",
|
||||
"org.hamcrest:hamcrest-core" : "1.3",
|
||||
"org.hamcrest:hamcrest-library" : "1.3",
|
||||
"org.hibernate:hibernate-core" : "5.0.11.Final",
|
||||
"org.hibernate:hibernate-ehcache" : "5.0.11.Final",
|
||||
"org.hibernate:hibernate-entitymanager" : "5.0.11.Final",
|
||||
"org.hibernate:hibernate-envers" : "5.0.11.Final",
|
||||
"org.hibernate:hibernate-java8" : "5.0.11.Final",
|
||||
"org.hibernate:hibernate-jpamodelgen" : "5.0.11.Final",
|
||||
"org.hibernate:hibernate-validator" : "5.3.4.Final",
|
||||
"org.hibernate:hibernate-validator-annotation-processor" : "5.3.4.Final",
|
||||
"org.hsqldb:hsqldb" : "2.3.3",
|
||||
"org.igniterealtime.smack:smack-extensions" : "4.1.9",
|
||||
"org.igniterealtime.smack:smack-java7" : "4.1.9",
|
||||
"org.igniterealtime.smack:smack-resolver-javax" : "4.1.9",
|
||||
"org.igniterealtime.smack:smack-tcp" : "4.1.9",
|
||||
"org.infinispan:infinispan-jcache" : "8.2.5.Final",
|
||||
"org.infinispan:infinispan-spring4-common" : "8.2.5.Final",
|
||||
"org.infinispan:infinispan-spring4-embedded" : "8.2.5.Final",
|
||||
"org.jasig.cas.client:cas-client-core" : "3.4.1",
|
||||
"org.javassist:javassist" : "3.21.0-GA",
|
||||
"org.jboss:jboss-transaction-spi" : "7.5.0.Final",
|
||||
"org.jboss.logging:jboss-logging" : "3.3.0.Final",
|
||||
"org.jboss.narayana.jta:jdbc" : "5.5.1.Final",
|
||||
"org.jboss.narayana.jta:jms" : "5.5.1.Final",
|
||||
"org.jboss.narayana.jta:jta" : "5.5.1.Final",
|
||||
"org.jboss.narayana.jts:narayana-jts-integration" : "5.5.1.Final",
|
||||
"org.jdom:jdom2" : "2.0.6",
|
||||
"org.jibx:jibx-run" : "1.3.1",
|
||||
"org.jolokia:jolokia-core" : "1.3.5",
|
||||
"org.jooq:jooq" : "3.9.1",
|
||||
"org.jooq:jooq-codegen" : "3.9.1",
|
||||
"org.jooq:jooq-meta" : "3.9.1",
|
||||
"org.jredis:jredis-core-api" : "06052013",
|
||||
"org.jredis:jredis-core-ri" : "06052013",
|
||||
"org.jruby:jruby" : "1.7.26",
|
||||
"org.json:json" : "20140107",
|
||||
"org.liquibase:liquibase-core" : "3.5.3",
|
||||
"org.mariadb.jdbc:mariadb-java-client" : "1.5.7",
|
||||
"org.mockito:mockito-core" : "1.10.19",
|
||||
"org.mongodb:mongo-java-driver" : "3.4.1",
|
||||
"org.mongodb:mongodb-driver" : "3.4.1",
|
||||
"org.mortbay.jasper:apache-el" : "8.0.33",
|
||||
"org.neo4j:neo4j-ogm-api" : "2.1.1",
|
||||
"org.neo4j:neo4j-ogm-compiler" : "2.1.1",
|
||||
"org.neo4j:neo4j-ogm-core" : "2.1.1",
|
||||
"org.neo4j:neo4j-ogm-http-driver" : "2.1.1",
|
||||
"org.objenesis:objenesis" : "2.5.1",
|
||||
"org.openid4java:openid4java-nodeps" : "0.9.6",
|
||||
"org.postgresql:postgresql" : "9.4.1212.jre7",
|
||||
"org.projectlombok:lombok" : "1.16.12",
|
||||
"org.quartz-scheduler:quartz" : "2.2.3",
|
||||
"org.reactivestreams:reactive-streams" : "1.0.0",
|
||||
"org.seleniumhq.selenium:htmlunit-driver" : "2.21",
|
||||
"org.seleniumhq.selenium:selenium-api" : "2.53.1",
|
||||
"org.seleniumhq.selenium:selenium-chrome-driver" : "2.53.1",
|
||||
"org.seleniumhq.selenium:selenium-firefox-driver" : "2.53.1",
|
||||
"org.seleniumhq.selenium:selenium-ie-driver" : "2.53.1",
|
||||
"org.seleniumhq.selenium:selenium-java" : "2.53.1",
|
||||
"org.seleniumhq.selenium:selenium-remote-driver" : "2.53.1",
|
||||
"org.seleniumhq.selenium:selenium-safari-driver" : "2.53.1",
|
||||
"org.seleniumhq.selenium:selenium-support" : "2.53.1",
|
||||
"org.skyscreamer:jsonassert" : "1.4.0",
|
||||
"org.slf4j:jcl-over-slf4j" : "1.7.22",
|
||||
"org.slf4j:jul-to-slf4j" : "1.7.22",
|
||||
"org.slf4j:log4j-over-slf4j" : "1.7.22",
|
||||
"org.slf4j:slf4j-api" : "1.7.22",
|
||||
"org.slf4j:slf4j-jdk14" : "1.7.22",
|
||||
"org.slf4j:slf4j-log4j12" : "1.7.22",
|
||||
"org.slf4j:slf4j-simple" : "1.7.22",
|
||||
"org.spockframework:spock-core" : "1.0-groovy-2.4",
|
||||
"org.spockframework:spock-spring" : "1.0-groovy-2.4",
|
||||
"org.springframework:spring-aop" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-aspects" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-beans" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-context" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-context-support" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-core" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-expression" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-instrument" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-instrument-tomcat" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-jdbc" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-jms" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-messaging" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-orm" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-oxm" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-test" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-tx" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-web" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-webmvc" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-webmvc-portlet" : "4.3.6.RELEASE",
|
||||
"org.springframework:spring-websocket" : "4.3.6.RELEASE",
|
||||
"org.springframework:springloaded" : "1.2.6.RELEASE",
|
||||
"org.springframework.amqp:spring-amqp" : "1.7.0.RELEASE",
|
||||
"org.springframework.amqp:spring-rabbit" : "1.7.0.RELEASE",
|
||||
"org.springframework.batch:spring-batch-core" : "3.0.7.RELEASE",
|
||||
"org.springframework.batch:spring-batch-infrastructure" : "3.0.7.RELEASE",
|
||||
"org.springframework.batch:spring-batch-integration" : "3.0.7.RELEASE",
|
||||
"org.springframework.batch:spring-batch-test" : "3.0.7.RELEASE",
|
||||
"org.springframework.boot:spring-boot" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-actuator" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-actuator-docs" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-autoconfigure" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-autoconfigure-processor" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-configuration-metadata" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-configuration-processor" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-devtools" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-loader" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-loader-tools" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-activemq" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-actuator" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-amqp" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-aop" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-artemis" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-batch" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-cache" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-cloud-connectors" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-cassandra" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-couchbase" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-elasticsearch" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-gemfire" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-jpa" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-ldap" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-mongodb" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-neo4j" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-redis" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-rest" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-data-solr" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-freemarker" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-groovy-templates" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-hateoas" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-integration" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-jdbc" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-jersey" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-jetty" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-jooq" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-jta-atomikos" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-jta-bitronix" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-jta-narayana" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-log4j2" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-logging" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-mail" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-mobile" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-mustache" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-remote-shell" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-security" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-social-facebook" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-social-linkedin" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-social-twitter" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-test" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-thymeleaf" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-tomcat" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-undertow" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-validation" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-web" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-web-services" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-starter-websocket" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-test" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-test-autoconfigure" : "1.5.1.RELEASE",
|
||||
"org.springframework.boot:spring-boot-test-support" : "1.5.1.RELEASE",
|
||||
"org.springframework.cloud:spring-cloud-cloudfoundry-connector" : "1.2.3.RELEASE",
|
||||
"org.springframework.cloud:spring-cloud-core" : "1.2.3.RELEASE",
|
||||
"org.springframework.cloud:spring-cloud-heroku-connector" : "1.2.3.RELEASE",
|
||||
"org.springframework.cloud:spring-cloud-localconfig-connector" : "1.2.3.RELEASE",
|
||||
"org.springframework.cloud:spring-cloud-spring-service-connector" : "1.2.3.RELEASE",
|
||||
"org.springframework.data:spring-cql" : "1.5.0.RELEASE",
|
||||
"org.springframework.data:spring-data-cassandra" : "1.5.0.RELEASE",
|
||||
"org.springframework.data:spring-data-commons" : "1.13.0.RELEASE",
|
||||
"org.springframework.data:spring-data-couchbase" : "2.2.0.RELEASE",
|
||||
"org.springframework.data:spring-data-elasticsearch" : "2.1.0.RELEASE",
|
||||
"org.springframework.data:spring-data-envers" : "1.1.0.RELEASE",
|
||||
"org.springframework.data:spring-data-gemfire" : "1.9.0.RELEASE",
|
||||
"org.springframework.data:spring-data-jpa" : "1.11.0.RELEASE",
|
||||
"org.springframework.data:spring-data-keyvalue" : "1.2.0.RELEASE",
|
||||
"org.springframework.data:spring-data-ldap" : "1.0.0.RELEASE",
|
||||
"org.springframework.data:spring-data-mongodb" : "1.10.0.RELEASE",
|
||||
"org.springframework.data:spring-data-mongodb-cross-store" : "1.10.0.RELEASE",
|
||||
"org.springframework.data:spring-data-mongodb-log4j" : "1.10.0.RELEASE",
|
||||
"org.springframework.data:spring-data-neo4j" : "4.2.0.RELEASE",
|
||||
"org.springframework.data:spring-data-redis" : "1.8.0.RELEASE",
|
||||
"org.springframework.data:spring-data-rest-core" : "2.6.0.RELEASE",
|
||||
"org.springframework.data:spring-data-rest-hal-browser" : "2.6.0.RELEASE",
|
||||
"org.springframework.data:spring-data-rest-webmvc" : "2.6.0.RELEASE",
|
||||
"org.springframework.data:spring-data-solr" : "2.1.0.RELEASE",
|
||||
"org.springframework.hateoas:spring-hateoas" : "0.23.0.RELEASE",
|
||||
"org.springframework.integration:spring-integration-amqp" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-core" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-event" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-feed" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-file" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-flow" : "1.0.0.RELEASE",
|
||||
"org.springframework.integration:spring-integration-ftp" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-gemfire" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-groovy" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-http" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-ip" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-java-dsl" : "1.2.1.RELEASE",
|
||||
"org.springframework.integration:spring-integration-jdbc" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-jms" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-jmx" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-jpa" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-kafka" : "2.1.0.RELEASE",
|
||||
"org.springframework.integration:spring-integration-mail" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-mongodb" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-mqtt" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-redis" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-rmi" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-scripting" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-security" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-sftp" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-splunk" : "1.1.0.RELEASE",
|
||||
"org.springframework.integration:spring-integration-stomp" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-stream" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-syslog" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-test" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-twitter" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-websocket" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-ws" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-xml" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-xmpp" : "4.3.7.RELEASE",
|
||||
"org.springframework.integration:spring-integration-zookeeper" : "4.3.7.RELEASE",
|
||||
"org.springframework.kafka:spring-kafka" : "1.1.2.RELEASE",
|
||||
"org.springframework.kafka:spring-kafka-test" : "1.1.2.RELEASE",
|
||||
"org.springframework.ldap:spring-ldap-core" : "2.3.1.RELEASE",
|
||||
"org.springframework.ldap:spring-ldap-core-tiger" : "2.3.1.RELEASE",
|
||||
"org.springframework.ldap:spring-ldap-ldif-batch" : "2.3.1.RELEASE",
|
||||
"org.springframework.ldap:spring-ldap-ldif-core" : "2.3.1.RELEASE",
|
||||
"org.springframework.ldap:spring-ldap-odm" : "2.3.1.RELEASE",
|
||||
"org.springframework.ldap:spring-ldap-test" : "2.3.1.RELEASE",
|
||||
"org.springframework.mobile:spring-mobile-device" : "1.1.5.RELEASE",
|
||||
"org.springframework.plugin:spring-plugin-core" : "1.2.0.RELEASE",
|
||||
"org.springframework.plugin:spring-plugin-metadata" : "1.2.0.RELEASE",
|
||||
"org.springframework.restdocs:spring-restdocs-core" : "1.1.2.RELEASE",
|
||||
"org.springframework.restdocs:spring-restdocs-mockmvc" : "1.1.2.RELEASE",
|
||||
"org.springframework.restdocs:spring-restdocs-restassured" : "1.1.2.RELEASE",
|
||||
"org.springframework.retry:spring-retry" : "1.2.0.RELEASE",
|
||||
"org.springframework.security:spring-security-acl" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-aspects" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-cas" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-config" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-core" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-crypto" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-data" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-jwt" : "1.0.7.RELEASE",
|
||||
"org.springframework.security:spring-security-ldap" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-messaging" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-openid" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-remoting" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-taglibs" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-test" : "4.2.1.RELEASE",
|
||||
"org.springframework.security:spring-security-web" : "4.2.1.RELEASE",
|
||||
"org.springframework.security.oauth:spring-security-oauth" : "2.0.12.RELEASE",
|
||||
"org.springframework.security.oauth:spring-security-oauth2" : "2.0.12.RELEASE",
|
||||
"org.springframework.session:spring-session" : "1.3.0.RELEASE",
|
||||
"org.springframework.session:spring-session-data-gemfire" : "1.3.0.RELEASE",
|
||||
"org.springframework.session:spring-session-data-mongo" : "1.3.0.RELEASE",
|
||||
"org.springframework.session:spring-session-data-redis" : "1.3.0.RELEASE",
|
||||
"org.springframework.session:spring-session-hazelcast" : "1.3.0.RELEASE",
|
||||
"org.springframework.session:spring-session-jdbc" : "1.3.0.RELEASE",
|
||||
"org.springframework.shell:spring-shell" : "1.1.0.RELEASE",
|
||||
"org.springframework.social:spring-social-config" : "1.1.4.RELEASE",
|
||||
"org.springframework.social:spring-social-core" : "1.1.4.RELEASE",
|
||||
"org.springframework.social:spring-social-facebook" : "2.0.3.RELEASE",
|
||||
"org.springframework.social:spring-social-facebook-web" : "2.0.3.RELEASE",
|
||||
"org.springframework.social:spring-social-linkedin" : "1.0.2.RELEASE",
|
||||
"org.springframework.social:spring-social-security" : "1.1.4.RELEASE",
|
||||
"org.springframework.social:spring-social-twitter" : "1.1.2.RELEASE",
|
||||
"org.springframework.social:spring-social-web" : "1.1.4.RELEASE",
|
||||
"org.springframework.webflow:spring-binding" : "2.4.4.RELEASE",
|
||||
"org.springframework.webflow:spring-faces" : "2.4.4.RELEASE",
|
||||
"org.springframework.webflow:spring-js" : "2.4.4.RELEASE",
|
||||
"org.springframework.webflow:spring-js-resources" : "2.4.4.RELEASE",
|
||||
"org.springframework.webflow:spring-webflow" : "2.4.4.RELEASE",
|
||||
"org.springframework.ws:spring-ws-core" : "2.4.0.RELEASE",
|
||||
"org.springframework.ws:spring-ws-security" : "2.4.0.RELEASE",
|
||||
"org.springframework.ws:spring-ws-support" : "2.4.0.RELEASE",
|
||||
"org.springframework.ws:spring-ws-test" : "2.4.0.RELEASE",
|
||||
"org.springframework.ws:spring-xml" : "2.4.0.RELEASE",
|
||||
"org.testng:testng" : "6.10",
|
||||
"org.threeten:threetenbp" : "1.3.3",
|
||||
"org.thymeleaf:thymeleaf" : "2.1.5.RELEASE",
|
||||
"org.thymeleaf:thymeleaf-spring4" : "2.1.5.RELEASE",
|
||||
"org.thymeleaf.extras:thymeleaf-extras-conditionalcomments" : "2.1.2.RELEASE",
|
||||
"org.thymeleaf.extras:thymeleaf-extras-java8time" : "2.1.0.RELEASE",
|
||||
"org.thymeleaf.extras:thymeleaf-extras-springsecurity4" : "2.1.3.RELEASE",
|
||||
"org.webjars:bootstrap" : "2.3.2",
|
||||
"org.webjars:hal-browser" : "9f96c74",
|
||||
"org.webjars:html5shiv" : "3.7.3",
|
||||
"org.webjars:json-editor" : "0.7.21",
|
||||
"org.webjars:knockout" : "2.3.0",
|
||||
"org.webjars:sockjs-client" : "0.3.4",
|
||||
"org.webjars:stomp-websocket" : "2.3.0",
|
||||
"org.webjars:webjars-locator" : "0.32",
|
||||
"org.webjars:webjars-taglib" : "0.3",
|
||||
"org.xerial:sqlite-jdbc" : "3.15.1",
|
||||
"org.xerial.snappy:snappy-java" : "1.1.2.6",
|
||||
"org.xmlbeam:xmlprojector" : "1.4.9",
|
||||
"org.yaml:snakeyaml" : "1.17",
|
||||
"org.zeromq:jeromq" : "0.3.4",
|
||||
"redis.clients:jedis" : "2.9.0",
|
||||
"velocity-tools:velocity-tools-view" : "1.4",
|
||||
"wsdl4j:wsdl4j" : "1.6.3",
|
||||
"xml-apis:xml-apis" : "1.4.01",
|
||||
"xmlunit:xmlunit" : "1.6",
|
||||
"xom:xom" : "1.2.5",
|
||||
"org.gebish:geb-spock" : "1.1.1",
|
||||
"org.powermock:powermock-core" : "1.6.2",
|
||||
"org.powermock:powermock-api-support" : "1.6.2",
|
||||
"org.powermock:powermock-module-junit4-common" : "1.6.2",
|
||||
"org.powermock:powermock-module-junit4" : "1.6.2",
|
||||
"org.powermock:powermock-api-mockito" : "1.6.2",
|
||||
"org.powermock:powermock-reflect" : "1.6.2"
|
||||
]
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
def id = "${details.requested.group}:${details.requested.name}"
|
||||
|
||||
if(deps[id]) {
|
||||
details.useVersion deps[id]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
plugins {
|
||||
id 'io.spring.convention.docs'
|
||||
id 'java'
|
||||
}
|
||||
|
||||
version = '1.0.0.BUILD-SNAPSHOT'
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user