<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~  http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:task="http://www.springframework.org/schema/task"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-3.0.xsd
           http://www.springframework.org/schema/task
           http://www.springframework.org/schema/task/spring-task-3.0.xsd">

  <context:property-placeholder location="classpath:application.properties"/>

  <alias name="userConfiguration#archiva" alias="userConfiguration#default" />

  <bean id="loggerManager" class="org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager"
        init-method="initialize"/>

  <!-- only here to cleanup temp indexes for groups increase number if use for something else -->
  <task:executor id="springExecutor" pool-size="2"/>
  <task:scheduler id="springScheduler" pool-size="2"/>
  <task:annotation-driven executor="springExecutor" scheduler="springScheduler"/>

  <alias name="repositoryStatisticsManager#default" alias="repositoryStatisticsManager"/>
  <!-- TODO olamy need to find a more dynamic way if using jcr impl -->
  <alias name="repositorySessionFactory#jcr" alias="repositorySessionFactory"/>

  <bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="java:comp/env/mail/Session">
    </property>
  </bean>

  <bean name="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
    <property name="session" ref="mailSession"/>
  </bean>

  <!-- START SNIPPET: configuration-files-list -->
  <bean name="commons-configuration" class="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry">
    <property name="properties">
      <value>
        <![CDATA[
        <configuration>
          <system/>
          <jndi prefix="java:comp/env" config-optional="true"/>
          <xml fileName="${user.home}/.m2/archiva.xml" config-optional="true"
               config-name="org.apache.archiva.user"
               config-at="org.apache.archiva"/>
          <xml fileName="${user.home}/.m2/shared.xml" config-optional="true"
               config-name="org.apache.maven.shared.app.user" config-at="org.apache.maven.shared.app"
               config-forceCreate="true"/>
          <properties fileName="${user.home}/.m2/security.properties" config-optional="true"
                      config-at="org.apache.archiva.redback"/>
          <properties fileName="${user.home}/.m2/archiva.properties" config-optional="true"
                      config-at="org.apache.archiva.redback"/>
          <xml fileName="${appserver.base}/conf/archiva.xml" config-optional="true"
               config-name="org.apache.archiva.base"
               config-at="org.apache.archiva"/>
          <xml fileName="${appserver.base}/conf/shared.xml" config-optional="true"
               config-name="org.apache.maven.shared.app.base" config-at="org.apache.maven.shared.app"/>
          <xml fileName="${appserver.base}/conf/common.xml" config-optional="true"/>
          <properties fileName="${appserver.base}/conf/security.properties" config-optional="true"
                      config-at="org.apache.archiva.redback"/>
          <xml fileName="${appserver.home}/conf/archiva.xml" config-optional="true"
               config-at="org.apache.archiva"/>
          <xml fileName="${appserver.home}/conf/shared.xml" config-optional="true"
               config-at="org.apache.maven.shared.app"/>
          <xml fileName="${appserver.home}/conf/common.xml" config-optional="true"/>
          <properties fileName="${appserver.home}/conf/security.properties" config-optional="true"
                      config-at="org.apache.archiva.redback"/>
          <properties fileName="org/apache/archiva/redback-security.properties" config-at="org.apache.archiva.redback"/>
        </configuration>
        ]]>
      </value>
    </property>    
  </bean>
  <!-- END SNIPPET: configuration-files-list -->

  <bean name="jdoFactory#users" class="org.apache.archiva.redback.components.jdo.DataSourceConfigurableJdoFactory">
    <property name="connectionFactoryName" value="java:comp/env/jdbc/users"/>
    <property name="shutdownConnectionFactoryName" value="java:comp/env/jdbc/usersShutdown"/>
    <property name="persistenceManagerFactoryClass" value="org.jpox.PersistenceManagerFactoryImpl"/>
    <property name="otherProperties">
      <props>
        <prop key="org.jpox.autoCreateSchema">true</prop>
        <prop key="org.jpox.validateTables">false</prop>
        <prop key="org.jpox.validateConstraints">false</prop>
        <prop key="org.jpox.validateColumns">false</prop>
        <prop key="org.jpox.autoStartMechanism">None</prop>
        <prop key="org.jpox.transactionIsolation">READ_COMMITTED</prop>
        <prop key="org.jpox.poid.transactionIsolation">READ_COMMITTED</prop>
        <prop key="org.jpox.rdbms.dateTimezone">JDK_DEFAULT_TIMEZONE</prop>
        <!-- NEEDED FOR MYSQL UTF-8 Databases -->
        <prop key="org.jpox.rdbms.stringDefaultLength">255</prop>

        <!-- NEEDED FOR POSTGRES, But causes problems in other JDBC implementations.
        <prop key="org.jpox.identifier.case">PreserveCase</prop>
        -->

        <!-- cache activation -->
        <prop key="org.jpox.cache.level2">true</prop>
        <prop key="org.jpox.cache.level2.type">ehcacheclassbased</prop>
        <prop key="org.jpox.cache.level2.cacheName">defaultJpox</prop>
        <prop key="org.jpox.cache.level2.configurationFile">/ehcache.xml</prop>
      </props>
    </property>
  </bean>


  <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
    <property name="properties">
      <props>
        <prop key="org.quartz.scheduler.instanceName">scheduler1</prop>
        <prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop>
        <prop key="org.quartz.threadPool.threadCount">2</prop>
        <prop key="org.quartz.threadPool.threadPriority">4</prop>
        <prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop>
      </props>
    </property>
  </bean>

  <alias name="environmentCheck#archiva-locked-admin-check" alias="environmentCheck#locked-admin-check"/>
  <alias name="userManager#archiva" alias="userManager#configurable"/>
  <alias name="authenticator#archiva" alias="authenticator#user-manager"/>

  <alias name="ldapConnectionFactory#archiva" alias="ldapConnectionFactory"/>
  <alias name="ldapConnectionFactory#archiva" alias="ldapConnectionFactory#configurable"/>
    
    <!-- <component>
      <role>org.apache.archiva.webdav.util.MimeTypes</role>
      <implementation>org.apache.archiva.webdav.util.MimeTypes</implementation>
      <description>MimeTypes</description>
      <configuration>
        <resource>archiva-mime-types.txt</resource>
      </configuration>
    </component> -->

    <!--
     
    If caching is desired to improve performance then make uncomment this and make sure the following configuration parameter is in the security.properties
     
    user.manager.impl=cached
    -->
     
    <!--
    <bean name="userManager#cached" class="org.apache.archiva.redback.users.cached.CachedUserManager">
      <property name="userImpl" ref="userMapper#ldap"/>
      <property name="usersCache" ref="cache#users"/>
    </bean>     
    -->


  <!-- override jcr repository location -->
  <!-- START SNIPPET: jcr-location -->
  <!--
  <bean id="jcr-config" class="org.apache.archiva.metadata.repository.jcr.ArchivaJcrRepositoryConfig" factory-method="create">
    <constructor-arg value="${appserver.base}/conf/repository.xml"/>
    <constructor-arg value="${appserver.base}/data/jcr"/>
  </bean>
  -->
  <!-- END SNIPPET: jcr-location -->

