Hi,

“com.mytest.cas.xx” can be created under src\main\java e.g 
C:\dev\local-cas\src\main\java\com\mytest\cas

Maven will compile these classes (under WEB-INF/classes) as part of the mvn 
package command

Maven will download what it needs once and store it locally (in your .m2 
folder). You shouldn’t need to be connected to rebuild it unless of course you 
add a dependency.

Hope that helps
Declan

From: s4...@yahoo.co.jp [mailto:s4...@yahoo.co.jp]
Sent: 03 February 2012 10:33
To: cas-user@lists.jasig.org
Subject: [cas-user] How to use Maven to create war file, including one's changes

Hi All,

I am learning how to build a war file using maven command lines.
Scott Battaglia's
Best Practice - Setting Up CAS Locally using the Maven2 WAR Overlay 
Method<https://wiki.jasig.org/display/CASUM/Best+Practice+-+Setting+Up+CAS+Locally+using+the+Maven2+WAR+Overlay+Method>
page was helpful to get me going.. I did exactly what is written in that page.

When I ran "mvn clean package", I got a war file, which when deployed under 
Tomcat/webapps, works fine.

My next challenge is how to add my own java files for authentication, and where 
to put those files.

Say, if I were to add a bean like this:

<property name="credentialsToPrincipalResolver">
          <bean 
class="com.mytest.cas.TestPrincipalBearingCredentialsToPrincipalResolver" />
         </property>

Where would I put the necessary java files? Where the pom.xml exists? (at the 
very top level? Like I would create com/mytest/cas/ folders and put my java 
file there?). How do I tell maven to look for java files in certain places? I 
mean, when I say "com.mytest.cas.xx" from where that "com" begin?

There are so much resources in the internet. It is frustrating not to know how 
to use it to get one's job done.

Learning the rope the hard way,


PS: I could not make my Eclipse install maven plugin.. so I gave up using 
eclipse driven build for now.

PPS: It seems that when I run "mvn clean package", I need to be online. May be 
it is necessary to download some files for the first time, but I want it to 
stop contacting  the outside servers after the second time.. I cannot be 
connected to network all the times.










--
You are currently subscribed to 
cas-user@lists.jasig.org<mailto:cas-user@lists.jasig.org> as: 
declan.but...@hse.ie<mailto:declan.but...@hse.ie>
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user


------------------------------------
The HSE PCRS does not accept legal responsibility for the contents of this 
message.  Any views or opinions presented are solely those of the author and do 
not necessarily represent those of the HSE PCRS.

This message is for the named person's use only.  It may contain confidential, 
proprietary or legally privileged information.  You must not, directly or 
indirectly, use, disclose, distribute, print, or copy any part of this message 
if you are not the intended recipient.

------------------------------------




-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to