/**
 * JBoss, Home of Professional Open Source.
 * Copyright 2014 Red Hat, Inc., and individual contributors
 * as indicated by the @author tags.
 *
 * Licensed 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.
 */
package org.jboss.pnc.mavenrepositorymanager.fixture;

import org.commonjava.indy.core.expire.ScheduleManager;
import org.commonjava.indy.inject.TestData;
import org.commonjava.indy.model.core.io.IndyObjectMapper;
import org.commonjava.indy.subsys.maven.MavenComponentManager;
import org.commonjava.maven.galley.auth.AttributePasswordManager;
import org.commonjava.maven.galley.spi.auth.PasswordManager;
import org.commonjava.maven.galley.transport.htcli.Http;
import org.commonjava.maven.galley.transport.htcli.HttpImpl;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Default;
import javax.enterprise.inject.Produces;

@ApplicationScoped
public class Producer {

    private IndyObjectMapper objectMapper;

    private MavenComponentManager componentManager;

    private ScheduleManager scheduleManager;

    private Http http;

    public Producer() {
        objectMapper = new IndyObjectMapper(true);
        PasswordManager passman = new AttributePasswordManager();
        http = new HttpImpl(passman);

        scheduleManager = new ScheduleManager();
        componentManager = new MavenComponentManager();
    }

    // @Produces
    // @Default
    public MavenComponentManager getComponentManager() {
        return componentManager;
    }

    // @Produces
    // @Default
    public ScheduleManager getScheduleManager() {
        return scheduleManager;
    }

    // @Produces
    // @Default
    public Http getHttp() {
        return http;
    }

    @Produces
    @Default
    @TestData
    public IndyObjectMapper getObjectMapper() {
        return objectMapper;
    }

}

@@ -915,71 +915,8 @@
 er;%0A
-import org.commonjava.indy.subsys.maven.MavenComponentManager;%0A
 impo
@@ -969,32 +969,32 @@
 asswordManager;%0A
+
 import org.commo
@@ -1382,61 +1382,8 @@
 r;%0A%0A
-    private MavenComponentManager componentManager;%0A%0A
     
@@ -1628,16 +1628,16 @@
 sman);%0A%0A
+
         
@@ -1681,194 +1681,8 @@
 ();%0A
-        componentManager = new MavenComponentManager();%0A    %7D%0A%0A    // @Produces%0A    // @Default%0A    public MavenComponentManager getComponentManager() %7B%0A        return componentManager;%0A
     

remove maven component init from test producer