Adam,

In a somewhat related issue, I had a problem where nothing I added to
src/main/resources/ would get bundled in the WAR file. I traced this to the
build resources entry in the pom.xml. So now I have this:

<build>
  <!-- ... other build stuff ... -->
  <resources>
    <resource>
      <directory>src/main/resources</directory>
    </resource>
  </resources>
</build>

And now my resources (including bootstrap.properties) get bundled properly.



Best regards,
--
Carlos M. Fernández
Enterprise Systems Manager
*Saint Joseph’s University*
Philadelphia PA 19131
T: +1 610 660 1501

On Fri, Apr 28, 2017 at 1:23 PM, Adam Causey <[email protected]> wrote:

> I am having the same issue as the OP. My app runs fine when I have the
> application.properties in src/main/resources, but if I setup the
> bootstrap.properties and point it to a directory outside of the project it
> isn't reading the cas.properties. I also tried renaming the file to
> application-native.properties to no avail. Any suggestions?
>
> Here's what I have in my src/main/resources/bootstrap.properties:
>
> ##
> ​
>
> # CAS Spring Cloud Config Client
> #
> # Name of the application for which environment settings and properties
> should be fetched.
> # This should map to a cas.yml or cas.properties file.
> spring.application.name=cas
> spring.cloud.config.fail-fast=true
>
> ##
> # CAS Embedded Cloud Config Server
> #
> # Native profile in the Config Server that doesn't use Git, but just loads
> the
> # config files from the local classpath or file system.
> #
> spring.profiles.active=native
> spring.cloud.config.server.native.searchLocations=file:///opt/cas5/config
>
> # spring.profiles.active=default
>
> # spring.cloud.config.server.git.uri=https://github.com/repoName/config
>
> # spring.cloud.config.server.git.uri=file://${user.home}/config
>
> # spring.cloud.config.server.git.username=
>
> # spring.cloud.config.server.git.password=
>
> spring.cloud.config.server.bootstrap=true
>
> spring.cloud.config.server.prefix=/status/configserver
>
> spring.jmx.default-domain=server
>
> On Tue, Jan 17, 2017 at 3:47 PM, Raymond Drew Walker <[email protected]>
> wrote:
>
>> I’ve also tried using the default location /etc/cas/config  for
>> cas.properties & application.properties as described here:
>>
>> https://apereo.github.io/cas/5.0.x/installation/Configuratio
>> n-Management.html
>> <http://spamburger.sju.edu/canit/urlproxy.php?_q=aHR0cHM6Ly9hcGVyZW8uZ2l0aHViLmlvL2Nhcy81LjAueC9pbnN0YWxsYXRpb24vQ29uZmlndXJhdGlvbi1NYW5hZ2VtZW50Lmh0bWw%3D>
>>
>> ...alas these do not seem to be working either. I’ve resorted to shoving
>> config files into the webapp itself after deployment & reloading the
>> application... yikes! :-(
>>
>>
>>
>> —
>>
>> Raymond Walker
>> Software Systems Engineer StSp.
>> ITS Northern Arizona University
>>
>>
>>
>>
>>
>> *From: *<[email protected]> on behalf of Raymond Drew Walker <
>> [email protected]>
>> *Reply-To: *"[email protected]" <[email protected]>
>> *Date: *Saturday, January 14, 2017 at 4:28 PM
>> *To: *"[email protected]" <[email protected]>
>> *Subject: *[cas-user] CAS5 Maven overlay not reading config files
>>
>>
>>
>> In a CAS 5.0.1 Maven overlay I have the following files included:
>>
>>
>>
>> src/main/resources/bootstrap.properties
>>
>> spring.profiles.active=native
>>
>> spring.cloud.config.server.native.searchLocations=file:///
>> nau/local/cas/config
>>
>>
>>
>>
>>
>> In the config file:
>>
>> /nau/local/cas/config
>>
>> I have some basic stuff, but it doesn’t seem to apply, such as:
>>
>> cas.authn.accept.users=
>>
>>
>>
>> In addition I have all appropriate LDAP & DUO configs set, such as:
>>
>> cas.authn.mfa.duo.duoApiHost=(my duo api host)
>>
>>
>>
>> (I also have LDAP auth & Duo enabled in the pom.xml)
>>
>>
>>
>> Upon startup I get a failed deployment:
>>
>>
>>
>>
>>
>> 14-Jan-2017 16:12:20.595 INFO [localhost-startStop-1]
>> org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was
>> scanned for TLDs yet contained no TLDs. Enable debug logging for this
>> logger for a complete list of JARs that were scanned but no TLDs were found
>> in them. Skipping unneeded JARs during scanning can improve startup time
>> and JSP compilation time.
>>
>>   __  ____     _     ____  __
>>
>>  / / / ___|   / \   / ___| \ \
>>
>> | | | |      / _ \  \___ \  | |
>>
>> | | | |___  / ___ \  ___) | | |
>>
>> | |  \____|/_/   \_\|____/  | |
>>
>>  \_\                       /_/
>>
>>
>>
>> CAS Version: 5.0.1
>>
>> Build Date/Time: 2017-01-14T20:34:50Z
>>
>> System Temp Directory: /nau/local/cas/tomcat/temp
>>
>> Java Home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-0.b15.el6_8.x86_
>> 64/jre
>>
>> Java Vendor: Oracle Corporation
>>
>> Java Version: 1.8.0_111
>>
>> JCE Installed: yes
>>
>> OS Architecture: amd64
>>
>> OS Name: Linux
>>
>> OS Version: 2.6.32-642.11.1.el6.x86_64
>>
>>
>>
>> 2017-01-14 16:12:27,985 INFO 
>> [org.apereo.cas.web.CasWebApplicationServletInitializer]
>> - <The following profiles are active: native>
>>
>> 2017-01-14 16:12:38,726 WARN 
>> [org.apereo.cas.services.InMemoryServiceRegistryDaoImpl]
>> - <Runtime memory is used as the persistence storage for retrieving and
>> persisting service definitions. Changes that are made to service
>> definitions during runtime WILL be LOST upon container restarts.>
>>
>> 2017-01-14 16:12:38,789 INFO 
>> [org.apereo.cas.services.DefaultServicesManagerImpl]
>> - <Loaded 0 services from InMemoryServiceRegistryDaoImpl.>
>>
>> 2017-01-14 16:12:44,910 WARN 
>> [org.apereo.cas.config.CasSecurityContextConfiguration]
>> - <>
>>
>> 2017-01-14 16:12:44,918 WARN 
>> [org.apereo.cas.config.CasSecurityContextConfiguration]
>> - <
>>
>>  ____   _____   ___   ____   _
>>
>> / ___| |_   _| / _ \ |  _ \ | |
>>
>> \___ \   | |  | | | || |_) || |
>>
>>  ___) |  | |  | |_| ||  __/ |_|
>>
>> |____/   |_|   \___/ |_|    (_)
>>
>>
>>
>> CAS is configured to accept a static list of credentials for
>> authentication.
>>
>> While this is generally useful for demo purposes, it is STRONGLY
>> recommended
>>
>> that you DISABLE this authentication method (by SETTING
>> 'cas.authn.accept.users'
>>
>> to a blank value) and switch to a mode that is more suitable for
>> production.
>>
>> >
>>
>> 2017-01-14 16:12:44,920 WARN 
>> [org.apereo.cas.config.CasSecurityContextConfiguration]
>> - <>
>>
>> 2017-01-14 16:12:52,014 INFO 
>> [org.apereo.cas.services.DefaultServicesManagerImpl]
>> - <Loaded 2 services from InMemoryServiceRegistryDaoImpl.>
>>
>> 2017-01-14 16:13:00,245 INFO 
>> [org.apereo.cas.configuration.CasConfigurationRebinder]
>> - <Reloaded CAS configuration cas-org.apereo.cas.configurati
>> on.CasConfigurationProperties>
>>
>> 2017-01-14 16:13:02,991 INFO [org.apereo.cas.configuration.support.Beans]
>> - <Ticket registry encryption/signing is turned off. This MAY NOT be safe
>> in a clustered production environment. Consider using other choices to
>> handle encryption, signing and verification of ticket registry tickets, and
>> verify the chosen ticket registry does support this behavior.>
>>
>> 2017-01-14 16:13:03,007 WARN 
>> [org.apereo.cas.ticket.registry.DefaultTicketRegistry]
>> - <Runtime memory is used as the persistence storage for retrieving and
>> managing tickets. Tickets that are issued during runtime will be LOST upon
>> container restarts. This MAY impact SSO functionality.>
>>
>> 2017-01-14 16:13:03,022 INFO 
>> [org.apereo.cas.config.CasCoreTicketsConfiguration]
>> - <Protocol tickets generated by CAS are not signed/encrypted.>
>>
>> 2017-01-14 16:13:03,203 WARN [org.springframework.boot.cont
>> ext.embedded.AnnotationConfigEmbeddedWebApplicationContext] - <Exception
>> encountered during context initialization - cancelling refresh attempt:
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean with name 'scopedTarget.duoApiAuthenticationService': Invocation of
>> init method failed; nested exception is java.lang.IllegalArgumentException:
>> Duo API host cannot be blank>
>>
>> 14-Jan-2017 16:13:03.243 SEVERE [localhost-startStop-1]
>> org.apache.catalina.core.ContainerBase.addChildInternal
>> ContainerBase.addChild: start:
>>
>>  org.apache.catalina.LifecycleException: Failed to start component
>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cas]]
>>
>>                 at org.apache.catalina.util.Lifec
>> ycleBase.start(LifecycleBase.java:162)
>>
>>                 at org.apache.catalina.core.Conta
>> inerBase.addChildInternal(ContainerBase.java:725)
>>
>>                 at org.apache.catalina.core.Conta
>> inerBase.addChild(ContainerBase.java:701)
>>
>>                 at org.apache.catalina.core.Stand
>> ardHost.addChild(StandardHost.java:717)
>>
>>                 at org.apache.catalina.startup.Ho
>> stConfig.deployWAR(HostConfig.java:940)
>>
>>
>>
>>
>>
>> ...any ideas as to why cas.properties is being ignored?
>>
>> —
>>
>> Raymond Walker
>> Software Systems Engineer StSp.
>> ITS Northern Arizona University
>>
>>
>>
>> --
>> - CAS gitter chatroom: https://gitter.im/apereo/cas
>> - CAS mailing list guidelines: https://apereo.github.io/cas/M
>> ailing-Lists.html
>> <http://spamburger.sju.edu/canit/urlproxy.php?_q=aHR0cHM6Ly9hcGVyZW8uZ2l0aHViLmlvL2Nhcy9NYWlsaW5nLUxpc3RzLmh0bWw%3D>
>> - CAS documentation website: https://apereo.github.io/cas
>> <http://spamburger.sju.edu/canit/urlproxy.php?_q=aHR0cHM6Ly9hcGVyZW8uZ2l0aHViLmlvL2Nhcw%3D%3D>
>> - CAS project website: https://github.com/apereo/cas
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "CAS Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/a/ap
>> ereo.org/d/msgid/cas-user/1DC7A2DD-62E1-4064-811B-08C4B920980F%40nau.edu
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/1DC7A2DD-62E1-4064-811B-08C4B920980F%40nau.edu?utm_medium=email&utm_source=footer>
>> .
>>
>> --
>> - CAS gitter chatroom: https://gitter.im/apereo/cas
>> - CAS mailing list guidelines: https://apereo.github.io/cas/M
>> ailing-Lists.html
>> <http://spamburger.sju.edu/canit/urlproxy.php?_q=aHR0cHM6Ly9hcGVyZW8uZ2l0aHViLmlvL2Nhcy9NYWlsaW5nLUxpc3RzLmh0bWw%3D>
>> - CAS documentation website: https://apereo.github.io/cas
>> <http://spamburger.sju.edu/canit/urlproxy.php?_q=aHR0cHM6Ly9hcGVyZW8uZ2l0aHViLmlvL2Nhcw%3D%3D>
>> - CAS project website: https://github.com/apereo/cas
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "CAS Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/a/ap
>> ereo.org/d/msgid/cas-user/CC2F1489-4FBE-4722-A8E7-4E75BA0A27FD%40nau.edu
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/CC2F1489-4FBE-4722-A8E7-4E75BA0A27FD%40nau.edu?utm_medium=email&utm_source=footer>
>> .
>>
>
> --
> - CAS gitter chatroom: https://gitter.im/apereo/cas
> - CAS mailing list guidelines: https://apereo.github.io/cas/
> Mailing-Lists.html
> <http://spamburger.sju.edu/canit/urlproxy.php?_q=aHR0cHM6Ly9hcGVyZW8uZ2l0aHViLmlvL2Nhcy9NYWlsaW5nLUxpc3RzLmh0bWw%3D>
> - CAS documentation website: https://apereo.github.io/cas
> <http://spamburger.sju.edu/canit/urlproxy.php?_q=aHR0cHM6Ly9hcGVyZW8uZ2l0aHViLmlvL2Nhcw%3D%3D>
> - CAS project website: https://github.com/apereo/cas
> ---
> You received this message because you are subscribed to the Google Groups
> "CAS Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/a/
> apereo.org/d/msgid/cas-user/CAN6MV5MkhgB7HhqbGfH2L00v2PhTq
> 12L4BxBiuZ0ovS0BBgo4w%40mail.gmail.com
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAN6MV5MkhgB7HhqbGfH2L00v2PhTq12L4BxBiuZ0ovS0BBgo4w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAE7KU87aAVdn5XwCEXQZJqwRjX6r7peAF58RpdDr%3DbGaM33Lhw%40mail.gmail.com.

Reply via email to