Avoid default services recreation cas overlay

313 views
Skip to first unread message

Christian Axel Schmidt Dick

unread,
Oct 10, 2017, 4:09:49 AM10/10/17
to CAS Community
Hi there, It might be a noob question but it is something that should be easy to avoid, that is driving me mad. I am using the war overlay 5.1.4, and have docker-ized it. But everytime I start the container, 2 files inside the services folder get created 'Apereo-10000002.json' and 'HTTPSandIMAPS-10000001.json'. How can I avoid it? tried to delete them but once I restart the container the appear there once again. Even leaving them there and editing them wont work.

Gena Batalski

unread,
Oct 10, 2017, 4:42:03 AM10/10/17
to cas-...@apereo.org
Hello, you need your own configurations, which were not found. 


Try to find the right parameters for 5.1.4 eg (works in 5.2.0-x):
cas.serviceRegistry.json.location: file:///etc/cas/services

We also had other minor problems with 5.1.x and switched directly to 5.2.0-rc2.

Regards, Gena




2017-10-10 10:09 GMT+02:00 Christian Axel Schmidt Dick <christiana...@gmail.com>:
Hi there, It might be a noob question but it is something that should be easy to avoid, that is driving me mad. I am using the war overlay 5.1.4, and have docker-ized it. But everytime I start the container, 2 files inside the services folder get created 'Apereo-10000002.json' and 'HTTPSandIMAPS-10000001.json'. How can I avoid it? tried to delete them but once I restart the container the appear there once again. Even leaving them there and editing them wont work.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/c7a884e7-b769-4421-a6a2-41f5b8241fba%40apereo.org.

Christian Axel Schmidt Dick

unread,
Oct 10, 2017, 4:50:15 AM10/10/17
to CAS Community
Thanks Gena, we are already setting our custom service folder for the json files, but even that, those files still appearing.

Doug Campbell

unread,
Oct 10, 2017, 4:57:51 AM10/10/17
to cas-...@apereo.org

Christian,

 

I believe I ran into this too at one point.  If I remember correctly you just need to add the following dependency to your CAS overlay pom.xml file:

 

        <dependency>

            <groupId>org.apereo.cas</groupId>

            <artifactId>cas-server-support-json-service-registry</artifactId>

            <version>${cas.version}</version>

        </dependency>

 

Until you add that dependency I think the build process just grabs the two files you mention from the CAS source.

 

Doug

--

- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+u...@apereo.org.

Charl Thiem

unread,
Oct 10, 2017, 5:04:41 AM10/10/17
to cas-...@apereo.org
Hi

Adding that dependency doesn't help either. It creates those files for me too with that dependency...

Regards / Groete
Charl Thiem
Senior Developer
IT Infrastructure Manager



To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/002101d341a5%24d5f5c760%2481e15620%24%40gmail.com.




See OpenCollab email disclaimer at http://www.opencollab.co.za/email-disclaimer

Christian Axel Schmidt Dick

unread,
Oct 10, 2017, 6:23:45 AM10/10/17
to CAS Community
Hi, 

Agree with Charl, I have the dependency, all services even custom ones are being loaded correctly, but those 2 files are always appearing. I tried to edit them to disable them, but they keep being overwritten.

Regards,
Christian
Hi

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+u...@apereo.org.

Brian Gibson

