Patrick-Dussault

Fast Tracks to integrate the JBoss Samples on JBoss 6.4.0

Blog Post created by Patrick-Dussault Employee on Mar 31, 2017

# mkdir /root/sandbox/samples
# export JBOSS_HOME=/opt/jboss-eap-6.4
# export EAP7_HOME=/opt/jboss-eap-6.4
# cd /root/sandbox/samples
# git clone https://github.com/jboss-developer/jboss-eap-quickstarts.git
# cd jboss-eap-quickstarts/
# ls
# git tag
# git checkout tags/6.4.0.GA

 

  (you need to create the next file. The next steps are to protect the kitchensink application)

 

# nano -w /root/sandbox/samples/jboss-eap-quickstarts/kitchensink-ear/web/src/main/webapp/WEB-INF/web.xml

 

(you need to create the next file)

 

 <web-app>
 <security-constraint>
        <display-name>Constraint1</display-name>
        <web-resource-collection>
                <web-resource-name>admin resource</web-resource-name>
                <description/>
                <url-pattern>/*</url-pattern>
                <http-method>GET</http-method>
                <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
                <description/>
                <role-name>adminRole</role-name>
        </auth-constraint>
 </security-constraint>
 <security-role>
        <description/>
        <role-name>adminRole</role-name>
 </security-role>
 <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name/>
 </login-config>
 </web-app>

 

 nano -w jboss-web.xml

 

(you need to create the next file)

 

# nano -w /root/sandbox/samples/jboss-eap-quickstarts/kitchensink-ear/web/src/main/webapp/WEB-INF/jboss-web.xml

 

 <jboss-web>
 <valve>
   <class-name>com.ca.soa.agent.appserver.authenticator.jboss.SMJBoss6BasicAuthenticator</class-name>
 </valve>
        <security-domain>java:/jaas/SiteMinderDomain</security-domain>
 </jboss-web>

 

# mvn install -s settings.xml -Dmaven.test.skip=true

 

Now you have the .ear ready to deploy in the JBoss server.

Outcomes