forked from eclipse-ee4j/jersey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Maxim Nesen <[email protected]>
- Loading branch information
Showing
29 changed files
with
280 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
readonly VALIDATION_DEPENDENCIES_MATCH='<!-- Insert dependencies here -->' | ||
readonly VALIDATION_POM=validation.pom.xml | ||
readonly POM_TEMPLATE_NAME=pom.template.xml | ||
readonly TEMP_FILE=modules.xml | ||
|
||
readonly MVN_CLI='org.apache.maven.plugins:maven-enforcer-plugin:enforce -Denforcer.rules=dependencyConvergence' | ||
|
||
readonly DEPENDENCY_GENERATION_PATTERN='<dependency><groupId>${project.groupId}</groupId><artifactId>${project.artifactId}</artifactId><version>${jersey.version}</version></dependency>' | ||
|
||
# Path to this script | ||
[ -h "${0}" ] && readonly SCRIPT_PATH="$(readlink "${0}")" || readonly SCRIPT_PATH="${0}" | ||
|
||
readonly CURRENT_LOCATION=$(dirname -- "${SCRIPT_PATH}") | ||
readonly WS_DIR=$(cd ${CURRENT_LOCATION}; cd '../../..' ; pwd -P) | ||
|
||
#Prepare pom.xml from template | ||
|
||
cp -a ${CURRENT_LOCATION}/${POM_TEMPLATE_NAME} ${CURRENT_LOCATION}/${VALIDATION_POM} | ||
|
||
export JERSEY_VERSION=$(mvn exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' -f ${WS_DIR}/pom.xml -q -pl org.glassfish.jersey:project) | ||
|
||
echo "Validating convergences for Jersey "$JERSEY_VERSION | ||
echo '****************************************************' | ||
echo `mvn -v` | ||
echo '****************************************************' | ||
|
||
#get list of modules to b validated | ||
mvn -f ${WS_DIR}/pom.xml -Dexec.executable='echo' \ | ||
-Dtests.excluded \ | ||
-Dexec.args=${DEPENDENCY_GENERATION_PATTERN} \ | ||
${MVN_ARGS} \ | ||
${EXCLUDE_ARGS} \ | ||
-pl '!:helloworld-benchmark' exec:exec -q > ${CURRENT_LOCATION}/${TEMP_FILE} | ||
|
||
#add the list of modules to the prepared pom.xml | ||
sed -e "/${VALIDATION_DEPENDENCIES_MATCH}/ {" -e "r ${CURRENT_LOCATION}/${TEMP_FILE}" -e 'd' -e '}' -i ${CURRENT_LOCATION}/${VALIDATION_POM} | ||
|
||
#run validation | ||
mvn ${MVN_ARGS} ${MVN_CLI} -f ${CURRENT_LOCATION}/${VALIDATION_POM} -Djersey.version=${JERSEY_VERSION} | ||
|
||
#clean the mess | ||
rm ${CURRENT_LOCATION}/${TEMP_FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. | ||
This program and the accompanying materials are made available under the | ||
terms of the Eclipse Public License v. 2.0, which is available at | ||
http://www.eclipse.org/legal/epl-2.0. | ||
This Source Code may also be made available under the following Secondary | ||
Licenses when the conditions for such availability set forth in the | ||
Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | ||
version 2 with the GNU Classpath Exception, which is available at | ||
https://www.gnu.org/software/classpath/license.html. | ||
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<groupId>org.glassfish.jersey.validation</groupId> | ||
<artifactId>dependency-convergences</artifactId> | ||
<version>0.0.1</version> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<packaging>war</packaging> | ||
<name>jersey-dependency-convergence-validation</name> | ||
|
||
<description>dependencyConvergence rule check</description> | ||
|
||
|
||
<dependencies> | ||
<!-- Insert dependencies here --> | ||
</dependencies> | ||
|
||
<properties> | ||
<jersey.version>3.0.99-SNAPSHOT</jersey.version> | ||
</properties> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.