Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solr Allinone: The security-constraints removal keeps adding after restarts. #211

Closed
loftux opened this issue Aug 29, 2014 · 0 comments
Closed
Milestone

Comments

@loftux
Copy link
Contributor

loftux commented Aug 29, 2014

In the solr/pom.xml in the allinone archetype a replacement is made to add comment characters to remove security in web.xml. This is done on each restart, but since the file exist with this replacement it keeps adding upp so you get something like

    <!-- <!-- <security-constraint>

and comment within comment is not valid xml
The fix is to remove any previous added commenting, and than replace again.

                <configuration>
                    <ignoreErrors>true</ignoreErrors>
                    <file>${alfresco.solr.war.overlay}/WEB-INF/web.xml</file>
                    <replacements>
                        <replacement>
                            <token><![CDATA[<!-- <security-constraint>]]></token>
                            <value><![CDATA[<security-constraint>]]></value>
                        </replacement>
                        <replacement>
                            <token><![CDATA[</security-role> -->]]></token>
                            <value><![CDATA[</security-role>]]></value>
                        </replacement>
                        <replacement>
                            <token><![CDATA[<security-constraint>]]></token>
                            <value><![CDATA[<!-- <security-constraint>]]></value>
                        </replacement>
                        <replacement>
                            <token><![CDATA[</security-role>]]></token>
                            <value><![CDATA[</security-role> -->]]></value>
                        </replacement>
                    </replacements>
                </configuration>

Honorable mention to bhagyas for the fix!

@mindthegab mindthegab added this to the 2.0.0-beta-3 milestone Aug 29, 2014
mindthegab added a commit that referenced this issue Aug 29, 2014
@mindthegab mindthegab modified the milestones: 2.0.0-beta-4, 2.0.0 Dec 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants