Skip to content

Commit

Permalink
Tests that use Jakarta Faces need to also include a beans.xml (bean-d…
Browse files Browse the repository at this point in the history
…iscovery-mode=all) to enable CDI

Signed-off-by: Scott Marlow <smarlow@redhat.com>
  • Loading branch information
scottmarlow committed Apr 29, 2022
1 parent b244451 commit 72ab755
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/xml/ts.vehicles.xml
Expand Up @@ -450,7 +450,7 @@
<var name="vehicle.prefix" value="${vehicle.name}_web"/>

<copy todir="${dist.dir}/${pkg.dir}">
<fileset dir="${src.dir}/${vehicle.pkg.dir}/@{vehicle}" includes="faces-config.xml"/>
<fileset dir="${src.dir}/${vehicle.pkg.dir}/@{vehicle}" includes="faces-config.xml,beans.xml"/>
<filterset>
<filter token="package" value="${package}"/>
</filterset>
Expand All @@ -475,15 +475,15 @@
excludes="${runner.classes}, @{excludedfiles}"
prefix="WEB-INF/classes"/>
<zipfileset dir="${basedir}" includes="ejb-jar.xml, beans.xml" prefix="WEB-INF"/>
<zipfileset dir="${dist.dir}/${pkg.dir}" includes="faces-config.xml" prefix="WEB-INF"/>
<zipfileset dir="${dist.dir}/${pkg.dir}" includes="faces-config.xml,beans.xml" prefix="WEB-INF"/>
<zipfileset dir="${dist.dir}/${pkg.dir}" includes="*.jar" prefix="WEB-INF/lib" excludes="ejbembed_vehicle*.jar"/>
<zipfileset dir="${basedir}" includes="*.tld" prefix="WEB-INF/tlds"/>
<fileset dir="${src.dir}/${vehicle.pkg.dir}/@{vehicle}" includes="*.jsp"/>
<jsp-elements/>
<jar-elements/>
</ts.war>
<delete failonerror="false">
<fileset dir="${dist.dir}/${pkg.dir}" includes="faces-config.xml"/>
<fileset dir="${dist.dir}/${pkg.dir}" includes="faces-config.xml,beans.xml"/>
</delete>
</then>
</elseif>
Expand Down
22 changes: 22 additions & 0 deletions src/com/sun/ts/tests/common/vehicle/ejblitejsf/beans.xml
@@ -0,0 +1,22 @@
<!--
Copyright (c) 2022 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
-->

<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_4_0.xsd" bean-discovery-mode="all">
</beans>

0 comments on commit 72ab755

Please sign in to comment.