@@ -0,0 +1,78 @@ | |||
package org.apache.archiva.common; | |||
/* | |||
* 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. | |||
*/ | |||
/** | |||
* Generic interface for mapping DTOs | |||
* | |||
* @author Martin Schreier <martin_s@apache.org> | |||
*/ | |||
public interface ModelMapper<S,T> | |||
{ | |||
/** | |||
* Converts the source instance to a new instance of the target type. | |||
* @param source the source instance | |||
* @return a new instance of the target type | |||
*/ | |||
T map(S source); | |||
/** | |||
* Updates the target instance based on the source instance | |||
* @param source the source instance | |||
* @param target the target instance | |||
*/ | |||
void update( S source, T target ); | |||
/** | |||
* Converts the target instance back to the source type | |||
* @param target the target instance | |||
* @return a new instance of the source type | |||
*/ | |||
S reverseMap(T target); | |||
/** | |||
* Updates the source instance based on the target instance | |||
* @param target the target instance | |||
* @param source the source instance | |||
*/ | |||
void reverseUpdate( T target, S source); | |||
/** | |||
* Returns the class name of the source type | |||
* @return the source type | |||
*/ | |||
Class<S> getSourceType(); | |||
/** | |||
* Returns the class name of the target type | |||
* @return the target type | |||
*/ | |||
Class<T> getTargetType(); | |||
/** | |||
* Returns <code>true</code>, if the given type are the same or supertype of the mapping types. | |||
* @param sourceType | |||
* @param targetType | |||
* @param <S> | |||
* @param <T> | |||
* @return | |||
*/ | |||
<S, T> boolean supports( Class<S> sourceType, Class<T> targetType ); | |||
} |
@@ -0,0 +1,40 @@ | |||
package org.apache.archiva.common; | |||
/* | |||
* 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. | |||
*/ | |||
/** | |||
* Interface that returns a given DTO mapper. | |||
* | |||
* @author Martin Schreier <martin_s@apache.org> | |||
* | |||
* @param <SB> The base source type for the model mapper | |||
* @param <TB> The base target type for the model mapper | |||
*/ | |||
public interface ModelMapperFactory<SB,TB> | |||
{ | |||
/** | |||
* Returns a mapper for the given source and target type. If no mapper is registered for this combination, | |||
* it will throw a {@link IllegalArgumentException} | |||
* @param sourceType the source type for the mapping | |||
* @param targetType the destination type | |||
* @param <S> source type | |||
* @param <T> destination type | |||
* @return the mapper instance | |||
*/ | |||
<S extends SB, T extends TB> ModelMapper<S, T> getMapper( Class<S> sourceType, Class<T> targetType ) throws IllegalArgumentException; | |||
} |
@@ -0,0 +1,44 @@ | |||
<?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. | |||
--> | |||
<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"> | |||
<parent> | |||
<artifactId>archiva-configuration</artifactId> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<version>3.0.0-SNAPSHOT</version> | |||
</parent> | |||
<modelVersion>4.0.0</modelVersion> | |||
<artifactId>archiva-configuration-model</artifactId> | |||
<name>Archiva Base :: Configuration :: Model</name> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.commons</groupId> | |||
<artifactId>commons-lang3</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.commons</groupId> | |||
<artifactId>commons-collections4</artifactId> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,6 +18,7 @@ package org.apache.archiva.configuration; | |||
* under the License. | |||
*/ | |||
/** | |||
* Class Configuration. | |||
* | |||
@@ -769,7 +769,7 @@ public class Configuration | |||
connectors.add( proxyConfig ); | |||
java.util.Collections.sort( connectors, | |||
org.apache.archiva.configuration.functors.ProxyConnectorConfigurationOrderComparator.getInstance() ); | |||
org.apache.archiva.configuration.model.functors.ProxyConnectorConfigurationOrderComparator.getInstance() ); | |||
} | |||
} | |||
@@ -0,0 +1,25 @@ | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* 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. | |||
*/ | |||
/** | |||
* @author Martin Schreier <martin_s@apache.org> | |||
*/ | |||
public interface ConfigurationModel | |||
{ | |||
} |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -27,7 +26,7 @@ package org.apache.archiva.configuration; | |||
@SuppressWarnings( "all" ) | |||
public class ManagedRepositoryConfiguration | |||
extends AbstractRepositoryConfiguration | |||
implements java.io.Serializable | |||
implements java.io.Serializable, ConfigurationModel | |||
{ | |||
//--------------------------/ |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -27,7 +26,7 @@ package org.apache.archiva.configuration; | |||
@SuppressWarnings( "all" ) | |||
public class RemoteRepositoryConfiguration | |||
extends AbstractRepositoryConfiguration | |||
implements java.io.Serializable | |||
implements java.io.Serializable, ConfigurationModel | |||
{ | |||
//--------------------------/ |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -30,7 +29,7 @@ import java.util.List; | |||
*/ | |||
@SuppressWarnings( "all" ) | |||
public class RepositoryGroupConfiguration extends AbstractRepositoryConfiguration | |||
implements Serializable | |||
implements Serializable, ConfigurationModel | |||
{ | |||
//--------------------------/ |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.model; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.functors; | |||
package org.apache.archiva.configuration.model.functors; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration.functors; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,7 +18,7 @@ package org.apache.archiva.configuration.functors; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.FileType; | |||
import org.apache.archiva.configuration.model.FileType; | |||
import org.apache.commons.collections4.Predicate; | |||
import org.apache.commons.lang3.StringUtils; | |||
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.functors; | |||
package org.apache.archiva.configuration.model.functors; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration.functors; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,7 +18,7 @@ package org.apache.archiva.configuration.functors; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.FileType; | |||
import org.apache.archiva.configuration.model.FileType; | |||
import org.apache.commons.collections4.Closure; | |||
import java.util.HashMap; |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.functors; | |||
package org.apache.archiva.configuration.model.functors; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration.functors; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,7 +18,7 @@ package org.apache.archiva.configuration.functors; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkProxyConfiguration; | |||
import java.util.Comparator; | |||
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.functors; | |||
package org.apache.archiva.configuration.model.functors; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration.functors; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,7 +18,7 @@ package org.apache.archiva.configuration.functors; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkProxyConfiguration; | |||
import org.apache.commons.collections4.Predicate; | |||
import org.apache.commons.lang3.StringUtils; | |||
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.functors; | |||
package org.apache.archiva.configuration.model.functors; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration.functors; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,7 +18,7 @@ package org.apache.archiva.configuration.functors; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import java.util.Comparator; | |||
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.functors; | |||
package org.apache.archiva.configuration.model.functors; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration.functors; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,7 +18,7 @@ package org.apache.archiva.configuration.functors; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import org.apache.commons.collections4.Predicate; | |||
import org.apache.commons.lang3.StringUtils; | |||
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.functors; | |||
package org.apache.archiva.configuration.model.functors; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration.functors; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,7 +18,7 @@ package org.apache.archiva.configuration.functors; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.AbstractRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration; | |||
import java.util.Comparator; | |||
@@ -0,0 +1,176 @@ | |||
<?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. | |||
--> | |||
<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"> | |||
<parent> | |||
<artifactId>archiva-configuration</artifactId> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<version>3.0.0-SNAPSHOT</version> | |||
</parent> | |||
<modelVersion>4.0.0</modelVersion> | |||
<artifactId>archiva-configuration-provider</artifactId> | |||
<name>Archiva Base :: Configuration :: Provider</name> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<artifactId>archiva-configuration-model</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-common</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-policies</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva.components.registry</groupId> | |||
<artifactId>archiva-components-spring-registry-api</artifactId> | |||
<exclusions> | |||
<exclusion> | |||
<groupId>org.springframework</groupId> | |||
<artifactId>spring-test</artifactId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.springframework</groupId> | |||
<artifactId>spring-context</artifactId> | |||
<exclusions> | |||
<exclusion> | |||
<groupId>commons-logging</groupId> | |||
<artifactId>commons-logging</artifactId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva.components.registry</groupId> | |||
<artifactId>archiva-components-spring-registry-commons</artifactId> | |||
<exclusions> | |||
<exclusion> | |||
<groupId>org.springframework</groupId> | |||
<artifactId>spring-test</artifactId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva.components</groupId> | |||
<artifactId>archiva-components-expression-evaluator</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>jakarta.annotation</groupId> | |||
<artifactId>jakarta.annotation-api</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>jakarta.inject</groupId> | |||
<artifactId>jakarta.inject-api</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.commons</groupId> | |||
<artifactId>commons-configuration2</artifactId> | |||
<scope>runtime</scope> | |||
<exclusions> | |||
<exclusion> | |||
<groupId>commons-logging</groupId> | |||
<artifactId>commons-logging</artifactId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>commons-io</groupId> | |||
<artifactId>commons-io</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.commons</groupId> | |||
<artifactId>commons-lang3</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.commons</groupId> | |||
<artifactId>commons-collections4</artifactId> | |||
</dependency> | |||
<!-- Test scope --> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-test-utils</artifactId> | |||
<version>${project.version}</version> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.springframework</groupId> | |||
<artifactId>spring-test</artifactId> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.logging.log4j</groupId> | |||
<artifactId>log4j-jcl</artifactId> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.mockito</groupId> | |||
<artifactId>mockito-core</artifactId> | |||
<scope>test</scope> | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-surefire-plugin</artifactId> | |||
<configuration> | |||
<systemPropertyVariables> | |||
<basedir>${basedir}</basedir> | |||
</systemPropertyVariables> | |||
<trimStackTrace>false</trimStackTrace> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
<pluginManagement> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.rat</groupId> | |||
<artifactId>apache-rat-plugin</artifactId> | |||
<configuration> | |||
<excludes> | |||
<exclude>src/main/resources/org/apache/archiva/configuration/default-archiva.xml</exclude> | |||
<exclude>src/test/conf/maven-proxy-complete.conf</exclude> | |||
<exclude>src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml</exclude> | |||
<exclude>nbactions.xml</exclude> | |||
</excludes> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</pluginManagement> | |||
</build> | |||
</project> |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -22,6 +21,7 @@ package org.apache.archiva.configuration; | |||
import org.apache.archiva.components.registry.Registry; | |||
import org.apache.archiva.components.registry.RegistryException; | |||
import org.apache.archiva.components.registry.RegistryListener; | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import java.nio.file.Path; | |||
import java.util.List; |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,12 +18,6 @@ package org.apache.archiva.configuration; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.functors.ProxyConnectorConfigurationOrderComparator; | |||
import org.apache.archiva.configuration.io.registry.ConfigurationRegistryReader; | |||
import org.apache.archiva.configuration.io.registry.ConfigurationRegistryWriter; | |||
import org.apache.archiva.policies.AbstractUpdatePolicy; | |||
import org.apache.archiva.policies.CachedFailuresPolicy; | |||
import org.apache.archiva.policies.ChecksumPolicy; | |||
import org.apache.archiva.components.evaluator.DefaultExpressionEvaluator; | |||
import org.apache.archiva.components.evaluator.EvaluatorException; | |||
import org.apache.archiva.components.evaluator.ExpressionEvaluator; | |||
@@ -33,6 +26,17 @@ import org.apache.archiva.components.registry.Registry; | |||
import org.apache.archiva.components.registry.RegistryException; | |||
import org.apache.archiva.components.registry.RegistryListener; | |||
import org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry; | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryCheckPath; | |||
import org.apache.archiva.configuration.model.functors.ProxyConnectorConfigurationOrderComparator; | |||
import org.apache.archiva.configuration.provider.io.registry.ConfigurationRegistryReader; | |||
import org.apache.archiva.configuration.provider.io.registry.ConfigurationRegistryWriter; | |||
import org.apache.archiva.policies.AbstractUpdatePolicy; | |||
import org.apache.archiva.policies.CachedFailuresPolicy; | |||
import org.apache.archiva.policies.ChecksumPolicy; | |||
import org.apache.commons.collections4.CollectionUtils; | |||
import org.apache.commons.collections4.ListUtils; | |||
import org.apache.commons.io.FileUtils; | |||
@@ -49,8 +53,18 @@ import java.nio.file.Files; | |||
import java.nio.file.InvalidPathException; | |||
import java.nio.file.Path; | |||
import java.nio.file.Paths; | |||
import java.util.*; | |||
import java.util.ArrayList; | |||
import java.util.Arrays; | |||
import java.util.Collection; | |||
import java.util.Collections; | |||
import java.util.HashMap; | |||
import java.util.HashSet; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
import java.util.Locale; | |||
import java.util.Map; | |||
import java.util.Map.Entry; | |||
import java.util.Set; | |||
/** | |||
* <p> | |||
@@ -508,7 +522,7 @@ public class DefaultArchivaConfiguration | |||
} | |||
private void escapeCronExpressions(Configuration configuration) { | |||
for (ManagedRepositoryConfiguration c : configuration.getManagedRepositories()) { | |||
for ( ManagedRepositoryConfiguration c : configuration.getManagedRepositories()) { | |||
c.setRefreshCronExpression(escapeCronExpression(c.getRefreshCronExpression())); | |||
} | |||
} |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -20,9 +19,12 @@ package org.apache.archiva.configuration; | |||
*/ | |||
import org.apache.archiva.common.FileTypeUtils; | |||
import org.apache.archiva.configuration.functors.FiletypeSelectionPredicate; | |||
import org.apache.archiva.components.registry.Registry; | |||
import org.apache.archiva.components.registry.RegistryListener; | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import org.apache.archiva.configuration.model.FileType; | |||
import org.apache.archiva.configuration.model.RepositoryScanningConfiguration; | |||
import org.apache.archiva.configuration.model.functors.FiletypeSelectionPredicate; | |||
import org.apache.commons.collections4.CollectionUtils; | |||
import org.apache.commons.collections4.IterableUtils; | |||
import org.apache.commons.collections4.Predicate; |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,6 +18,11 @@ package org.apache.archiva.configuration; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.policies.ReleasesPolicy; | |||
import org.apache.archiva.policies.SnapshotsPolicy; | |||
import org.apache.commons.lang3.StringUtils; |
@@ -1,5 +1,5 @@ | |||
package org.apache.archiva.configuration.io.registry; | |||
package org.apache.archiva.configuration.provider.io.registry; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -10,8 +10,7 @@ package org.apache.archiva.configuration.io.registry; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -20,8 +19,32 @@ package org.apache.archiva.configuration.io.registry; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.*; | |||
import org.apache.archiva.components.registry.Registry; | |||
import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.AbstractRepositoryConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.ArchivaDefaultConfiguration; | |||
import org.apache.archiva.configuration.model.ArchivaRuntimeConfiguration; | |||
import org.apache.archiva.configuration.model.CacheConfiguration; | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import org.apache.archiva.configuration.model.FileLockConfiguration; | |||
import org.apache.archiva.configuration.model.FileType; | |||
import org.apache.archiva.configuration.model.LdapConfiguration; | |||
import org.apache.archiva.configuration.model.LdapGroupMapping; | |||
import org.apache.archiva.configuration.model.LegacyArtifactPath; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.model.OrganisationInformation; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorRuleConfiguration; | |||
import org.apache.archiva.configuration.model.RedbackRuntimeConfiguration; | |||
import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryCheckPath; | |||
import org.apache.archiva.configuration.model.RepositoryGroupConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryScanningConfiguration; | |||
import org.apache.archiva.configuration.model.SyncConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.UserInterfaceOptions; | |||
import org.apache.archiva.configuration.model.WebappConfiguration; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
@@ -34,7 +57,7 @@ import java.util.List; | |||
* Generate Redback Registry input mechanism for model 'Configuration'. | |||
*/ | |||
public class ConfigurationRegistryReader { | |||
public Configuration read(Registry registry) { | |||
public Configuration read( Registry registry) { | |||
return readConfiguration("", registry); | |||
} | |||
@@ -140,7 +163,7 @@ public class ConfigurationRegistryReader { | |||
return value; | |||
} | |||
private AbstractRepositoryConfiguration readAbstractRepositoryConfiguration(String prefix, Registry registry) { | |||
private AbstractRepositoryConfiguration readAbstractRepositoryConfiguration( String prefix, Registry registry) { | |||
AbstractRepositoryConfiguration value = new AbstractRepositoryConfiguration(); | |||
//String id = registry.getString( prefix + "id", value.getId() ); | |||
@@ -776,7 +799,7 @@ public class ConfigurationRegistryReader { | |||
return value; | |||
} | |||
private RepositoryCheckPath readRepositoryCheckPath(String prefix, Registry registry) { | |||
private RepositoryCheckPath readRepositoryCheckPath( String prefix, Registry registry) { | |||
RepositoryCheckPath value = new RepositoryCheckPath(); | |||
//String url = registry.getString( prefix + "url", value.getUrl() ); | |||
@@ -815,7 +838,7 @@ public class ConfigurationRegistryReader { | |||
return value; | |||
} | |||
private AbstractRepositoryConnectorConfiguration readAbstractRepositoryConnectorConfiguration(String prefix, Registry registry) { | |||
private AbstractRepositoryConnectorConfiguration readAbstractRepositoryConnectorConfiguration( String prefix, Registry registry) { | |||
AbstractRepositoryConnectorConfiguration value = new AbstractRepositoryConnectorConfiguration(); | |||
//String sourceRepoId = registry.getString( prefix + "sourceRepoId", value.getSourceRepoId() ); | |||
@@ -997,7 +1020,7 @@ public class ConfigurationRegistryReader { | |||
return value; | |||
} | |||
private SyncConnectorConfiguration readSyncConnectorConfiguration(String prefix, Registry registry) { | |||
private SyncConnectorConfiguration readSyncConnectorConfiguration( String prefix, Registry registry) { | |||
SyncConnectorConfiguration value = new SyncConnectorConfiguration(); | |||
//String cronExpression = registry.getString( prefix + "cronExpression", value.getCronExpression() ); |
@@ -1,5 +1,5 @@ | |||
package org.apache.archiva.configuration.io.registry; | |||
package org.apache.archiva.configuration.provider.io.registry; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -10,8 +10,7 @@ package org.apache.archiva.configuration.io.registry; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -20,8 +19,32 @@ package org.apache.archiva.configuration.io.registry; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.*; | |||
import org.apache.archiva.components.registry.Registry; | |||
import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.AbstractRepositoryConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.ArchivaDefaultConfiguration; | |||
import org.apache.archiva.configuration.model.ArchivaRuntimeConfiguration; | |||
import org.apache.archiva.configuration.model.CacheConfiguration; | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import org.apache.archiva.configuration.model.FileLockConfiguration; | |||
import org.apache.archiva.configuration.model.FileType; | |||
import org.apache.archiva.configuration.model.LdapConfiguration; | |||
import org.apache.archiva.configuration.model.LdapGroupMapping; | |||
import org.apache.archiva.configuration.model.LegacyArtifactPath; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.model.OrganisationInformation; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorRuleConfiguration; | |||
import org.apache.archiva.configuration.model.RedbackRuntimeConfiguration; | |||
import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryCheckPath; | |||
import org.apache.archiva.configuration.model.RepositoryGroupConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryScanningConfiguration; | |||
import org.apache.archiva.configuration.model.SyncConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.UserInterfaceOptions; | |||
import org.apache.archiva.configuration.model.WebappConfiguration; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
@@ -34,7 +57,7 @@ import java.util.List; | |||
* Generate Plexus Registry output mechanism for model 'Configuration'. | |||
*/ | |||
public class ConfigurationRegistryWriter { | |||
public void write(Configuration model, Registry registry) { | |||
public void write( Configuration model, Registry registry) { | |||
writeConfiguration("", model, registry); | |||
} | |||
@@ -172,7 +195,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeAbstractRepositoryConfiguration(String prefix, AbstractRepositoryConfiguration value, Registry registry) { | |||
private void writeAbstractRepositoryConfiguration( String prefix, AbstractRepositoryConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getId() != null | |||
) { | |||
@@ -457,7 +480,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeRepositoryCheckPath(String prefix, RepositoryCheckPath value, Registry registry) { | |||
private void writeRepositoryCheckPath( String prefix, RepositoryCheckPath value, Registry registry) { | |||
if (value != null) { | |||
if (value.getUrl() != null | |||
) { | |||
@@ -472,7 +495,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeAbstractRepositoryConnectorConfiguration(String prefix, AbstractRepositoryConnectorConfiguration value, Registry registry) { | |||
private void writeAbstractRepositoryConnectorConfiguration( String prefix, AbstractRepositoryConnectorConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getSourceRepoId() != null | |||
) { | |||
@@ -635,7 +658,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeSyncConnectorConfiguration(String prefix, SyncConnectorConfiguration value, Registry registry) { | |||
private void writeSyncConnectorConfiguration( String prefix, SyncConnectorConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getCronExpression() != null && !value.getCronExpression().equals("0 0 * * * ?") | |||
) { | |||
@@ -748,7 +771,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeRepositoryScanningConfiguration(String prefix, RepositoryScanningConfiguration value, Registry registry) { | |||
private void writeRepositoryScanningConfiguration( String prefix, RepositoryScanningConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getFileTypes() != null && value.getFileTypes().size() > 0 | |||
) { | |||
@@ -807,7 +830,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeOrganisationInformation(String prefix, OrganisationInformation value, Registry registry) { | |||
private void writeOrganisationInformation( String prefix, OrganisationInformation value, Registry registry) { | |||
if (value != null) { | |||
if (value.getName() != null | |||
) { | |||
@@ -827,7 +850,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeWebappConfiguration(String prefix, WebappConfiguration value, Registry registry) { | |||
private void writeWebappConfiguration( String prefix, WebappConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getUi() != null | |||
) { | |||
@@ -836,7 +859,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeUserInterfaceOptions(String prefix, UserInterfaceOptions value, Registry registry) { | |||
private void writeUserInterfaceOptions( String prefix, UserInterfaceOptions value, Registry registry) { | |||
if (value != null) { | |||
String showFindArtifacts = "showFindArtifacts"; | |||
registry.setBoolean(prefix + showFindArtifacts, value.isShowFindArtifacts()); | |||
@@ -854,7 +877,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeNetworkConfiguration(String prefix, NetworkConfiguration value, Registry registry) { | |||
private void writeNetworkConfiguration( String prefix, NetworkConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getMaxTotal() != 30 | |||
) { | |||
@@ -871,7 +894,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeArchivaRuntimeConfiguration(String prefix, ArchivaRuntimeConfiguration value, Registry registry) { | |||
private void writeArchivaRuntimeConfiguration( String prefix, ArchivaRuntimeConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getUrlFailureCacheConfiguration() != null | |||
) { | |||
@@ -916,7 +939,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeRedbackRuntimeConfiguration(String prefix, RedbackRuntimeConfiguration value, Registry registry) { | |||
private void writeRedbackRuntimeConfiguration( String prefix, RedbackRuntimeConfiguration value, Registry registry) { | |||
if (value != null) { | |||
String migratedFromRedbackConfiguration = "migratedFromRedbackConfiguration"; | |||
registry.setBoolean(prefix + migratedFromRedbackConfiguration, value.isMigratedFromRedbackConfiguration()); | |||
@@ -977,7 +1000,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeArchivaDefaultConfiguration(String prefix, ArchivaDefaultConfiguration value, Registry registry) { | |||
private void writeArchivaDefaultConfiguration( String prefix, ArchivaDefaultConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getDefaultCheckPaths() != null && value.getDefaultCheckPaths().size() > 0 | |||
) { | |||
@@ -993,7 +1016,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeLdapConfiguration(String prefix, LdapConfiguration value, Registry registry) { | |||
private void writeLdapConfiguration( String prefix, LdapConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getHostName() != null | |||
) { | |||
@@ -1057,7 +1080,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeFileLockConfiguration(String prefix, FileLockConfiguration value, Registry registry) { | |||
private void writeFileLockConfiguration( String prefix, FileLockConfiguration value, Registry registry) { | |||
if (value != null) { | |||
String skipLocking = "skipLocking"; | |||
registry.setBoolean(prefix + skipLocking, value.isSkipLocking()); | |||
@@ -1069,7 +1092,7 @@ public class ConfigurationRegistryWriter { | |||
} | |||
} | |||
private void writeCacheConfiguration(String prefix, CacheConfiguration value, Registry registry) { | |||
private void writeCacheConfiguration( String prefix, CacheConfiguration value, Registry registry) { | |||
if (value != null) { | |||
if (value.getTimeToIdleSeconds() != -1 | |||
) { |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.util; | |||
package org.apache.archiva.configuration.provider.util; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
* or more contributor license agreements. See the NOTICE file |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,6 +18,11 @@ package org.apache.archiva.configuration; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryScanningConfiguration; | |||
import org.apache.archiva.configuration.model.UserInterfaceOptions; | |||
import org.apache.archiva.configuration.model.WebappConfiguration; | |||
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; | |||
import org.apache.commons.io.FileUtils; | |||
import org.apache.commons.lang3.StringUtils; |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -20,12 +19,21 @@ package org.apache.archiva.configuration; | |||
*/ | |||
import org.apache.archiva.components.registry.RegistryException; | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import org.apache.archiva.configuration.model.LegacyArtifactPath; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryGroupConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryScanningConfiguration; | |||
import org.apache.archiva.configuration.model.UserInterfaceOptions; | |||
import org.apache.archiva.configuration.model.WebappConfiguration; | |||
import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; | |||
import org.apache.commons.io.FileUtils; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.junit.Test; | |||
import org.junit.runner.RunWith; | |||
import org.mockito.Mockito; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.context.ApplicationContext; |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,6 +18,10 @@ package org.apache.archiva.configuration; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; | |||
import org.junit.Test; | |||
import org.junit.runner.RunWith; |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,6 +18,7 @@ package org.apache.archiva.configuration; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.model.LegacyArtifactPath; | |||
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; | |||
import org.junit.Test; | |||
import org.junit.runner.RunWith; |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration; | |||
package org.apache.archiva.configuration.provider; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,6 +18,10 @@ package org.apache.archiva.configuration; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.model.Configuration; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; | |||
import org.junit.Before; | |||
import org.junit.Test; |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.functors; | |||
package org.apache.archiva.configuration.provider.functors; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration.functors; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,7 +18,8 @@ package org.apache.archiva.configuration.functors; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.functors.ProxyConnectorConfigurationOrderComparator; | |||
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.junit.Test; |
@@ -1,4 +1,4 @@ | |||
package org.apache.archiva.configuration.functors; | |||
package org.apache.archiva.configuration.provider.functors; | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
@@ -9,8 +9,7 @@ package org.apache.archiva.configuration.functors; | |||
* "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 | |||
* | |||
* 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 | |||
@@ -19,8 +18,9 @@ package org.apache.archiva.configuration.functors; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.AbstractRepositoryConfiguration; | |||
import org.apache.archiva.configuration.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.functors.RepositoryConfigurationComparator; | |||
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; | |||
import org.junit.Test; | |||
import org.junit.runner.RunWith; |
@@ -29,17 +29,17 @@ | |||
<context:property-placeholder system-properties-mode="OVERRIDE"/> | |||
<bean name="archivaConfiguration#test-defaults-default-repo-location-exists" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-defaults-default-repo-location-exists" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#empty"/> | |||
</bean> | |||
<bean name="registry#empty" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry"/> | |||
<bean name="archivaConfiguration#test-defaults" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-defaults" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#emptydef"/> | |||
</bean> | |||
<bean name="registry#emptydef" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry"/> | |||
<bean name="archivaConfiguration#test-upgrade-09" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-upgrade-09" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-upgrade-09"/> | |||
</bean> | |||
@@ -58,7 +58,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="archivaConfiguration#test-upgrade-1.3" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-upgrade-1.3" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-upgrade-1.3"/> | |||
</bean> | |||
@@ -75,7 +75,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="archivaConfiguration#test-configuration" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-configuration" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#configured"/> | |||
</bean> | |||
@@ -94,7 +94,7 @@ | |||
</bean> | |||
<bean name="archivaConfiguration#test-autodetect-v1" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-autodetect-v1" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-autodetect-v1"/> | |||
</bean> | |||
@@ -113,7 +113,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="archivaConfiguration#test-archiva-v1" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-archiva-v1" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-archiva-v1"/> | |||
</bean> | |||
@@ -131,7 +131,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="archivaConfiguration#test-save" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-save" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-save"/> | |||
</bean> | |||
@@ -148,7 +148,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="archivaConfiguration#test-save-user-defaults" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-save-user-defaults" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-save-user-defaults"/> | |||
</bean> | |||
@@ -167,7 +167,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="archivaConfiguration#test-save-user-fallback" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-save-user-fallback" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-save-user-fallback"/> | |||
</bean> | |||
@@ -186,7 +186,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="archivaConfiguration#test-save-user" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-save-user" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-save-user"/> | |||
</bean> | |||
@@ -206,7 +206,7 @@ | |||
</bean> | |||
<bean name="archivaConfiguration#test-configuration-both" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-configuration-both" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-configuration-both"/> | |||
</bean> | |||
@@ -226,7 +226,7 @@ | |||
</bean> | |||
<bean name="archivaConfiguration#test-read-saved" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-read-saved" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-read-saved"/> | |||
</bean> | |||
@@ -244,7 +244,7 @@ | |||
</bean> | |||
<bean name="archivaConfiguration#test-cron-expressions" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-cron-expressions" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-cron-expressions"/> | |||
<property name="userConfigFilename" value="${basedir}/target/test/test-file.xml"/> | |||
</bean> | |||
@@ -263,7 +263,7 @@ | |||
</bean> | |||
<bean name="archivaConfiguration#test-remove-central" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-remove-central" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-remove-central"/> | |||
</bean> | |||
@@ -281,7 +281,7 @@ | |||
</bean> | |||
<bean name="archivaConfiguration#test-not-allowed-to-write-to-both" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-not-allowed-to-write-to-both" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-not-allowed-to-write-to-both"/> | |||
<property name="userConfigFilename" value="/../../..//target/*intentionally:invalid*/.m2/archiva-user.xml"/> | |||
<property name="altConfigFilename" value="/../../..//target/*intentionally:invalid*/conf/archiva.xml"/> | |||
@@ -302,7 +302,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="archivaConfiguration#test-not-allowed-to-write-to-user" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#test-not-allowed-to-write-to-user" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#test-not-allowed-to-write-to-user"/> | |||
<property name="userConfigFilename" value="${basedir}/target/*intentionally:invalid*/.m2/archiva-user.xml"/> | |||
<property name="altConfigFilename" value="${basedir}/target/test-appserver-base/conf/archiva.xml"/> |
@@ -25,147 +25,21 @@ | |||
<version>3.0.0-SNAPSHOT</version> | |||
</parent> | |||
<modelVersion>4.0.0</modelVersion> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<artifactId>archiva-configuration</artifactId> | |||
<name>Archiva Base :: Configuration</name> | |||
<version>3.0.0-SNAPSHOT</version> | |||
<packaging>pom</packaging> | |||
<properties> | |||
<site.staging.base>${project.parent.parent.basedir}</site.staging.base> | |||
</properties> | |||
<modules> | |||
<module>archiva-configuration-model</module> | |||
<module>archiva-configuration-provider</module> | |||
</modules> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-common</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-policies</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva.components.registry</groupId> | |||
<artifactId>archiva-components-spring-registry-api</artifactId> | |||
<exclusions> | |||
<exclusion> | |||
<groupId>org.springframework</groupId> | |||
<artifactId>spring-test</artifactId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.springframework</groupId> | |||
<artifactId>spring-context</artifactId> | |||
<exclusions> | |||
<exclusion> | |||
<groupId>commons-logging</groupId> | |||
<artifactId>commons-logging</artifactId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva.components.registry</groupId> | |||
<artifactId>archiva-components-spring-registry-commons</artifactId> | |||
<exclusions> | |||
<exclusion> | |||
<groupId>org.springframework</groupId> | |||
<artifactId>spring-test</artifactId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva.components</groupId> | |||
<artifactId>archiva-components-expression-evaluator</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>jakarta.annotation</groupId> | |||
<artifactId>jakarta.annotation-api</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>jakarta.inject</groupId> | |||
<artifactId>jakarta.inject-api</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.commons</groupId> | |||
<artifactId>commons-configuration2</artifactId> | |||
<scope>runtime</scope> | |||
<exclusions> | |||
<exclusion> | |||
<groupId>commons-logging</groupId> | |||
<artifactId>commons-logging</artifactId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>commons-io</groupId> | |||
<artifactId>commons-io</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.commons</groupId> | |||
<artifactId>commons-lang3</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.commons</groupId> | |||
<artifactId>commons-collections4</artifactId> | |||
</dependency> | |||
<!-- Test scope --> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-test-utils</artifactId> | |||
<version>${project.version}</version> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.springframework</groupId> | |||
<artifactId>spring-test</artifactId> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.logging.log4j</groupId> | |||
<artifactId>log4j-jcl</artifactId> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.mockito</groupId> | |||
<artifactId>mockito-core</artifactId> | |||
<scope>test</scope> | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<artifactId>maven-surefire-plugin</artifactId> | |||
<configuration> | |||
<systemPropertyVariables> | |||
<basedir>${basedir}</basedir> | |||
</systemPropertyVariables> | |||
<trimStackTrace>false</trimStackTrace> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
<pluginManagement> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.apache.rat</groupId> | |||
<artifactId>apache-rat-plugin</artifactId> | |||
<configuration> | |||
<excludes> | |||
<exclude>src/main/resources/org/apache/archiva/configuration/default-archiva.xml</exclude> | |||
<exclude>src/test/conf/maven-proxy-complete.conf</exclude> | |||
<exclude>src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml</exclude> | |||
<exclude>nbactions.xml</exclude> | |||
</excludes> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</pluginManagement> | |||
</build> | |||
</project> |
@@ -336,7 +336,7 @@ | |||
connectors.add( proxyConfig ); | |||
java.util.Collections.sort( connectors, | |||
org.apache.archiva.configuration.functors.ProxyConnectorConfigurationOrderComparator.getInstance() ); | |||
org.apache.archiva.configuration.provider.functors.ProxyConnectorConfigurationOrderComparator.getInstance() ); | |||
} | |||
} | |||
@@ -82,8 +82,8 @@ | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-configuration</artifactId> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<artifactId>archiva-configuration-provider</artifactId> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> |
@@ -21,8 +21,8 @@ package $package; | |||
import org.apache.archiva.components.registry.Registry; | |||
import org.apache.archiva.components.registry.RegistryListener; | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.consumers.AbstractMonitoredConsumer; | |||
import org.apache.archiva.consumers.ConsumerException; | |||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer; |
@@ -19,9 +19,9 @@ package $package; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.configuration.RepositoryGroupConfiguration; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryGroupConfiguration; | |||
import org.apache.archiva.event.EventHandler; | |||
import org.apache.archiva.repository.base.managed.BasicManagedRepository; | |||
import org.apache.archiva.repository.base.remote.BasicRemoteRepository; |
@@ -52,8 +52,8 @@ | |||
<version>${archiva.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-configuration</artifactId> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<artifactId>archiva-configuration-provider</artifactId> | |||
<version>${archiva.version}</version> | |||
</dependency> | |||
<dependency> |
@@ -34,8 +34,8 @@ | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-configuration</artifactId> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<artifactId>archiva-configuration-provider</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> |
@@ -20,8 +20,8 @@ package org.apache.archiva.consumers.core; | |||
*/ | |||
import org.apache.archiva.checksum.*; | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.consumers.AbstractMonitoredConsumer; | |||
import org.apache.archiva.consumers.ConsumerException; | |||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer; |
@@ -19,9 +19,9 @@ package org.apache.archiva.consumers.core; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.ConfigurationNames; | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.model.ConfigurationNames; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.consumers.AbstractMonitoredConsumer; | |||
import org.apache.archiva.consumers.ConsumerException; | |||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer; |
@@ -19,7 +19,7 @@ package org.apache.archiva.consumers.core; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.consumers.AbstractMonitoredConsumer; | |||
import org.apache.archiva.consumers.ConsumerException; | |||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer; |
@@ -19,9 +19,9 @@ package org.apache.archiva.consumers.core.repository; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.ConfigurationNames; | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.model.ConfigurationNames; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.consumers.AbstractMonitoredConsumer; | |||
import org.apache.archiva.consumers.ConsumerException; | |||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer; |
@@ -20,9 +20,9 @@ package org.apache.archiva.consumers.core; | |||
*/ | |||
import org.apache.archiva.common.utils.BaseFile; | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.FileType; | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.model.FileType; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer; | |||
import org.apache.archiva.consumers.functors.ConsumerWantsFilePredicate; | |||
import org.apache.archiva.repository.RepositoryRegistry; |
@@ -18,9 +18,9 @@ package org.apache.archiva.consumers.core.mock.repository; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.configuration.RepositoryGroupConfiguration; | |||
import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; | |||
import org.apache.archiva.configuration.model.RepositoryGroupConfiguration; | |||
import org.apache.archiva.event.EventHandler; | |||
import org.apache.archiva.repository.base.managed.BasicManagedRepository; | |||
import org.apache.archiva.repository.base.remote.BasicRemoteRepository; |
@@ -21,7 +21,7 @@ package org.apache.archiva.consumers.core.repository; | |||
import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; | |||
import org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin; | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.metadata.model.ArtifactMetadata; | |||
import org.apache.archiva.metadata.model.MetadataFacet; | |||
import org.apache.archiva.repository.base.ArchivaRepositoryRegistry; |
@@ -20,9 +20,9 @@ package org.apache.archiva.consumers.core.repository; | |||
*/ | |||
import org.apache.archiva.common.utils.BaseFile; | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.FileType; | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.model.FileType; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer; | |||
import org.apache.archiva.consumers.functors.ConsumerWantsFilePredicate; | |||
import org.apache.archiva.metadata.model.ArtifactMetadata; |
@@ -27,7 +27,7 @@ | |||
http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd" | |||
default-lazy-init="true"> | |||
<bean name="archivaConfiguration#cleanup-released-snapshots" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#cleanup-released-snapshots" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#cleanup-released-snapshots"/> | |||
</bean> | |||
<alias name="archivaConfiguration#cleanup-released-snapshots" alias="archivaConfiguration"/> |
@@ -38,7 +38,7 @@ | |||
<property name="filetypes" ref="filetypes#retention-count"/> | |||
</bean> | |||
<bean name="archivaConfiguration#retention-count" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#retention-count" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#retention-count"/> | |||
</bean> | |||
@@ -62,7 +62,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="filetypes#retention-count" class="org.apache.archiva.configuration.FileTypes"> | |||
<bean name="filetypes#retention-count" class="org.apache.archiva.configuration.provider.FileTypes"> | |||
<property name="archivaConfiguration" ref="archivaConfiguration#retention-count"/> | |||
</bean> | |||
@@ -75,7 +75,7 @@ | |||
<property name="filetypes" ref="filetypes#days-old"/> | |||
</bean> | |||
<bean name="archivaConfiguration#days-old" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> | |||
<bean name="archivaConfiguration#days-old" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> | |||
<property name="registry" ref="registry#days-old"/> | |||
</bean> | |||
@@ -96,7 +96,7 @@ | |||
</property> | |||
</bean> | |||
<bean name="filetypes#days-old" class="org.apache.archiva.configuration.FileTypes"> | |||
<bean name="filetypes#days-old" class="org.apache.archiva.configuration.provider.FileTypes"> | |||
<property name="archivaConfiguration" ref="archivaConfiguration#days-old"/> | |||
</bean> | |||
@@ -34,8 +34,8 @@ | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-configuration</artifactId> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<artifactId>archiva-configuration-provider</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> |
@@ -20,9 +20,9 @@ package org.apache.archiva.consumers.lucene; | |||
*/ | |||
import org.apache.archiva.common.utils.PathUtil; | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.ConfigurationNames; | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.model.ConfigurationNames; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.consumers.AbstractMonitoredConsumer; | |||
import org.apache.archiva.consumers.ConsumerException; | |||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer; |
@@ -22,8 +22,8 @@ package org.apache.archiva.consumers.lucene; | |||
import junit.framework.TestCase; | |||
import org.apache.archiva.common.utils.PathUtil; | |||
import org.apache.archiva.components.taskqueue.TaskQueueException; | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.repository.ReleaseScheme; | |||
import org.apache.archiva.repository.base.ArchivaRepositoryRegistry; | |||
import org.apache.archiva.repository.base.RepositoryHandlerDependencies; |
@@ -38,8 +38,8 @@ | |||
<artifactId>archiva-consumer-api</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-configuration</artifactId> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<artifactId>archiva-configuration-provider</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> |
@@ -20,9 +20,9 @@ package org.apache.archiva.consumers.metadata; | |||
*/ | |||
import org.apache.archiva.common.utils.VersionUtil; | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.ConfigurationNames; | |||
import org.apache.archiva.configuration.FileTypes; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.model.ConfigurationNames; | |||
import org.apache.archiva.configuration.provider.FileTypes; | |||
import org.apache.archiva.consumers.AbstractMonitoredConsumer; | |||
import org.apache.archiva.consumers.ConsumerException; | |||
import org.apache.archiva.consumers.KnownRepositoryContentConsumer; |
@@ -34,8 +34,8 @@ | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> | |||
<artifactId>archiva-configuration</artifactId> | |||
<groupId>org.apache.archiva.configuration</groupId> | |||
<artifactId>archiva-configuration-provider</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.archiva</groupId> |
@@ -18,9 +18,9 @@ package org.apache.archiva.proxy.base; | |||
* under the License. | |||
*/ | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.model.NetworkProxyConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import org.apache.archiva.policies.Policy; | |||
import org.apache.archiva.policies.PolicyOption; | |||
import org.apache.archiva.policies.PolicyUtil; |
@@ -23,9 +23,9 @@ import org.apache.archiva.checksum.ChecksumUtil; | |||
import org.apache.archiva.common.filelock.FileLockManager; | |||
import org.apache.archiva.common.utils.PathUtil; | |||
import org.apache.archiva.components.taskqueue.TaskQueueException; | |||
import org.apache.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.ProxyConnectorRuleConfiguration; | |||
import org.apache.archiva.configuration.provider.ArchivaConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; | |||
import org.apache.archiva.configuration.model.ProxyConnectorRuleConfiguration; | |||
import org.apache.archiva.policies.DownloadErrorPolicy; | |||
import org.apache.archiva.policies.DownloadPolicy; | |||
import org.apache.archiva.policies.Policy; |