Skip to content

Commit

Permalink
Disable CDI for some restfulWS tests
Browse files Browse the repository at this point in the history
- Add beans.xml with bean-discovery-mode="none"

Signed-off-by: Brian Decker <bmdecker@us.ibm.com>
  • Loading branch information
brideck committed Mar 2, 2021
1 parent b75718b commit 8b734cd
Show file tree
Hide file tree
Showing 8 changed files with 330 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
Copyright (c) 2021 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
-->

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd"
version="3.0"
bean-discovery-mode="none">
</beans>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2013, 2021 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
Expand All @@ -18,19 +18,66 @@

<project name="jaxrs_platform_beanvalidation_annotation" basedir="." default="usage">

<property name="app.name" value="jaxrs_platform_beanvalidation_annotation" />
<import file="../../../common/common.xml" />

<property name="resource.classes" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/*Resource*.class,
com/sun/ts/tests/jaxrs/common/util/JaxrsUtil.class,
com/sun/ts/tests/jaxrs/common/provider/StringBean.class,
com/sun/ts/tests/jaxrs/common/provider/StringBeanEntityProvider.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Not*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Constraint*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Group*.class,
" />
<property name="appconfig.class" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/TSAppConfig.class" />
<property name="app.name" value="jaxrs_platform_beanvalidation_annotation" />

<import file="../../../common/common.xml" />
<property name="resource.classes" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/*Resource*.class,
com/sun/ts/tests/jaxrs/common/util/JaxrsUtil.class,
com/sun/ts/tests/jaxrs/common/provider/StringBean.class,
com/sun/ts/tests/jaxrs/common/provider/StringBeanEntityProvider.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Not*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Constraint*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Group*.class"
/>
<property name="appconfig.class" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/TSAppConfig.class" />

<target name="package" if="resource.classes">
<propertyregex property="unified.resource.classes"
input="${resource.classes}"
regexp="\\"
replace="/"
defaultvalue="${resource.classes}"
casesensitive="false" />
<propertyregex property="relative.resource.classes"
input="${unified.resource.classes}"
regexp="(.*)/src/(.*)"
defaultvalue="${unified.resource.classes}"
select="\2" />
<propertyregex property="resource.sources"
input="${relative.resource.classes}"
regexp=".class"
replace=".java"
casesensitive="false" />

<propertyregex property="unified.appconfig.class"
input="${appconfig.class}"
regexp="\\"
replace="/"
casesensitive="false"
defaultvalue="${appconfig.class}"/>
<propertyregex property="relative.appconfig.class"
input="${unified.appconfig.class}"
regexp="(.*)/src/(.*)"
defaultvalue="${unified.appconfig.class}"
select="\2" />
<propertyregex property="appconfig.source"
input="${relative.appconfig.class}"
regexp=".class"
replace=".java"
casesensitive="false" />

<mkdir dir="${ts.home}/dist/${pkg.dir}" />
<ts.war archivename="${app.name}" descriptor="web.xml.template">
<zipfileset dir="${ts.home}/classes"
includes="${unified.resource.classes}, ${unified.appconfig.class}"
prefix="WEB-INF/classes" />
<zipfileset dir="${ts.home}/src/${pkg.dir}"
prefix="WEB-INF"
includes="beans.xml"/>
</ts.war>
<move file="${ts.home}/dist/${pkg.dir}/${app.name}_web.war" tofile="${ts.home}/dist/${pkg.dir}/${app.name}_web.war.template" />
</target>

</project>

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
Copyright (c) 2021 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
-->

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd"
version="3.0"
bean-discovery-mode="none">
</beans>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2015, 2021 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
Expand All @@ -18,19 +18,66 @@

<project name="jaxrs_platform_beanvalidation_annotation" basedir="." default="usage">

<property name="app.name" value="jaxrs_platform_beanvalidation_constraintviolationexceptionmapper" />
<import file="../../../common/common.xml" />

<property name="resource.classes" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/*Resource*.class,
com/sun/ts/tests/jaxrs/common/util/JaxrsUtil.class,
com/sun/ts/tests/jaxrs/common/provider/StringBean.class,
com/sun/ts/tests/jaxrs/common/provider/StringBeanEntityProvider.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Not*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Constraint*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Group*.class,
" />
<property name="appconfig.class" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/constraintviolationexceptionmapper/TSAppConfig.class" />
<property name="app.name" value="jaxrs_platform_beanvalidation_constraintviolationexceptionmapper" />

<import file="../../../common/common.xml" />
<property name="resource.classes" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/*Resource*.class,
com/sun/ts/tests/jaxrs/common/util/JaxrsUtil.class,
com/sun/ts/tests/jaxrs/common/provider/StringBean.class,
com/sun/ts/tests/jaxrs/common/provider/StringBeanEntityProvider.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Not*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Constraint*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Group*.class"
/>
<property name="appconfig.class" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/constraintviolationexceptionmapper/TSAppConfig.class" />

<target name="package" if="resource.classes">
<propertyregex property="unified.resource.classes"
input="${resource.classes}"
regexp="\\"
replace="/"
defaultvalue="${resource.classes}"
casesensitive="false" />
<propertyregex property="relative.resource.classes"
input="${unified.resource.classes}"
regexp="(.*)/src/(.*)"
defaultvalue="${unified.resource.classes}"
select="\2" />
<propertyregex property="resource.sources"
input="${relative.resource.classes}"
regexp=".class"
replace=".java"
casesensitive="false" />

<propertyregex property="unified.appconfig.class"
input="${appconfig.class}"
regexp="\\"
replace="/"
casesensitive="false"
defaultvalue="${appconfig.class}"/>
<propertyregex property="relative.appconfig.class"
input="${unified.appconfig.class}"
regexp="(.*)/src/(.*)"
defaultvalue="${unified.appconfig.class}"
select="\2" />
<propertyregex property="appconfig.source"
input="${relative.appconfig.class}"
regexp=".class"
replace=".java"
casesensitive="false" />

<mkdir dir="${ts.home}/dist/${pkg.dir}" />
<ts.war archivename="${app.name}" descriptor="web.xml.template">
<zipfileset dir="${ts.home}/classes"
includes="${unified.resource.classes}, ${unified.appconfig.class}"
prefix="WEB-INF/classes" />
<zipfileset dir="${ts.home}/src/${pkg.dir}"
prefix="WEB-INF"
includes="beans.xml"/>
</ts.war>
<move file="${ts.home}/dist/${pkg.dir}/${app.name}_web.war" tofile="${ts.home}/dist/${pkg.dir}/${app.name}_web.war.template" />
</target>

</project>

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
Copyright (c) 2021 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
-->

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd"
version="3.0"
bean-discovery-mode="none">
</beans>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2015, 2021 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
Expand All @@ -18,19 +18,66 @@

<project name="jaxrs_platform_beanvalidation_annotation" basedir="." default="usage">

<property name="app.name" value="jaxrs_platform_beanvalidation_validationexceptionmapper" />
<import file="../../../common/common.xml" />

<property name="resource.classes" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/*Resource*.class,
com/sun/ts/tests/jaxrs/common/util/JaxrsUtil.class,
com/sun/ts/tests/jaxrs/common/provider/StringBean.class,
com/sun/ts/tests/jaxrs/common/provider/StringBeanEntityProvider.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Not*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Constraint*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Group*.class,
" />
<property name="appconfig.class" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/validationexceptionmapper/TSAppConfig.class" />
<property name="app.name" value="jaxrs_platform_beanvalidation_validationexceptionmapper" />

<import file="../../../common/common.xml" />
<property name="resource.classes" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/*Resource*.class,
com/sun/ts/tests/jaxrs/common/util/JaxrsUtil.class,
com/sun/ts/tests/jaxrs/common/provider/StringBean.class,
com/sun/ts/tests/jaxrs/common/provider/StringBeanEntityProvider.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Not*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Constraint*.class,
com/sun/ts/tests/jaxrs/platform/beanvalidation/annotation/Group*.class"
/>
<property name="appconfig.class" value="com/sun/ts/tests/jaxrs/platform/beanvalidation/validationexceptionmapper/TSAppConfig.class" />

<target name="package" if="resource.classes">
<propertyregex property="unified.resource.classes"
input="${resource.classes}"
regexp="\\"
replace="/"
defaultvalue="${resource.classes}"
casesensitive="false" />
<propertyregex property="relative.resource.classes"
input="${unified.resource.classes}"
regexp="(.*)/src/(.*)"
defaultvalue="${unified.resource.classes}"
select="\2" />
<propertyregex property="resource.sources"
input="${relative.resource.classes}"
regexp=".class"
replace=".java"
casesensitive="false" />

<propertyregex property="unified.appconfig.class"
input="${appconfig.class}"
regexp="\\"
replace="/"
casesensitive="false"
defaultvalue="${appconfig.class}"/>
<propertyregex property="relative.appconfig.class"
input="${unified.appconfig.class}"
regexp="(.*)/src/(.*)"
defaultvalue="${unified.appconfig.class}"
select="\2" />
<propertyregex property="appconfig.source"
input="${relative.appconfig.class}"
regexp=".class"
replace=".java"
casesensitive="false" />

<mkdir dir="${ts.home}/dist/${pkg.dir}" />
<ts.war archivename="${app.name}" descriptor="web.xml.template">
<zipfileset dir="${ts.home}/classes"
includes="${unified.resource.classes}, ${unified.appconfig.class}"
prefix="WEB-INF/classes" />
<zipfileset dir="${ts.home}/src/${pkg.dir}"
prefix="WEB-INF"
includes="beans.xml"/>
</ts.war>
<move file="${ts.home}/dist/${pkg.dir}/${app.name}_web.war" tofile="${ts.home}/dist/${pkg.dir}/${app.name}_web.war.template" />
</target>

</project>

25 changes: 25 additions & 0 deletions src/com/sun/ts/tests/jaxrs/spec/resourceconstructor/beans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
Copyright (c) 2021 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
-->

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd"
version="3.0"
bean-discovery-mode="none">
</beans>

0 comments on commit 8b734cd

Please sign in to comment.