unread,
Oct 10, 2017, 8:36:53 AM10/10/17
to cas-...@apereo.org, Charl Thiem
I got rid of one of those .json files from appearing by adding the bolded <excludes> section to my pom.xml file. I couldn't figure out the XML syntax to try and get more than one .json file from appearing so I have a scheduled task in the CAS 5 Windows server that nukes the other one when it sees it :-)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd ">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas-overlay</artifactId>
    <packaging>war</packaging>
    <version>1.0</version>

    <build>
        <plugins>
            <plugin>
                <groupId>com.rimerosolutions.maven.plugins</groupId>
                <artifactId>wrapper-maven-plugin</artifactId>
                <version>0.0.4</version>
                <configuration>
                    <verifyDownload>true</verifyDownload>
                    <checksumAlgorithm>MD5</checksumAlgorithm>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${springboot.version}</version>
                <configuration>
                    <mainClass>org.springframework.boot.loader.WarLauncher</mainClass>
                    <addResources>true</addResources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <warName>cas</warName>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <recompressZippedFiles>false</recompressZippedFiles>
                    <archive>
                        <compress>false</compress>
                        <manifestFile>${project.build.directory}/war/work/org.apereo.cas/cas-server-webapp${app.server}/META-INF/MANIFEST.MF
                        </manifestFile>
                    </archive>
                    <overlays>
                        <overlay>
                            <groupId>org.apereo.cas</groupId>
                            <artifactId>cas-server-webapp${app.server}</artifactId>
   
               
                              <excludes>
                                    <exclude>WEB-INF/classes/services/HTTPSandIMAPS-10000001.json</exclude>
                                </excludes>
                 
                        </overlay>
                    </overlays>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
            </plugin>
        </plugins>
        <finalName>cas</finalName>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apereo.cas</groupId>
            <artifactId>cas-server-webapp${app.server}</artifactId>
            <version>${cas.version}</version>
            <type>war</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apereo.cas</groupId>
            <artifactId>cas-server-support-ldap</artifactId>

            <version>${cas.version}</version>
        </dependency>
    <dependency>
          <groupId>org.apereo.cas</groupId>
            <artifactId>cas-server-support-json-service-registry</artifactId>
            <version>${cas.version}</version>
    </dependency>
    </dependencies>

    <properties>
        <cas.version>5.1.2</cas.version>
        <springboot.version>1.5.3.RELEASE</springboot.version>
        <!-- app.server could be -jetty, -undertow, -tomcat, or blank if you plan to provide appserver -->
        <app.server>-tomcat</app.server>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <repositories>
        <repository>
            <id>sonatype-releases</id>
            <url>http://oss.sonatype.org/content/repositories/releases/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        <repository>
            <id>sonatype-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
        <repository>
            <id>shibboleth-releases</id>
            <url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
        </repository>
    </repositories>

    <profiles>
        <profile>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <id>pgp</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.s4u.plugins</groupId>
                        <artifactId>pgpverify-maven-plugin</artifactId>
                        <version>1.1.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <pgpKeyServer>hkp://pool.sks-keyservers.net</pgpKeyServer>
                            <pgpKeysCachePath>${settings.localRepository}/pgpkeys-cache</pgpKeysCachePath>
                            <scope>test</scope>
                            <verifyPomFiles>true</verifyPomFiles>
                            <failNoSignature>false</failNoSignature>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
See OpenCollab email disclaimer at http://www.opencollab.co.za/email-disclaimer --
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAK5fTW7kDMMTTMCQx6EXDBB8oyHcfKNb-96NKFduMRizs9VFbw%40mail.gmail.com.

Christian Axel Schmidt Dick

unread,
Oct 11, 2017, 2:31:58 AM10/11/17
to cas-...@apereo.org, Charl Thiem
Thanks Brian, you nailed it. It works!

Hi

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/002101d341a5%24d5f5c760%2481e15620%24%40gmail.com.



See OpenCollab email disclaimer at http://www.opencollab.co.za/email-disclaimer --
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAK5fTW7kDMMTTMCQx6EXDBB8oyHcfKNb-96NKFduMRizs9VFbw%40mail.gmail.com.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+u...@apereo.org.
--

Ben Howell-Thomas

unread,
Oct 12, 2017, 3:56:24 AM10/12/17
to cas-...@apereo.org, Charl Thiem
We add empty versions of those files to our maven override project - much easier.

On 11 October 2017 at 07:31, Christian Axel Schmidt Dick <christiana...@gmail.com> wrote:
Thanks Brian, you nailed it. It works!
Hi

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+unsubscribe@apereo.org.



See OpenCollab email disclaimer at http://www.opencollab.co.za/email-disclaimer --
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+unsubscribe@apereo.org.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+unsubscribe@apereo.org.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
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 cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAB%2BG%3DtBYoquiFHN4t4hi0A7%3DBu%2BVEkV3HGV-w%2B7iLq%2Bay4X4Dg%40mail.gmail.com.


This email is sent on behalf of Northgate Public Services (UK) Limited and its associated companies including Rave Technologies (India) Pvt Limited (together "Northgate Public Services") and is strictly confidential and intended solely for the addressee(s). 
If you are not the intended recipient of this email you must: (i) not disclose, copy or distribute its contents to any other person nor use its contents in any way or you may be acting unlawfully;  (ii) contact Northgate Public Services immediately on +44(0)1442 768445 quoting the name of the sender and the addressee then delete it from your system.
Northgate Public Services has taken reasonable precautions to ensure that no viruses are contained in this email, but does not accept any responsibility once this email has been transmitted.  You should scan attachments (if any) for viruses.

Northgate Public Services (UK) Limited, registered in England and Wales under number 00968498 with a registered address of Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NW.  Rave Technologies (India) Pvt Limited, registered in India under number 117068 with a registered address of 2nd Floor, Ballard House, Adi Marzban Marg, Ballard Estate, Mumbai, Maharashtra, India, 400001.
Reply all
Reply to author
Forward
0 new messages