KEYCLOAK-4008 Include checksums in download files
This commit is contained in:
parent
1c7de24084
commit
3de77b7be9
4 changed files with 138 additions and 334 deletions
33
distribution/downloads/assembly.xml
Normal file
33
distribution/downloads/assembly.xml
Normal file
|
@ -0,0 +1,33 @@
|
|||
<!--
|
||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
|
||||
~ and other contributors as indicated by the @author tags.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<assembly>
|
||||
<id>server-dist</id>
|
||||
|
||||
<formats>
|
||||
<format>dir</format>
|
||||
</formats>
|
||||
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${localRepository}/org/keycloak</directory>
|
||||
<includes>
|
||||
<include>**/*.zip</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
|
@ -25,16 +25,25 @@
|
|||
</parent>
|
||||
|
||||
<artifactId>keycloak-dist-downloads</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<packaging>jar</packaging>
|
||||
<name>Keycloak Release Downloads</name>
|
||||
<description/>
|
||||
|
||||
<dependencies>
|
||||
|
||||
</dependencies>
|
||||
<properties>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
|
@ -43,342 +52,22 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>server-downloads</id>
|
||||
<phase>install</phase>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
<goal>java</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-server-dist</artifactId>
|
||||
<type>zip</type>
|
||||
<destFileName>keycloak-${project.version}.zip</destFileName>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-server-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
<destFileName>keycloak-${project.version}.tar.gz</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-demo-dist</artifactId>
|
||||
<type>zip</type>
|
||||
<destFileName>keycloak-demo-${project.version}.zip</destFileName>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-demo-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
<destFileName>keycloak-demo-${project.version}.tar.gz</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-server-overlay</artifactId>
|
||||
<type>zip</type>
|
||||
<destFileName>keycloak-overlay-${project.version}.zip</destFileName>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-server-overlay</artifactId>
|
||||
<type>tar.gz</type>
|
||||
<destFileName>keycloak-overlay-${project.version}.tar.gz</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-proxy-dist</artifactId>
|
||||
<type>zip</type>
|
||||
<destFileName>keycloak-proxy-${project.version}.zip</destFileName>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-api-docs-dist</artifactId>
|
||||
<type>zip</type>
|
||||
<destFileName>keycloak-api-docs-${project.version}.zip</destFileName>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-examples-dist</artifactId>
|
||||
<type>zip</type>
|
||||
<destFileName>keycloak-examples-${project.version}.zip</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<outputDirectory>target/${project.version}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>adapter-downloads</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-as7-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-as7-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-eap6-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-jetty81-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-jetty81-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-jetty91-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-jetty91-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-jetty92-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-jetty92-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-jetty93-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-jetty93-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-js-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-js-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-tomcat6-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-tomcat6-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-tomcat7-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-tomcat7-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-tomcat8-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-tomcat8-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-wf8-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-wf8-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-wildfly-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-wildfly-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-fuse-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-fuse-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<outputDirectory>target/${project.version}/adapters/keycloak-oidc</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>saml-adapter-downloads</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-as7-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-as7-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-eap6-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-eap6-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-jetty81-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-jetty81-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-jetty92-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-jetty92-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-jetty93-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-jetty93-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-tomcat6-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-tomcat6-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-tomcat7-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-tomcat7-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-tomcat8-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-tomcat8-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-wildfly-adapter-dist</artifactId>
|
||||
<type>zip</type>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.keycloak</groupId>
|
||||
<artifactId>keycloak-saml-wildfly-adapter-dist</artifactId>
|
||||
<type>tar.gz</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<outputDirectory>target/${project.version}/adapters/saml</outputDirectory>
|
||||
<mainClass>CopyDependencies</mainClass>
|
||||
<arguments>
|
||||
<argument>${settings.localRepository}</argument>
|
||||
<argument>${project.build.directory}</argument>
|
||||
<argument>${project.version}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
49
distribution/downloads/src/main/java/CopyDependencies.java
Normal file
49
distribution/downloads/src/main/java/CopyDependencies.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
|
||||
/**
|
||||
* Created by st on 06.02.17.
|
||||
*/
|
||||
public class CopyDependencies {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
String version = args[2];
|
||||
|
||||
Path repository = new File(args[0]).toPath().resolve("org").resolve("keycloak");
|
||||
Path targetRoot = new File(args[1]).toPath().resolve(version);
|
||||
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(CopyDependencies.class.getResourceAsStream("files")));
|
||||
|
||||
Path target = targetRoot;
|
||||
for (String l = br.readLine(); l != null; l = br.readLine()) {
|
||||
|
||||
if (l.startsWith("./")) {
|
||||
target = targetRoot.resolve(l.replace("./", "").replace('/', File.separatorChar));
|
||||
if (!target.toFile().isDirectory()) {
|
||||
target.toFile().mkdirs();
|
||||
}
|
||||
} else if (l.trim().length() > 0) {
|
||||
String[] t = l.trim().split(":");
|
||||
|
||||
String artifactName = t[0];
|
||||
String destName = t.length == 1 ? artifactName : t[1];
|
||||
|
||||
File artifactDir = repository.resolve(artifactName).resolve(version).toFile();
|
||||
|
||||
for (File f : artifactDir.listFiles((file, name) -> name.contains(".tar.gz") || name.contains(".zip"))) {
|
||||
Files.copy(f.toPath(), target.resolve(f.getName().replace(artifactName, destName)), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
|
||||
System.out.println(artifactName);
|
||||
}
|
||||
}
|
||||
|
||||
br.close();
|
||||
}
|
||||
|
||||
}
|
33
distribution/downloads/src/main/resources/files
Normal file
33
distribution/downloads/src/main/resources/files
Normal file
|
@ -0,0 +1,33 @@
|
|||
./
|
||||
keycloak-server-dist:keycloak
|
||||
keycloak-demo-dist:keycloak-demo
|
||||
keycloak-server-overlay:keycloak-overlay
|
||||
keycloak-proxy-dist:keycloak-proxy
|
||||
keycloak-api-docs-dist:keycloak-api-docs
|
||||
keycloak-examples-dist:keycloak-examples
|
||||
|
||||
./adapters/keycloak-oidc
|
||||
keycloak-as7-adapter-dist
|
||||
keycloak-eap6-adapter-dist
|
||||
keycloak-jetty81-adapter-dist
|
||||
keycloak-jetty91-adapter-dist
|
||||
keycloak-jetty92-adapter-dist
|
||||
keycloak-jetty93-adapter-dist
|
||||
keycloak-js-adapter-dist
|
||||
keycloak-tomcat6-adapter-dist
|
||||
keycloak-tomcat7-adapter-dist
|
||||
keycloak-tomcat8-adapter-dist
|
||||
keycloak-wf8-adapter-dist
|
||||
keycloak-wildfly-adapter-dist
|
||||
keycloak-fuse-adapter-dist
|
||||
|
||||
./adapters/saml
|
||||
keycloak-saml-as7-adapter-dist
|
||||
keycloak-saml-eap6-adapter-dist
|
||||
keycloak-saml-jetty81-adapter-dist
|
||||
keycloak-saml-jetty92-adapter-dist
|
||||
keycloak-saml-jetty93-adapter-dist
|
||||
keycloak-saml-tomcat6-adapter-dist
|
||||
keycloak-saml-tomcat7-adapter-dist
|
||||
keycloak-saml-tomcat8-adapter-dist
|
||||
keycloak-saml-wildfly-adapter-dist
|
Loading…
Reference in a new issue