</beans><commit_msg>fix component samples declaration and removed not anymore used<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~  http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:task="http://www.springframework.org/schema/task"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-3.0.xsd
           http://www.springframework.org/schema/task
           http://www.springframework.org/schema/task/spring-task-3.0.xsd">

  <context:property-placeholder location="classpath:application.properties"/>

  <alias name="userConfiguration#archiva" alias="userConfiguration#default" />

  <bean id="loggerManager" class="org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager"
        init-method="initialize"/>

  <!-- only here to cleanup temp indexes for groups increase number if use for something else -->
  <task:executor id="springExecutor" pool-size="2"/>
  <task:scheduler id="springScheduler" pool-size="2"/>
  <task:annotation-driven executor="springExecutor" scheduler="springScheduler"/>

  <alias name="repositoryStatisticsManager#default" alias="repositoryStatisticsManager"/>
  <!-- TODO olamy need to find a more dynamic way if using jcr impl -->
  <alias name="repositorySessionFactory#jcr" alias="repositorySessionFactory"/>

  <bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="java:comp/env/mail/Session">
    </property>
  </bean>

  <bean name="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
    <property name="session" ref="mailSession"/>
  </bean>

  <!-- START SNIPPET: configuration-files-list -->
  <bean name="commons-configuration" class="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry">
    <property name="properties">
      <value>
        <![CDATA[
        <configuration>
          <system/>
          <jndi prefix="java:comp/env" config-optional="true"/>
          <xml fileName="${user.home}/.m2/archiva.xml" config-optional="true"
               config-name="org.apache.archiva.user"
               config-at="org.apache.archiva"/>
          <xml fileName="${user.home}/.m2/shared.xml" config-optional="true"
               config-name="org.apache.maven.shared.app.user" config-at="org.apache.maven.shared.app"
               config-forceCreate="true"/>
          <properties fileName="${user.home}/.m2/security.properties" config-optional="true"
                      config-at="org.apache.archiva.redback"/>
          <properties fileName="${user.home}/.m2/archiva.properties" config-optional="true"
                      config-at="org.apache.archiva.redback"/>
          <xml fileName="${appserver.base}/conf/archiva.xml" config-optional="true"
               config-name="org.apache.archiva.base"
               config-at="org.apache.archiva"/>
          <xml fileName="${appserver.base}/conf/shared.xml" config-optional="true"
               config-name="org.apache.maven.shared.app.base" config-at="org.apache.maven.shared.app"/>
          <xml fileName="${appserver.base}/conf/common.xml" config-optional="true"/>
          <properties fileName="${appserver.base}/conf/security.properties" config-optional="true"
                      config-at="org.apache.archiva.redback"/>
          <xml fileName="${appserver.home}/conf/archiva.xml" config-optional="true"
               config-at="org.apache.archiva"/>
          <xml fileName="${appserver.home}/conf/shared.xml" config-optional="true"
               config-at="org.apache.maven.shared.app"/>
          <xml fileName="${appserver.home}/conf/common.xml" config-optional="true"/>
          <properties fileName="${appserver.home}/conf/security.properties" config-optional="true"
                      config-at="org.apache.archiva.redback"/>
          <properties fileName="org/apache/archiva/redback-security.properties" config-at="org.apache.archiva.redback"/>
        </configuration>
        ]]>
      </value>
    </property>    
  </bean>
  <!-- END SNIPPET: configuration-files-list -->

  <bean name="jdoFactory#users" class="org.apache.archiva.redback.components.jdo.DataSourceConfigurableJdoFactory">
    <property name="connectionFactoryName" value="java:comp/env/jdbc/users"/>
    <property name="shutdownConnectionFactoryName" value="java:comp/env/jdbc/usersShutdown"/>
    <property name="persistenceManagerFactoryClass" value="org.jpox.PersistenceManagerFactoryImpl"/>
    <property name="otherProperties">
      <props>
        <prop key="org.jpox.autoCreateSchema">true</prop>
        <prop key="org.jpox.validateTables">false</prop>
        <prop key="org.jpox.validateConstraints">false</prop>
        <prop key="org.jpox.validateColumns">false</prop>
        <prop key="org.jpox.autoStartMechanism">None</prop>
        <prop key="org.jpox.transactionIsolation">READ_COMMITTED</prop>
        <prop key="org.jpox.poid.transactionIsolation">READ_COMMITTED</prop>
        <prop key="org.jpox.rdbms.dateTimezone">JDK_DEFAULT_TIMEZONE</prop>
        <!-- NEEDED FOR MYSQL UTF-8 Databases -->
        <prop key="org.jpox.rdbms.stringDefaultLength">255</prop>

        <!-- NEEDED FOR POSTGRES, But causes problems in other JDBC implementations.
        <prop key="org.jpox.identifier.case">PreserveCase</prop>
        -->

        <!-- cache activation -->
        <prop key="org.jpox.cache.level2">true</prop>
        <prop key="org.jpox.cache.level2.type">ehcacheclassbased</prop>
        <prop key="org.jpox.cache.level2.cacheName">defaultJpox</prop>
        <prop key="org.jpox.cache.level2.configurationFile">/ehcache.xml</prop>
      </props>
    </property>
  </bean>


  <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
    <property name="properties">
      <props>
        <prop key="org.quartz.scheduler.instanceName">scheduler1</prop>
        <prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop>
        <prop key="org.quartz.threadPool.threadCount">2</prop>
        <prop key="org.quartz.threadPool.threadPriority">4</prop>
        <prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop>
      </props>
    </property>
  </bean>

  <alias name="environmentCheck#archiva-locked-admin-check" alias="environmentCheck#locked-admin-check"/>
  <alias name="userManager#archiva" alias="userManager#configurable"/>
  <alias name="authenticator#archiva" alias="authenticator#user-manager"/>

  <alias name="ldapConnectionFactory#archiva" alias="ldapConnectionFactory"/>
  <alias name="ldapConnectionFactory#archiva" alias="ldapConnectionFactory#configurable"/>

  <!--
  <bean name="mimeTpes" class="org.apache.archiva.webdav.util.MimeTypes">
    <property name="resource" value="archiva-mime-types.txt"/>
  </bean>
  -->

  <!-- override jcr repository location -->
  <!-- START SNIPPET: jcr-location -->
  <!--
  <bean id="jcr-config" class="org.apache.archiva.metadata.repository.jcr.ArchivaJcrRepositoryConfig" factory-method="create">
    <constructor-arg value="${appserver.base}/conf/repository.xml"/>
    <constructor-arg value="${appserver.base}/data/jcr"/>
  </bean>
  -->
  <!-- END SNIPPET: jcr-location -->

</beans>
{'fraction_non_alphanumeric': 0.14969332253211434, 'fraction_numerical': 0.004281911815762065, 'mean_word_length': 3.453233702653955, 'pattern_counts': {'":': 0, '<': 258, '<?xml version=': 2, '>': 258, 'https://': 0, 'lorem ipsum': 0, 'www.': 22, 'xml': 46}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6725223', 'n_tokens_mistral': 5119, 'n_tokens_neox': 4970, 'n_words': 827}