How can I swap cas.properties file based on maven profile?
Scott Battaglia
scott.battaglia at gmail.com
Sun Sep 14 11:00:38 EDT 2008
Michael,
No problem, just want to avoid any language wars on the list since a lot of
it is subjective :-) If you actually get bored at any point, feel free to
include references in our wiki to the Maven2 alternatives for people who are
more inclined to prefer a different build tool that leverages some of the
Maven2 concepts.
-Scott
-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia
On Sun, Sep 14, 2008 at 4:53 AM, Michael Johnston <lastobelus at mac.com>wrote:
> Scott,
> I apologize, I didn't really mean to bash just to vent. I think Java itself
> is a good language and I used it for several years (albeit with WebObjects,
> hardly any Java EE).
>
> I totally recognize that maven2 is not java, but the nature of maven and
> other similar tools and also of many java paradigms in general (their
> verboseness, opacity, and the steepness of the learning curve for using
> them) is certainly a reason why I avoid the Java EE platform, and I mention
> that not to bash but to give other people a chance to learn that there are
> alternatives.
>
> I do thank you for your help.
>
> What I ended up doing was allowing Maven to put cas.properties in classes
> (apparently there is no way around that except to use ant-run, and when I
> tried to use ant-run and pass it maven.war.webapp.dir, which according to
> docs should be the maven property that points to the webapp dir when the war
> is being constructed it didn't recognize it and I abandoned trying to figure
> out why.
>
> I do want to use maven for what it is intended: a very robust way to manage
> dependencies. I don't want to create my own ad hoc build script because the
> one's I create suck much more to maintain :)
>
> Anyway, this exchange prompted me to google "maven rake" and I found buildr
> and raven, both of which use ruby. Buildr re-uses the maven conventions,
> and supposedly can be a drop-in replacement. grr. I should have done that
> particular google 2 days ago.
>
> Cheerio,
>
> Michael Johnston
> lastobelus at mac.com
>
>
>
>
> On 13-Sep-08, at 8:23 PM, Scott Battaglia wrote:
>
> You'll probably want to use the filtering capabilities of the Maven WAR
> plugin:
>
> http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html
>
> You should be able to configure it in your <build> tags within the
> profiles, though I haven't tried it.
>
> Also, Maven2 != Java. That would be like me saying that Ruby sucks because
> I tried to use one program and had issues with it. This list is also for
> helping people use CAS, configure it, deploy it, and troubleshoot their
> problems. We're happy to help anyone (including Ruby developers, we don't
> discriminate), but nothing constructive comes from incorrectly bashing a
> language. It detracts from your original questions and requests for help,
> and may actually discourage people from assisting.
>
> You're also not required to use Maven if you don't want. You can retrieve
> the appropriate files yourself and construct the WAR file.
>
> Thanks
> -Scott
>
> -Scott Battaglia
> PGP Public Key Id: 0x383733AA
> LinkedIn: http://www.linkedin.com/in/scottbattaglia
>
>
> On Sat, Sep 13, 2008 at 10:41 PM, Michael Johnston <lastobelus at mac.com>wrote:
>
>> My previous question, asked more succinctly:
>>
>> How can I bundle one of several cas.properties files based on maven
>> profile?
>>
>> For example, if I do this:
>>
>> <profiles>
>> <profile>
>> <id>development</id>
>> <properties>
>> <environment>development</environment>
>> </properties>
>> <build>
>> <resources>
>> <resource>
>> <directory>src/main/resources/development</directory>
>> </resource>
>> </resources>
>> </build>
>> <activation>
>> <activeByDefault>true</activeByDefault>
>> </activation>
>> </profile>
>>
>>
>> my custom cas.properties (which is in src/main/resources/development)
>> gets put in WEB-INF/classes instead of WEB-INF. The original
>> cas.properties from the cas-server project gets put in the root of WEB-
>> INF.
>>
>> How do I get maven to put cas.properties in the root of WEB-INF?
>>
>> Maven is a very powerful reminder to me of why I am an enterprise
>> RubyOnRails developer and not an enterprise java developer.
>>
>> Cheerio,
>>
>> Michael Johnston
>> lastobelus at mac.com
>>
>>
>>
>>
>> _______________________________________________
>> Yale CAS mailing list
>> cas at tp.its.yale.edu
>> http://tp.its.yale.edu/mailman/listinfo/cas
>>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20080914/7cab8a66/attachment.html
More information about the cas
mailing list