Compare commits
13 Commits
acs-jscons
...
propagate/
Author | SHA1 | Date | |
---|---|---|---|
|
d15d9d291c | ||
|
ec79404d1c | ||
|
f23cda3fd1 | ||
|
fd79be4aed | ||
b4be2e251c | |||
0be038fe07 | |||
25d0633fdb | |||
44b6f26f4f | |||
ca420b43e2 | |||
8be7673ad3 | |||
b124cd027c | |||
77f2c5e0f1 | |||
919d842d61 |
1
.env
1
.env
@@ -4,3 +4,4 @@ ALFRESCO_LICENSE_DIR=~/alfresco/license
|
|||||||
PROXY_PROTOCOL=http
|
PROXY_PROTOCOL=http
|
||||||
PROXY_HOST=localhost
|
PROXY_HOST=localhost
|
||||||
PROXY_PORT=8080
|
PROXY_PORT=8080
|
||||||
|
IDENTITY_SERVICE_BASEURL=http://auth.example.org:8080
|
||||||
|
@@ -1,16 +0,0 @@
|
|||||||
FROM alfresco/alfresco-content-repository-community:6.2.0-ga
|
|
||||||
|
|
||||||
ARG USERNAME=alfresco
|
|
||||||
ARG TOMCAT_DIR=/usr/local/tomcat
|
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
COPY catalina.policy /tmp/catalina.policy.ext
|
|
||||||
COPY tomcat-platform-context.xml ${TOMCAT_DIR}/conf/Catalina/localhost/alfresco.xml
|
|
||||||
COPY *.amp ${TOMCAT_DIR}/amps/
|
|
||||||
|
|
||||||
RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar install ${TOMCAT_DIR}/amps ${TOMCAT_DIR}/webapps/alfresco -nobackup -directory && \
|
|
||||||
mkdir -p ${TOMCAT_DIR}/modules/platform && \
|
|
||||||
cat /tmp/catalina.policy.ext >> ${TOMCAT_DIR}/conf/catalina.policy
|
|
||||||
|
|
||||||
USER ${USERNAME}
|
|
@@ -1,3 +0,0 @@
|
|||||||
## Usage
|
|
||||||
|
|
||||||
Download all AMP files needed into this directory. All of them will be copied into a new Docker image and installed into the Alfresco Platform web application.
|
|
@@ -1,4 +0,0 @@
|
|||||||
grant codeBase "file:${catalina.base}/modules/-" {
|
|
||||||
permission java.security.AllPermission;
|
|
||||||
};
|
|
||||||
|
|
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<Context>
|
|
||||||
<Resources>
|
|
||||||
<PreResources base="${catalina.base}/modules/platform" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" readOnly="true" />
|
|
||||||
</Resources>
|
|
||||||
</Context>
|
|
@@ -1,3 +0,0 @@
|
|||||||
## Usage
|
|
||||||
|
|
||||||
Download all JAR module files needed into this directory. All of them will be dynamically loaded into the Docker container and loaded into the Alfresco Platform web application.
|
|
@@ -1,10 +0,0 @@
|
|||||||
FROM alfresco/alfresco-share:6.2.2
|
|
||||||
|
|
||||||
ARG TOMCAT_DIR=/usr/local/tomcat
|
|
||||||
|
|
||||||
COPY tomcat-share-context.xml ${TOMCAT_DIR}/conf/Catalina/localhost/share.xml
|
|
||||||
COPY *.amp ${TOMCAT_DIR}/amps_share/
|
|
||||||
|
|
||||||
RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar install ${TOMCAT_DIR}/amps_share ${TOMCAT_DIR}/webapps/share -nobackup -directory && \
|
|
||||||
mkdir -p ${TOMCAT_DIR}/modules/share
|
|
||||||
|
|
@@ -1,3 +0,0 @@
|
|||||||
## Usage
|
|
||||||
|
|
||||||
Download all AMP files needed into this directory. All of them will be copied into a new Docker image and installed into the Alfresco Share web application.
|
|
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<Context>
|
|
||||||
<Resources>
|
|
||||||
<PreResources base="${catalina.base}/modules/share" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" readOnly="true" />
|
|
||||||
</Resources>
|
|
||||||
</Context>
|
|
@@ -1,3 +0,0 @@
|
|||||||
## Usage
|
|
||||||
|
|
||||||
Download all JAR module files needed into this directory. All of them will be dynamically loaded into the Docker container and loaded into the Alfresco Share web application.
|
|
@@ -5,8 +5,7 @@ version: "2"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
platform:
|
platform:
|
||||||
build: ./alfresco-content-repository/docker
|
image: alfresco/alfresco-content-repository-community:6.2.0-ga
|
||||||
image: local/alfresco-content-repository:6.2.0-ga
|
|
||||||
mem_limit: 1700m
|
mem_limit: 1700m
|
||||||
environment:
|
environment:
|
||||||
JAVA_OPTS: "
|
JAVA_OPTS: "
|
||||||
@@ -38,6 +37,10 @@ services:
|
|||||||
|
|
||||||
-Dtransform.service.enabled=false
|
-Dtransform.service.enabled=false
|
||||||
|
|
||||||
|
-Dauthentication.chain=aims:identity-service,builtin:alfrescoNtlm
|
||||||
|
-Didentity-service.authentication.defaultAdministratorUserNames=admin.1
|
||||||
|
-Didentity-service.auth-server-url=${IDENTITY_SERVICE_BASEURL}/auth
|
||||||
|
|
||||||
-Dsystem.content.eagerOrphanCleanup=true
|
-Dsystem.content.eagerOrphanCleanup=true
|
||||||
-Dsystem.content.orphanProtectDays=0
|
-Dsystem.content.orphanProtectDays=0
|
||||||
-Djodconverter.enabled=false
|
-Djodconverter.enabled=false
|
||||||
@@ -45,16 +48,12 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- postgres-acs
|
- postgres-acs
|
||||||
- activemq
|
- activemq
|
||||||
volumes:
|
|
||||||
- "./alfresco-content-repository/modules:/usr/local/tomcat/modules/platform:ro"
|
|
||||||
|
|
||||||
transform-core-aio:
|
transform-core-aio:
|
||||||
image: alfresco/alfresco-transform-core-aio:2.3.6
|
image: alfresco/alfresco-transform-core-aio:2.3.6
|
||||||
mem_limit: 1g
|
|
||||||
|
|
||||||
share:
|
share:
|
||||||
build: ./alfresco-share/docker
|
image: alfresco/alfresco-share:6.2.2
|
||||||
image: local/alfresco-share:6.2.2
|
|
||||||
mem_limit: 512m
|
mem_limit: 512m
|
||||||
environment:
|
environment:
|
||||||
REPO_HOST: "platform"
|
REPO_HOST: "platform"
|
||||||
@@ -67,13 +66,21 @@ services:
|
|||||||
-Dalfresco.host=${PROXY_HOST}
|
-Dalfresco.host=${PROXY_HOST}
|
||||||
-Dalfresco.port=${PROXY_PORT}
|
-Dalfresco.port=${PROXY_PORT}
|
||||||
-Dalfresco.protocol=${PROXY_PROTOCOL}
|
-Dalfresco.protocol=${PROXY_PROTOCOL}
|
||||||
|
-Daims.enabled=true
|
||||||
|
-Daims.realm=alfresco
|
||||||
|
-Daims.resource=acs-share
|
||||||
|
-Daims.authServerUrl=${IDENTITY_SERVICE_BASEURL}/auth
|
||||||
|
-Daims.sslRequired=none
|
||||||
|
-Daims.publicClient=true
|
||||||
|
-Daims.autodetectBearerOnly=true
|
||||||
|
-Daims.alwaysRefreshToken=true
|
||||||
|
-Daims.principalAttribute=preferred_username
|
||||||
|
-Daims.enableBasicAuth=true
|
||||||
"
|
"
|
||||||
volumes:
|
|
||||||
- "./alfresco-share/modules:/usr/local/tomcat/modules/share:ro"
|
|
||||||
|
|
||||||
postgres-acs:
|
postgres-acs:
|
||||||
image: postgres:11.7
|
image: postgres:11.7
|
||||||
mem_limit: 128m
|
mem_limit: 512m
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_PASSWORD=alfresco
|
- POSTGRES_PASSWORD=alfresco
|
||||||
- POSTGRES_USER=alfresco
|
- POSTGRES_USER=alfresco
|
||||||
@@ -82,7 +89,7 @@ services:
|
|||||||
|
|
||||||
search:
|
search:
|
||||||
image: alfresco/alfresco-search-services:2.0.1
|
image: alfresco/alfresco-search-services:2.0.1
|
||||||
mem_limit: 1g
|
mem_limit: 2g
|
||||||
environment:
|
environment:
|
||||||
- SOLR_ALFRESCO_HOST=platform
|
- SOLR_ALFRESCO_HOST=platform
|
||||||
- SOLR_ALFRESCO_PORT=8080
|
- SOLR_ALFRESCO_PORT=8080
|
||||||
@@ -93,14 +100,30 @@ services:
|
|||||||
|
|
||||||
activemq:
|
activemq:
|
||||||
image: alfresco/alfresco-activemq:5.15.8
|
image: alfresco/alfresco-activemq:5.15.8
|
||||||
mem_limit: 512m
|
mem_limit: 256m
|
||||||
|
|
||||||
|
identity:
|
||||||
|
image: alfresco/alfresco-identity-service:1.3
|
||||||
|
user: jboss
|
||||||
|
environment:
|
||||||
|
KEYCLOAK_USER: admin
|
||||||
|
KEYCLOAK_PASSWORD: admin
|
||||||
|
KEYCLOAK_HOSTNAME: auth.example.org
|
||||||
|
KEYCLOAK_IMPORT: /tmp/keycloak-alfresco-realm.json
|
||||||
|
KEYCLOAK_STATISTICS: enabled
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
aliases:
|
||||||
|
- "auth.example.org"
|
||||||
|
volumes:
|
||||||
|
- ./keycloak-alfresco-realm.json:/tmp/keycloak-alfresco-realm.json:ro
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
build: ./nginx-ingress
|
build: ./nginx-ingress
|
||||||
image: local/nginx-ingress:acs-share
|
image: local/nginx-ingress:acs-share-aims
|
||||||
mem_limit: 256m
|
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
depends_on:
|
depends_on:
|
||||||
- platform
|
- platform
|
||||||
- share
|
- share
|
||||||
|
- identity
|
||||||
|
@@ -1,16 +0,0 @@
|
|||||||
# Usage: .\download-jsconsole.ps1
|
|
||||||
$THISDIR=$PSScriptRoot
|
|
||||||
|
|
||||||
$GITHUB_TAG="v0.6.0-rc1"
|
|
||||||
$MAVEN_VERSION="0.6.0"
|
|
||||||
$BASEURL="https://github.com/share-extras/js-console/releases/download"
|
|
||||||
|
|
||||||
$FILENAME="javascript-console-repo-${MAVEN_VERSION}.amp"
|
|
||||||
$URL="${BASEURL}/${GITHUB_TAG}/${FILENAME}"
|
|
||||||
$PATH="${THISDIR}/alfresco-content-repository/docker/${FILENAME}"
|
|
||||||
Invoke-Expression "& '${THISDIR}\scripts\download-url.ps1' '${URL}' '${PATH}'"
|
|
||||||
|
|
||||||
$FILENAME="javascript-console-share-${MAVEN_VERSION}.amp"
|
|
||||||
$URL="${BASEURL}/${GITHUB_TAG}/${FILENAME}"
|
|
||||||
$PATH="${THISDIR}/alfresco-share/docker/${FILENAME}"
|
|
||||||
Invoke-Expression "& '${THISDIR}\scripts\download-url.ps1' '${URL}' '${PATH}'"
|
|
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Usage: ./download-jsconsole.sh
|
|
||||||
THISDIR=`dirname "$(readlink -f "$0")"`
|
|
||||||
|
|
||||||
GITHUB_TAG=v0.6.0-rc1
|
|
||||||
MAVEN_VERSION=0.6.0
|
|
||||||
BASEURL=https://github.com/share-extras/js-console/releases/download
|
|
||||||
|
|
||||||
FILENAME=javascript-console-repo-${MAVEN_VERSION}.amp
|
|
||||||
URL=${BASEURL}/${GITHUB_TAG}/${FILENAME}
|
|
||||||
PATH=${THISDIR}/alfresco-content-repository/docker/${FILENAME}
|
|
||||||
${THISDIR}/scripts/download-url.sh "${URL}" "${PATH}"
|
|
||||||
|
|
||||||
FILENAME=javascript-console-share-${MAVEN_VERSION}.amp
|
|
||||||
URL=${BASEURL}/${GITHUB_TAG}/${FILENAME}
|
|
||||||
PATH=${THISDIR}/alfresco-share/docker/${FILENAME}
|
|
||||||
${THISDIR}/scripts/download-url.sh "${URL}" "${PATH}"
|
|
62
keycloak-alfresco-realm.json
Normal file
62
keycloak-alfresco-realm.json
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"realm": "alfresco",
|
||||||
|
"enabled": true,
|
||||||
|
"sslRequired": "external",
|
||||||
|
"registrationAllowed": false,
|
||||||
|
"roles": {
|
||||||
|
"realm": [ {
|
||||||
|
"name": "user",
|
||||||
|
"description": "User privileges"
|
||||||
|
}, {
|
||||||
|
"name": "admin",
|
||||||
|
"description": "Administrator privileges"
|
||||||
|
} ]
|
||||||
|
},
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"clientId": "alfresco",
|
||||||
|
"name": "Alfresco Products",
|
||||||
|
"enabled": true,
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"redirectUris": [ "*" ],
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"implicitFlowEnabled": true,
|
||||||
|
"directAccessGrantsEnabled": false,
|
||||||
|
"publicClient": true,
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"attributes": {
|
||||||
|
"login_theme": "alfresco"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clientId": "acs-share",
|
||||||
|
"name": "ACS Share",
|
||||||
|
"enabled": true,
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"redirectUris": [ "*" ],
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"implicitFlowEnabled": false,
|
||||||
|
"directAccessGrantsEnabled": false,
|
||||||
|
"publicClient": true,
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"attributes": {
|
||||||
|
"login_theme": "alfresco"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requiredCredentials": [ "password" ],
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"username": "admin",
|
||||||
|
"email": "admin@app.activiti.com",
|
||||||
|
"enabled": true,
|
||||||
|
"credentials" : [
|
||||||
|
{
|
||||||
|
"type" : "password",
|
||||||
|
"value" : "admin"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"realmRoles": [ "user", "admin" ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@@ -8,6 +8,10 @@ if [[ $ACS_SHARE_URL ]]; then
|
|||||||
sed -i s%http:\/\/share:8080%"$ACS_SHARE_URL"%g /etc/nginx/nginx.conf
|
sed -i s%http:\/\/share:8080%"$ACS_SHARE_URL"%g /etc/nginx/nginx.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $AIMS_URL ]]; then
|
||||||
|
sed -i s%http:\/\/identity:8080%"$AIMS_URL"%g /etc/nginx/nginx.conf
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $ACCESS_LOG ]]; then
|
if [[ $ACCESS_LOG ]]; then
|
||||||
sed -i s%\#ENV_ACCESS_LOG%"access_log $ACCESS_LOG;"%g /etc/nginx/nginx.conf
|
sed -i s%\#ENV_ACCESS_LOG%"access_log $ACCESS_LOG;"%g /etc/nginx/nginx.conf
|
||||||
fi
|
fi
|
||||||
|
@@ -19,7 +19,10 @@ http {
|
|||||||
|
|
||||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_buffering off;
|
# proxy_buffering off;
|
||||||
|
proxy_buffer_size 64k;
|
||||||
|
proxy_buffers 4 256k;
|
||||||
|
proxy_busy_buffers_size 256k;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
@@ -51,6 +54,10 @@ http {
|
|||||||
|
|
||||||
location /share/ {
|
location /share/ {
|
||||||
proxy_pass http://share:8080;
|
proxy_pass http://share:8080;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /auth/ {
|
||||||
|
proxy_pass http://identity:8080;
|
||||||
|
|
||||||
# If using external proxy / load balancer (for initial redirect if no trailing slash)
|
# If using external proxy / load balancer (for initial redirect if no trailing slash)
|
||||||
absolute_redirect off;
|
absolute_redirect off;
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
REM Usage: .\download-maven-alfresco-private.bat org/maven/group/path maven-artifact-id 1.2.3 jar a_username a_password
|
|
||||||
@echo off
|
|
||||||
set THISDIR_REL=%~dp0
|
|
||||||
set THISDIR=%THISDIR_REL:~0,-1%
|
|
||||||
|
|
||||||
set MAVEN_BASEURL=https://artifacts.alfresco.com/nexus/content/groups/private
|
|
||||||
|
|
||||||
call "%THISDIR%\download-maven.bat" %MAVEN_BASEURL% %*
|
|
@@ -1,6 +0,0 @@
|
|||||||
# Usage: .\download-maven-alfresco-private.ps1 org/maven/group/path maven-artifact-id 1.2.3 jar a_username a_password
|
|
||||||
$THISDIR=$PSScriptRoot
|
|
||||||
|
|
||||||
$MAVEN_BASEURL="https://artifacts.alfresco.com/nexus/content/groups/private"
|
|
||||||
|
|
||||||
Invoke-Expression "& '${THISDIR}\download-maven.ps1' '${MAVEN_BASEURL}' $args"
|
|
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Usage: ./download-maven-alfresco-private.sh org/maven/group/path maven-artifact-id 1.2.3 jar a_username a_password
|
|
||||||
THISDIR=`dirname "$(readlink -f "$0")"`
|
|
||||||
|
|
||||||
MAVEN_BASEDIR="https://artifacts.alfresco.com/nexus/content/groups/private"
|
|
||||||
|
|
||||||
${THISDIR}/download-maven.sh "${MAVEN_BASEDIR}" $*
|
|
@@ -1,8 +0,0 @@
|
|||||||
REM Usage: .\download-maven-alfresco-public.bat org/maven/group/path maven-artifact-id 1.2.3 jar
|
|
||||||
@echo off
|
|
||||||
set THISDIR_REL=%~dp0
|
|
||||||
set THISDIR=%THISDIR_REL:~0,-1%
|
|
||||||
|
|
||||||
set MAVEN_BASEURL=https://artifacts.alfresco.com/nexus/content/groups/public
|
|
||||||
|
|
||||||
call "%THISDIR%\download-maven.bat" %MAVEN_BASEURL% %*
|
|
@@ -1,6 +0,0 @@
|
|||||||
# Usage: .\download-maven-alfresco-public.ps1 org/maven/group/path maven-artifact-id 1.2.3 jar
|
|
||||||
$THISDIR=$PSScriptRoot
|
|
||||||
|
|
||||||
$MAVEN_BASEURL="https://artifacts.alfresco.com/nexus/content/groups/public"
|
|
||||||
|
|
||||||
Invoke-Expression "& '${THISDIR}\download-maven.ps1' '${MAVEN_BASEURL}' $args"
|
|
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Usage: ./download-maven-alfresco-public.sh org/maven/group/path maven-artifact-id 1.2.3 jar
|
|
||||||
THISDIR=`dirname "$(readlink -f "$0")"`
|
|
||||||
|
|
||||||
MAVEN_BASEDIR="https://artifacts.alfresco.com/nexus/content/groups/public"
|
|
||||||
|
|
||||||
${THISDIR}/download-maven.sh "${MAVEN_BASEDIR}" $*
|
|
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Usage: ./download-maven-inteligr8-private.sh org/maven/group/path maven-artifact-id 1.2.3 jar a_username a_password
|
|
||||||
THISDIR=`dirname "$(readlink -f "$0")"`
|
|
||||||
|
|
||||||
MAVEN_BASEURL="http://repos.yateslong.us/nexus/repository/inteligr8"
|
|
||||||
|
|
||||||
${THISDIR}/download-maven.sh "${MAVEN_BASEURL}" $*
|
|
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Usage: ./download-maven-inteligr8-public.sh org/maven/group/path maven-artifact-id 1.2.3 jar
|
|
||||||
THISDIR=`dirname "$(readlink -f "$0")"`
|
|
||||||
|
|
||||||
MAVEN_BASEURL="http://repos.yateslong.us/nexus/repositories/inteligr8-public"
|
|
||||||
|
|
||||||
${THISDIR}/download-maven.sh "${MAVEN_BASEURL}" $*
|
|
@@ -1,18 +0,0 @@
|
|||||||
REM Usage: .\download-maven.bat https://repo1.maven.org/maven2 org/maven/group/path maven-artifact-id 1.2.3 jar
|
|
||||||
REM Usage: .\download-maven.bat https://repo1.maven.org/maven2 org/maven/group/path maven-artifact-id 1.2.3 jar a_username a_password
|
|
||||||
@echo off
|
|
||||||
set THISDIR_REL=%~dp0
|
|
||||||
set THISDIR=%THISDIR_REL:~0,-1%
|
|
||||||
|
|
||||||
set MAVEN_BASEURL=%1
|
|
||||||
set MAVEN_GROUP_PATH=%2
|
|
||||||
set MAVEN_ARTIFACT_ID=%3
|
|
||||||
set MAVEN_ARTIFACT_VERSION=%4
|
|
||||||
set MAVEN_PACKAGING=%5
|
|
||||||
set HTTP_USERNAME=%6
|
|
||||||
set HTTP_PASSWORD=%7
|
|
||||||
|
|
||||||
set MAVEN_ARTIFACT_FILENAME=%MAVEN_ARTIFACT_ID%-%MAVEN_ARTIFACT_VERSION%.%MAVEN_PACKAGING%
|
|
||||||
set MAVEN_URL=%MAVEN_BASEURL%/%MAVEN_GROUP_PATH%/%MAVEN_ARTIFACT_ID%/%MAVEN_ARTIFACT_VERSION%/%MAVEN_ARTIFACT_FILENAME%
|
|
||||||
|
|
||||||
call "%THISDIR%\download-url.bat" %MAVEN_URL% %MAVEN_ARTIFACT_FILENAME% %HTTP_USERNAME% %HTTP_PASSWORD%
|
|
@@ -1,16 +0,0 @@
|
|||||||
# Usage: .\download-maven.ps1 https://repo1.maven.org/maven2 org/maven/group/path maven-artifact-id 1.2.3 jar
|
|
||||||
# Usage: .\download-maven.ps1 https://repo1.maven.org/maven2 org/maven/group/path maven-artifact-id 1.2.3 jar a_username a_password
|
|
||||||
$THISDIR=$PSScriptRoot
|
|
||||||
|
|
||||||
$MAVEN_BASEURL=$args[0]
|
|
||||||
$MAVEN_GROUP_PATH=$args[1]
|
|
||||||
$MAVEN_ARTIFACT_ID=$args[2]
|
|
||||||
$MAVEN_ARTIFACT_VERSION=$args[3]
|
|
||||||
$MAVEN_PACKAGING=$args[4]
|
|
||||||
$HTTP_USERNAME=$args[5]
|
|
||||||
$HTTP_PASSWORD=$args[6]
|
|
||||||
|
|
||||||
$MAVEN_ARTIFACT_FILENAME="${MAVEN_ARTIFACT_ID}-${MAVEN_ARTIFACT_VERSION}.${MAVEN_PACKAGING}"
|
|
||||||
$MAVEN_URL="${MAVEN_BASEURL}/${MAVEN_GROUP_PATH}/${MAVEN_ARTIFACT_ID}/${MAVEN_ARTIFACT_VERSION}/${MAVEN_ARTIFACT_FILENAME}"
|
|
||||||
|
|
||||||
Invoke-Expression "& '${THISDIR}\download-url.ps1' '${MAVEN_URL}' '${MAVEN_ARTIFACT_FILENAME}' '${HTTP_USERNAME}' '${HTTP_PASSWORD}'"
|
|
@@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Usage: ./download-maven.sh https://repo1.maven.org/maven2 org/maven/group/path maven-artifact-id 1.2.3 jar
|
|
||||||
# Usage: ./download-maven.sh https://repo1.maven.org/maven2 org/maven/group/path maven-artifact-id 1.2.3 jar a_username a_password
|
|
||||||
THISDIR=`dirname "$(readlink -f "$0")"`
|
|
||||||
|
|
||||||
MAVEN_BASEURL=$1
|
|
||||||
MAVEN_GROUP_PATH=$2
|
|
||||||
MAVEN_ARTIFACT_ID=$3
|
|
||||||
MAVEN_ARTIFACT_VERSION=$4
|
|
||||||
MAVEN_PACKAGING=$5
|
|
||||||
HTTP_USERNAME=$6
|
|
||||||
HTTP_PASSWORD=$7
|
|
||||||
|
|
||||||
MAVEN_ARTIFACT_FILENAME=${MAVEN_ARTIFACT_ID}-${MAVEN_ARTIFACT_VERSION}.${MAVEN_PACKAGING}
|
|
||||||
MAVEN_URL=${MAVEN_BASEURL}/${MAVEN_GROUP_PATH}/${MAVEN_ARTIFACT_ID}/${MAVEN_ARTIFACT_VERSION}/${MAVEN_ARTIFACT_FILENAME}
|
|
||||||
echo $MAVEN_URL
|
|
||||||
|
|
||||||
${THISDIR}/download-url.sh "${MAVEN_URL}" "${MAVEN_ARTIFACT_FILENAME}" "${HTTP_USERNAME}" "${HTTP_PASSWORD}"
|
|
@@ -1,13 +0,0 @@
|
|||||||
REM Usage: .\download.bat https://www.a.url/to/download filename_for_downloaded.file
|
|
||||||
REM Usage: .\download.bat https://www.a.url/to/download filename_for_downloaded.file a_username a_password
|
|
||||||
@echo off
|
|
||||||
set URL=%1
|
|
||||||
set FILENAME=%2
|
|
||||||
|
|
||||||
if NOT "%~3" == "" (
|
|
||||||
set USERNAME=%3
|
|
||||||
set PASSWORD=%4
|
|
||||||
curl -L -o %FILENAME% -u %USERNAME%:%PASSWORD% %URL%
|
|
||||||
) else (
|
|
||||||
curl -L -o %FILENAME% %URL%
|
|
||||||
)
|
|
@@ -1,16 +0,0 @@
|
|||||||
# Usage: .\download.ps1 https://www.a.url/to/download filename_for_downloaded.file
|
|
||||||
# Usage: .\download.ps1 https://www.a.url/to/download filename_for_downloaded.file a_username a_password
|
|
||||||
$URL=$args[0]
|
|
||||||
$FILENAME=$args[1]
|
|
||||||
|
|
||||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
|
||||||
if ($args.count -gt 2) {
|
|
||||||
$USERNAME=$args[2]
|
|
||||||
$PASSWORD=$args[3]
|
|
||||||
|
|
||||||
$AUTH_PAIR=[System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$($USERNAME):$($PASSWORD)"))
|
|
||||||
$AUTH_HEADERS=@{Authorization="Basic $AUTH_PAIR"}
|
|
||||||
Invoke-WebRequest -Uri "${URL}" -OutFile "${FILENAME}" -Headers ${AUTH_HEADERS}
|
|
||||||
} else {
|
|
||||||
Invoke-WebRequest -Uri "${URL}" -OutFile "${FILENAME}"
|
|
||||||
}
|
|
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Usage: ./download.sh https://www.a.url/to/download filename_for_downloaded.file
|
|
||||||
# Usage: ./download.sh https://www.a.url/to/download filename_for_downloaded.file a_username a_password
|
|
||||||
URL=$1
|
|
||||||
FILENAME=$2
|
|
||||||
|
|
||||||
if [ "$#" -gt 2 ]; then
|
|
||||||
USERNAME=$3
|
|
||||||
PASSWORD=$4
|
|
||||||
curl -L -o "${FILENAME}" -u "${USERNAME}:${PASSWORD}" ${URL}
|
|
||||||
else
|
|
||||||
curl -L -o "${FILENAME}" ${URL}
|
|
||||||
fi
|
|
@@ -1,11 +0,0 @@
|
|||||||
REM Usage: .\unpack.bat filename.zip
|
|
||||||
REM Usage: .\unpack.bat filename.zip c:\
|
|
||||||
@echo off
|
|
||||||
set FILENAME=%1
|
|
||||||
|
|
||||||
if NOT "%~2" == "" (
|
|
||||||
set DESTPATH=%2
|
|
||||||
powershell -command "Expand-Archive -Force -Path '%FILENAME%' -DestinationPath '%DESTPATH%'"
|
|
||||||
) else (
|
|
||||||
powershell -command "Expand-Archive -Force -Path '%FILENAME%' -DestinationPath '%~dp0'"
|
|
||||||
)
|
|
@@ -1,10 +0,0 @@
|
|||||||
# Usage: .\unpack.ps1 filename.zip
|
|
||||||
# Usage: .\unpack.ps1 filename.zip c:\
|
|
||||||
$FILENAME=$args[0]
|
|
||||||
|
|
||||||
if ($args.count -gt 1) {
|
|
||||||
$DESTPATH=$args[1]
|
|
||||||
Expand-Archive -Force -Path "${FILENAME}" -DestinationPath "${DESTPATH}"
|
|
||||||
} else {
|
|
||||||
Expand-Archive -Force -Path "${FILENAME}"
|
|
||||||
}
|
|
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Usage: ./unpack.sh filename.zip
|
|
||||||
# Usage: ./unpack.sh filename.zip /home/user
|
|
||||||
FILENAME=$1
|
|
||||||
|
|
||||||
if [ "$#" -gt 1 ]; then
|
|
||||||
DESTPATH=$2
|
|
||||||
unzip -d ${DESTPATH} ${FILENAME}
|
|
||||||
else
|
|
||||||
unzip ${FILENAME}
|
|
||||||
fi
|
|
Reference in New Issue
Block a user