Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAYARA-4218 Add JDK11 support to JAX-WS commands #4291

Merged
merged 4 commits into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2019 Payara Foundation and/or its affiliates. All rights reserved.
#
# The contents of this file are subject to the terms of either the GNU
# General Public License Version 2 only ("GPL") or the Common Development
# and Distribution License("CDDL") (collectively, the "License"). You
# may not use this file except in compliance with the License. You can
# obtain a copy of the License at
# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
# or packager/legal/LICENSE.txt. See the License for the specific
# language governing permissions and limitations under the License.
#
# When distributing the software, include this License Header Notice in each
# file and include the License file at packager/legal/LICENSE.txt.
#
# GPL Classpath Exception:
# Oracle designates this particular file as subject to the "Classpath"
# exception as provided by Oracle in the GPL Version 2 section of the License
# file that accompanied this code.
#
# Modifications:
# If applicable, add the following below the License Header, with the fields
# enclosed by brackets [] replaced by your own identifying information:
# "Portions Copyright [year] [name of copyright owner]"
#
# Contributor(s):
# If you wish your version of this file to be governed by only the CDDL or
# only the GPL Version 2, indicate your decision by adding "[Contributor]
# elects to include this software in this distribution under the [CDDL or GPL
# Version 2] license." If you don't indicate a single choice of license, a
# recipient has the option to distribute your version of this file under
# either the CDDL, the GPL Version 2 or to extend the choice of license to
# its licensees as provided above. However, if you add GPL Version 2 code
# and therefore, elected the GPL Version 2 license, then the option applies
# only if the new code is made subject to such option by the copyright
# holder.
#

# Checks the version of Java installed, if it is 9+ then endorsed is not available
checkEndorsedAvailable () {
ver=$("$JAVA" -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1)
return $ver
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@echo off

REM
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
REM
REM Copyright (c) 2019 Payara Foundation and/or its affiliates. All rights reserved.
REM
REM The contents of this file are subject to the terms of either the GNU
REM General Public License Version 2 only ("GPL") or the Common Development
REM and Distribution License("CDDL") (collectively, the "License"). You
REM may not use this file except in compliance with the License. You can
REM obtain a copy of the License at
REM https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
REM or packager/legal/LICENSE.txt. See the License for the specific
REM language governing permissions and limitations under the License.
REM
REM When distributing the software, include this License Header Notice in each
REM file and include the License file at packager/legal/LICENSE.txt.
REM
REM GPL Classpath Exception:
REM Oracle designates this particular file as subject to the "Classpath"
REM exception as provided by Oracle in the GPL Version 2 section of the License
REM file that accompanied this code.
REM
REM Modifications:
REM If applicable, add the following below the License Header, with the fields
REM enclosed by brackets [] replaced by your own identifying information:
REM "Portions Copyright [year] [name of copyright owner]"
REM
REM Contributor(s):
REM If you wish your version of this file to be governed by only the CDDL or
REM only the GPL Version 2, indicate your decision by adding "[Contributor]
REM elects to include this software in this distribution under the [CDDL or GPL
REM Version 2] license." If you don't indicate a single choice of license, a
REM recipient has the option to distribute your version of this file under
REM either the CDDL, the GPL Version 2 or to extend the choice of license to
REM its licensees as provided above. However, if you add GPL Version 2 code
REM and therefore, elected the GPL Version 2 license, then the option applies
REM only if the new code is made subject to such option by the copyright
REM holder.
REM

REM Checks the version of Java installed, if it is 9+ then endorsed is not available
for /f tokens^=2-5^ delims^=.-_^" %%j in ('%JAVA% -fullversion 2^>^&1') do set "jver=%%j%"

if %jver%==1 (
set ENDORSED_AVAILABLE=true
) else (
set ENDORSED_AVAILABLE=false
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright [2019] Payara Foundation and/or affiliates

AS_INSTALL=`dirname "$0"`/..

Expand All @@ -55,4 +56,13 @@ if [ ${AS_JAVA} ]; then
JAVA=${AS_JAVA}/bin/java
fi

exec "$JAVA" -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade "$@"

. $(dirname "$0")/jdkcheck
checkEndorsedAvailable

if [ $? -lt 9 ]
then
exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade "$@"
else
exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade "$@"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ REM and therefore, elected the GPL Version 2 license, then the option applies
REM only if the new code is made subject to such option by the copyright
REM holder.
REM
REM Portions Copyright [2019] Payara Foundation and/or affiliates

VERIFY OTHER 2>nul
setlocal ENABLEEXTENSIONS
Expand All @@ -56,4 +57,10 @@ goto run
set JAVA=java

:run
%JAVA% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade %*
CALL %~dp0jdkcheck.bat

if %ENDORSED_AVAILABLE%==true (
%JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade %*
) else (
%JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.jxc.SchemaGeneratorFacade %*
)
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,12 @@ if [ ${AS_JAVA} ]; then
JAVA=${AS_JAVA}/bin/java
fi

exec "$JAVA" $WSCOMPILE_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar:$AS_INSTALL_LIB/aixporting-repackaged.jar" com.sun.xml.rpc.tools.wscompile.Main "$@"
. $(dirname "$0")/jdkcheck
checkEndorsedAvailable

if [ $? -lt 9 ]
then
exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar:$AS_INSTALL_LIB/aixporting-repackaged.jar" com.sun.xml.rpc.tools.wscompile.Main "$@"
else
exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar:$AS_INSTALL_LIB/aixporting-repackaged.jar" com.sun.xml.rpc.tools.wscompile.Main "$@"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,10 @@ goto run
set JAVA=java

:run
%JAVA% %WSCOMPILE_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wscompile.Main %*
CALL %~dp0jdkcheck.bat

if %ENDORSED_AVAILABLE%==true (
%JAVA% %WSCOMPILE_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wscompile.Main %*
) else (
%JAVA% %WSCOMPILE_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wscompile.Main %*
)
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,12 @@ if [ ${AS_JAVA} ]; then
JAVA=${AS_JAVA}/bin/java
fi

exec "$JAVA" -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main "$@"
. $(dirname "$0")/jdkcheck
checkEndorsedAvailable

if [ $? -lt 9 ]
then
exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main "$@"
else
exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$JAVAX_MAIL_JAR:$JAVA_HOME/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main "$@"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,10 @@ goto run
set JAVA=java

:run
%JAVA% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main %*
CALL %~dp0jdkcheck.bat

if %ENDORSED_AVAILABLE%==true (
%JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main %*
) else (
%JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.mail.jar;%JAVA_HOME%/lib/tools.jar" com.sun.xml.rpc.tools.wsdeploy.Main %*
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright [2019] Payara Foundation and/or affiliates

AS_INSTALL=`dirname "$0"`/..

Expand All @@ -55,4 +56,12 @@ if [ ${AS_JAVA} ]; then
JAVA=${AS_JAVA}/bin/java
fi

exec "$JAVA" $WSGEN_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.ws.WsGen "$@"
. $(dirname "$0")/jdkcheck
checkEndorsedAvailable

if [ $? -lt 9 ]
then
exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.ws.WsGen "$@"
else
exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.ws-api.jar" com.sun.tools.ws.WsGen "$@"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ REM and therefore, elected the GPL Version 2 license, then the option applies
REM only if the new code is made subject to such option by the copyright
REM holder.
REM
REM Portions Copyright [2019] Payara Foundation and/or affiliates

VERIFY OTHER 2>nul
setlocal ENABLEEXTENSIONS
Expand All @@ -56,4 +57,10 @@ goto run
set JAVA=java

:run
%JAVA% %WSGEN_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.ws.WsGen %*
CALL %~dp0jdkcheck.bat

if %ENDORSED_AVAILABLE%==true (
%JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.ws.WsGen %*
) else (
%JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.xml.ws-api.jar" com.sun.tools.ws.WsGen %*
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright [2019] Payara Foundation and/or affiliates

AS_INSTALL=`dirname "$0"`/..

Expand All @@ -55,4 +56,12 @@ if [ ${AS_JAVA} ]; then
JAVA=${AS_JAVA}/bin/java
fi

exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.ws.WsImport "$@"
. $(dirname "$0")/jdkcheck
checkEndorsedAvailable

if [ $? -lt 9 ]
then
exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.ws.WsImport "$@"
else
exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar:$AS_INSTALL_LIB/jakarta.xml.ws-api.jar" com.sun.tools.ws.WsImport "$@"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ REM and therefore, elected the GPL Version 2 license, then the option applies
REM only if the new code is made subject to such option by the copyright
REM holder.
REM
REM Portions Copyright [2019] Payara Foundation and/or affiliates

VERIFY OTHER 2>nul
setlocal ENABLEEXTENSIONS
Expand All @@ -55,5 +56,12 @@ goto run
:UsePath
set JAVA=java


:run
%JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.ws.WsImport %*
CALL %~dp0jdkcheck.bat

if %ENDORSED_AVAILABLE%==true (
%JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.ws.WsImport %*
) else (
%JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar;%~dp0..\modules\jakarta.xml.ws-api.jar" com.sun.tools.ws.WsImport %*
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright [2019] Payara Foundation and/or affiliates

AS_INSTALL=`dirname "$0"`/..

Expand All @@ -55,4 +56,12 @@ if [ ${AS_JAVA} ]; then
JAVA=${AS_JAVA}/bin/java
fi

exec "$JAVA" -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.xjc.Driver "$@"
. $(dirname "$0")/jdkcheck
checkEndorsedAvailable

if [ $? -lt 9 ]
then
exec "$JAVA" $WSIMPORT_OPTS -Djava.endorsed.dirs="$AS_INSTALL_LIB/endorsed" -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.xjc.Driver "$@"
else
exec "$JAVA" $WSIMPORT_OPTS -cp "$AS_INSTALL_LIB/webservices-osgi.jar:$AS_INSTALL_LIB/javax.xml.rpc-api.jar:$AS_INSTALL_LIB/jaxb-osgi.jar" com.sun.tools.xjc.Driver "$@"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ REM and therefore, elected the GPL Version 2 license, then the option applies
REM only if the new code is made subject to such option by the copyright
REM holder.
REM
REM Portions Copyright [2019] Payara Foundation and/or affiliates

VERIFY OTHER 2>nul
setlocal ENABLEEXTENSIONS
Expand All @@ -56,4 +57,10 @@ goto run
set JAVA=java

:run
%JAVA% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.xjc.Driver %*
CALL %~dp0jdkcheck.bat

if %ENDORSED_AVAILABLE%==true (
%JAVA% %WSIMPORT_OPTS% -Djava.endorsed.dirs="%~dp0..\modules\endorsed" -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.xjc.Driver %*
) else (
%JAVA% %WSIMPORT_OPTS% -cp "%~dp0..\modules\webservices-osgi.jar;%~dp0..\modules\javax.xml.rpc-api.jar;%~dp0..\modules\jaxb-osgi.jar" com.sun.tools.xjc.Driver %*
)