diff options
author | Martin Schreier <martin_s@apache.org> | 2022-01-09 23:14:44 +0100 |
---|---|---|
committer | Martin Schreier <martin_s@apache.org> | 2022-01-09 23:14:44 +0100 |
commit | a0c5e5a0b0ad6502b0e3c82862bf57287c6a1c15 (patch) | |
tree | 36433dbf2a2147cf3dde4a1714b09268a309d678 /archiva-modules/archiva-base | |
parent | 239669209d0ca6036ec3387b9f20cb8c3da6ff42 (diff) | |
download | archiva-a0c5e5a0b0ad6502b0e3c82862bf57287c6a1c15.tar.gz archiva-a0c5e5a0b0ad6502b0e3c82862bf57287c6a1c15.zip |
Splitting configuration module. Adding mapper interface.
Diffstat (limited to 'archiva-modules/archiva-base')
140 files changed, 910 insertions, 572 deletions
diff --git a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/ModelMapper.java b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/ModelMapper.java new file mode 100644 index 000000000..1f7fda93b --- /dev/null +++ b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/ModelMapper.java @@ -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 ); + +} diff --git a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/ModelMapperFactory.java b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/ModelMapperFactory.java new file mode 100644 index 000000000..30ee0c4c3 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/ModelMapperFactory.java @@ -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; +} diff --git a/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/pom.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/pom.xml new file mode 100644 index 000000000..bd2591722 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/pom.xml @@ -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>
\ No newline at end of file diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/AbstractRepositoryConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/AbstractRepositoryConfiguration.java index 695f0c0c2..36c1f4e6e 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/AbstractRepositoryConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/AbstractRepositoryConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/AbstractRepositoryConnectorConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/AbstractRepositoryConnectorConfiguration.java index 5a7bc587e..aed4995db 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/AbstractRepositoryConnectorConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/AbstractRepositoryConnectorConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ArchivaDefaultConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ArchivaDefaultConfiguration.java index 3917cc8f0..c7a613b8f 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ArchivaDefaultConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ArchivaDefaultConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ArchivaRuntimeConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ArchivaRuntimeConfiguration.java index b05686092..85f20bf11 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ArchivaRuntimeConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ArchivaRuntimeConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/CacheConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/CacheConfiguration.java index 5d765edde..d14a8865a 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/CacheConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/CacheConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/Configuration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/Configuration.java index 1bd3bcef2..890986839 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/Configuration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/Configuration.java @@ -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() ); } } diff --git a/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ConfigurationModel.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ConfigurationModel.java new file mode 100644 index 000000000..6a9520aa7 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ConfigurationModel.java @@ -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 +{ +} diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ConfigurationNames.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ConfigurationNames.java index aaa0a5df9..8a1a03fbd 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ConfigurationNames.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ConfigurationNames.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileLockConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/FileLockConfiguration.java index 259e3b85a..acac6d7a3 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileLockConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/FileLockConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileType.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/FileType.java index d3930c1c1..7f0ec575d 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileType.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/FileType.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/LdapConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/LdapConfiguration.java index 5541c7310..abed037ba 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/LdapConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/LdapConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/LdapGroupMapping.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/LdapGroupMapping.java index 05288c148..c899d4032 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/LdapGroupMapping.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/LdapGroupMapping.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/LegacyArtifactPath.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/LegacyArtifactPath.java index 695245fdc..6c7013395 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/LegacyArtifactPath.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/LegacyArtifactPath.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ManagedRepositoryConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ManagedRepositoryConfiguration.java index a8da04d6d..64c84b9f3 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ManagedRepositoryConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ManagedRepositoryConfiguration.java @@ -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 { //--------------------------/ diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/NetworkConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/NetworkConfiguration.java index a7eacec7e..dd1b2de16 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/NetworkConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/NetworkConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/NetworkProxyConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/NetworkProxyConfiguration.java index 234ef8a75..e18fe059f 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/NetworkProxyConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/NetworkProxyConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/OrganisationInformation.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/OrganisationInformation.java index a7f7fb62f..5e892ae20 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/OrganisationInformation.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/OrganisationInformation.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ProxyConnectorConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ProxyConnectorConfiguration.java index 944c8b670..637808a07 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ProxyConnectorConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ProxyConnectorConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ProxyConnectorRuleConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ProxyConnectorRuleConfiguration.java index 3340e0563..f555d9a45 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ProxyConnectorRuleConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/ProxyConnectorRuleConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RedbackRuntimeConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RedbackRuntimeConfiguration.java index 2c8992926..10a4d7f8c 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RedbackRuntimeConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RedbackRuntimeConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RemoteRepositoryConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RemoteRepositoryConfiguration.java index ca49d315c..37ff862c8 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RemoteRepositoryConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RemoteRepositoryConfiguration.java @@ -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 { //--------------------------/ diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryCheckPath.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RepositoryCheckPath.java index 27f766052..6fcdd0c34 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryCheckPath.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RepositoryCheckPath.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryGroupConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RepositoryGroupConfiguration.java index 877ccaadc..904a931e0 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryGroupConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RepositoryGroupConfiguration.java @@ -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 { //--------------------------/ diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryScanningConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RepositoryScanningConfiguration.java index 976eb345a..02b4d0acd 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryScanningConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/RepositoryScanningConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/SyncConnectorConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/SyncConnectorConfiguration.java index a4f8ff901..f92bcbf94 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/SyncConnectorConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/SyncConnectorConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/UserInterfaceOptions.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/UserInterfaceOptions.java index 8d8476646..df740e7b0 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/UserInterfaceOptions.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/UserInterfaceOptions.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/WebappConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/WebappConfiguration.java index aab3660c6..372cf0085 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/WebappConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/WebappConfiguration.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/FiletypeSelectionPredicate.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/FiletypeSelectionPredicate.java index 2573a5dc7..7bb422ca5 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/FiletypeSelectionPredicate.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/FiletypeSelectionPredicate.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/FiletypeToMapClosure.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/FiletypeToMapClosure.java index ad8ef5c97..5b2f13219 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/FiletypeToMapClosure.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/FiletypeToMapClosure.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/NetworkProxyComparator.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/NetworkProxyComparator.java index d71e32316..ae8f96b77 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/NetworkProxyComparator.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/NetworkProxyComparator.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/NetworkProxySelectionPredicate.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/NetworkProxySelectionPredicate.java index c76cfa221..b3534f2e1 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/NetworkProxySelectionPredicate.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/NetworkProxySelectionPredicate.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparator.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/ProxyConnectorConfigurationOrderComparator.java index 05cad4baf..28d246026 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparator.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/ProxyConnectorConfigurationOrderComparator.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorSelectionPredicate.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/ProxyConnectorSelectionPredicate.java index 2b5641f47..99a723fd6 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorSelectionPredicate.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/ProxyConnectorSelectionPredicate.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/RepositoryConfigurationComparator.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/RepositoryConfigurationComparator.java index 9e2b64e22..0af59d767 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/RepositoryConfigurationComparator.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-model/src/main/java/org/apache/archiva/configuration/model/functors/RepositoryConfigurationComparator.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/pom.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/pom.xml new file mode 100644 index 000000000..5404763e4 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/pom.xml @@ -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>
\ No newline at end of file diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/ArchivaConfiguration.java index cf90a13d3..b71d26bb9 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ArchivaConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/ArchivaConfiguration.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ConfigurationEvent.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/ConfigurationEvent.java index 9639effbe..5ad758c8b 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ConfigurationEvent.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/ConfigurationEvent.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ConfigurationListener.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/ConfigurationListener.java index 2abeb6371..370c61cec 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ConfigurationListener.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/ConfigurationListener.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ConfigurationRuntimeException.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/ConfigurationRuntimeException.java index 2368d201e..abf2b7038 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/ConfigurationRuntimeException.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/ConfigurationRuntimeException.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/DefaultArchivaConfiguration.java index b9db3042e..88efcf90a 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/DefaultArchivaConfiguration.java @@ -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())); } } diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/FileTypes.java index 2415f7119..a08e4bf14 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/FileTypes.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/IndeterminateConfigurationException.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/IndeterminateConfigurationException.java index 04160fab4..39054ced6 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/IndeterminateConfigurationException.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/IndeterminateConfigurationException.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/InvalidConfigurationException.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/InvalidConfigurationException.java index 55f5b3408..f65aa7d1b 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/InvalidConfigurationException.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/InvalidConfigurationException.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/MavenProxyPropertyLoader.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/MavenProxyPropertyLoader.java index 20e3f34cf..7f657f92f 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/MavenProxyPropertyLoader.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/MavenProxyPropertyLoader.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryReader.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/io/registry/ConfigurationRegistryReader.java index 27146f5e6..6a89e1cf7 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryReader.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/io/registry/ConfigurationRegistryReader.java @@ -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() ); diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryWriter.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/io/registry/ConfigurationRegistryWriter.java index 83202f531..253eae897 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryWriter.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/io/registry/ConfigurationRegistryWriter.java @@ -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 ) { diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/util/ConfigMapper.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/util/ConfigMapper.java index f55dbbc66..d03137a95 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/util/ConfigMapper.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/java/org/apache/archiva/configuration/provider/util/ConfigMapper.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/resources/META-INF/spring-context.xml index 3fe1e381d..3fe1e381d 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/resources/META-INF/spring-context.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/resources/org/apache/archiva/configuration/default-archiva.xml index 5f3731dab..5f3731dab 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/main/resources/org/apache/archiva/configuration/default-archiva.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-0.9.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/archiva-0.9.xml index c8032436a..c8032436a 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-0.9.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/archiva-0.9.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-1.3.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/archiva-1.3.xml index 8575ebd12..8575ebd12 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-1.3.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/archiva-1.3.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-v1.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/archiva-v1.xml index 2b05c9251..2b05c9251 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-v1.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/archiva-v1.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/autodetect-v1.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/autodetect-v1.xml index 29f3775bb..29f3775bb 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/autodetect-v1.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/autodetect-v1.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/conf-base.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/conf-base.xml index 84ab085d0..84ab085d0 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/conf-base.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/conf-base.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/conf-single-list-elements.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/conf-single-list-elements.xml index 3e3d4dc97..3e3d4dc97 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/conf-single-list-elements.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/conf-single-list-elements.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/conf-user.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/conf-user.xml index 61c4dadc2..61c4dadc2 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/conf-user.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/conf-user.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/corrupt.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/corrupt.xml index b4469289a..b4469289a 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/corrupt.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/corrupt.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/escape-cron-expressions.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/escape-cron-expressions.xml index 547e8c0b5..547e8c0b5 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/escape-cron-expressions.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/escape-cron-expressions.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/maven-proxy-complete.conf b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/maven-proxy-complete.conf index dd98bba12..dd98bba12 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/maven-proxy-complete.conf +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/maven-proxy-complete.conf diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/repository-manager.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/repository-manager.xml index 8fabacf5b..8fabacf5b 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/repository-manager.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/conf/repository-manager.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/ArchivaConfigurationMRM789Test.java index d7b4c6f0c..606749692 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationMRM789Test.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/ArchivaConfigurationMRM789Test.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/ArchivaConfigurationTest.java index 9a882d3e2..ae2079b19 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ArchivaConfigurationTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/ArchivaConfigurationTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ConfigurationTest.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/ConfigurationTest.java index 2a5e9b447..599bf92e5 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/ConfigurationTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/ConfigurationTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/FileTypesTest.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/FileTypesTest.java index 83874b7a0..38921e3e2 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/FileTypesTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/FileTypesTest.java @@ -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 diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/LegacyArtifactPathTest.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/LegacyArtifactPathTest.java index c36a93b71..38e7dfb60 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/LegacyArtifactPathTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/LegacyArtifactPathTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/MavenProxyPropertyLoaderTest.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/MavenProxyPropertyLoaderTest.java index dfc41e949..892cf322e 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/MavenProxyPropertyLoaderTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/MavenProxyPropertyLoaderTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/functors/ProxyConnectorConfigurationOrderComparatorTest.java index 458014f12..b5873f52b 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/functors/ProxyConnectorConfigurationOrderComparatorTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/RepositoryConfigurationComparatorTest.java b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/functors/RepositoryConfigurationComparatorTest.java index 2dd659c86..0423351ac 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/RepositoryConfigurationComparatorTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/java/org/apache/archiva/configuration/provider/functors/RepositoryConfigurationComparatorTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/resources/log4j2-test.xml index 03547df43..03547df43 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/log4j2-test.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/resources/log4j2-test.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml index dc1215e69..dc1215e69 100755 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/resources/spring-context.xml index 4eb7b5be6..4f63c9839 100755 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-configuration/archiva-configuration-provider/src/test/resources/spring-context.xml @@ -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"/> diff --git a/archiva-modules/archiva-base/archiva-configuration/pom.xml b/archiva-modules/archiva-base/archiva-configuration/pom.xml index 485245199..aff864c2f 100644 --- a/archiva-modules/archiva-base/archiva-configuration/pom.xml +++ b/archiva-modules/archiva-base/archiva-configuration/pom.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> diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo index 746f2c472..b8c5a7104 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo @@ -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() ); } } diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml index a86d0a1fe..42844565e 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml @@ -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> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java index e9f0cc036..c6dab3538 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/RepositoryProviderMock.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/RepositoryProviderMock.java index 10f9f2d45..a77d0ebc4 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/RepositoryProviderMock.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/RepositoryProviderMock.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml index 81a77435a..ac5f5ba2c 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml @@ -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> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml index 3502aa3ee..abad21899 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml @@ -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> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java index 559de35e0..cbb7a2ac4 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java index 89b014a7b..ffa022e40 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java index 5c7985491..4410c5477 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java index 24779a77e..86bf774bf 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/AbstractArtifactConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/AbstractArtifactConsumerTest.java index 8a50d78a4..721f270a4 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/AbstractArtifactConsumerTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/AbstractArtifactConsumerTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/mock/repository/RepositoryProviderMock.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/mock/repository/RepositoryProviderMock.java index a74ae2461..3cb612339 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/mock/repository/RepositoryProviderMock.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/mock/repository/RepositoryProviderMock.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java index 2a60d710c..c3273cf6f 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java index 209d050d3..ba5568ad3 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumerTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml index 95c203340..32eb6357d 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml @@ -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"/> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml index 0657f9551..4b970df9c 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml @@ -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> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/pom.xml index 84c501651..261ddf871 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/pom.xml @@ -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> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java index e03557ebf..e4673205e 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/src/test/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumerTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/src/test/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumerTest.java index cf2768584..d5bcb077f 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/src/test/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumerTest.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-indexer-consumers/src/test/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumerTest.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml index f23955a1c..3c552e672 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml @@ -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> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java index f694d5af4..9234108fc 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml index 2a63d5041..dc3c7da0d 100644 --- a/archiva-modules/archiva-base/archiva-proxy/pom.xml +++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml @@ -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> diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/base/ArchivaProxyRegistry.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/base/ArchivaProxyRegistry.java index a86cb3701..02a2c1bf2 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/base/ArchivaProxyRegistry.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/base/ArchivaProxyRegistry.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/base/DefaultRepositoryProxyHandler.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/base/DefaultRepositoryProxyHandler.java index 44c6c92b0..f0bfe6baa 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/base/DefaultRepositoryProxyHandler.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/base/DefaultRepositoryProxyHandler.java @@ -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; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml index 341d2a3c3..8c231f2c1 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml @@ -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> diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java index f1c947572..d2cbb499a 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/AbstractRepositoryAdmin.java @@ -22,10 +22,10 @@ import org.apache.archiva.admin.model.AuditInformation; import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.RepositoryCommonValidator; import org.apache.archiva.admin.model.beans.AbstractRepository; -import org.apache.archiva.configuration.AbstractRepositoryConfiguration; -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.IndeterminateConfigurationException; +import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.provider.IndeterminateConfigurationException; import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.archiva.components.registry.Registry; import org.apache.archiva.redback.users.User; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/DefaultRepositoryCommonValidator.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/DefaultRepositoryCommonValidator.java index 7375942fe..df739e7a8 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/DefaultRepositoryCommonValidator.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/DefaultRepositoryCommonValidator.java @@ -23,8 +23,8 @@ import org.apache.archiva.admin.model.RepositoryCommonValidator; import org.apache.archiva.admin.model.beans.AbstractRepository; import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; import org.apache.archiva.components.registry.Registry; import org.apache.archiva.components.scheduler.CronExpressionValidator; import org.apache.commons.lang3.StringUtils; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java index dec2caa86..8db4ebe72 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java @@ -23,9 +23,9 @@ import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.admin.ArchivaAdministration; import org.apache.archiva.admin.model.beans.*; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.UserInterfaceOptions; -import org.apache.archiva.configuration.WebappConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.model.UserInterfaceOptions; +import org.apache.archiva.configuration.model.WebappConfiguration; import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; @@ -54,7 +54,7 @@ public class DefaultArchivaAdministration { List<LegacyArtifactPath> legacyArtifactPaths = new ArrayList<>( getArchivaConfiguration().getConfiguration().getLegacyArtifactPaths().size() ); - for ( org.apache.archiva.configuration.LegacyArtifactPath legacyArtifactPath : getArchivaConfiguration().getConfiguration().getLegacyArtifactPaths() ) + for ( org.apache.archiva.configuration.model.LegacyArtifactPath legacyArtifactPath : getArchivaConfiguration().getConfiguration().getLegacyArtifactPaths() ) { legacyArtifactPaths.add( getModelMapper().map( legacyArtifactPath, LegacyArtifactPath.class ) ); @@ -69,7 +69,7 @@ public class DefaultArchivaAdministration Configuration configuration = getArchivaConfiguration().getConfiguration(); configuration.addLegacyArtifactPath( getModelMapper().map( legacyArtifactPath, - org.apache.archiva.configuration.LegacyArtifactPath.class ) ); + org.apache.archiva.configuration.model.LegacyArtifactPath.class ) ); saveConfiguration( configuration ); triggerAuditEvent( "", "", AuditEvent.ADD_LEGACY_PATH, auditInformation ); @@ -80,8 +80,8 @@ public class DefaultArchivaAdministration throws RepositoryAdminException { Configuration configuration = getArchivaConfiguration().getConfiguration(); - org.apache.archiva.configuration.LegacyArtifactPath legacyArtifactPath = - new org.apache.archiva.configuration.LegacyArtifactPath(); + org.apache.archiva.configuration.model.LegacyArtifactPath legacyArtifactPath = + new org.apache.archiva.configuration.model.LegacyArtifactPath(); legacyArtifactPath.setPath( path ); configuration.removeLegacyArtifactPath( legacyArtifactPath ); @@ -97,7 +97,7 @@ public class DefaultArchivaAdministration { Configuration configuration = getArchivaConfiguration().getConfiguration(); - org.apache.archiva.configuration.FileType fileType = getFileTypeById( fileTypeId, configuration ); + org.apache.archiva.configuration.model.FileType fileType = getFileTypeById( fileTypeId, configuration ); if ( fileType == null ) { return; @@ -120,7 +120,7 @@ public class DefaultArchivaAdministration { Configuration configuration = getArchivaConfiguration().getConfiguration(); - org.apache.archiva.configuration.FileType fileType = getFileTypeById( fileTypeId, configuration ); + org.apache.archiva.configuration.model.FileType fileType = getFileTypeById( fileTypeId, configuration ); if ( fileType == null ) { return; @@ -135,7 +135,7 @@ public class DefaultArchivaAdministration public FileType getFileType( String fileTypeId ) throws RepositoryAdminException { - org.apache.archiva.configuration.FileType fileType = + org.apache.archiva.configuration.model.FileType fileType = getFileTypeById( fileTypeId, getArchivaConfiguration().getConfiguration() ); if ( fileType == null ) { @@ -156,7 +156,7 @@ public class DefaultArchivaAdministration } configuration.getRepositoryScanning().addFileType( - getModelMapper().map( fileType, org.apache.archiva.configuration.FileType.class ) ); + getModelMapper().map( fileType, org.apache.archiva.configuration.model.FileType.class ) ); saveConfiguration( configuration ); } @@ -165,7 +165,7 @@ public class DefaultArchivaAdministration throws RepositoryAdminException { Configuration configuration = getArchivaConfiguration().getConfiguration(); - org.apache.archiva.configuration.FileType fileType = new org.apache.archiva.configuration.FileType(); + org.apache.archiva.configuration.model.FileType fileType = new org.apache.archiva.configuration.model.FileType(); fileType.setId( fileTypeId ); configuration.getRepositoryScanning().removeFileType( fileType ); saveConfiguration( configuration ); @@ -253,14 +253,14 @@ public class DefaultArchivaAdministration public List<FileType> getFileTypes() throws RepositoryAdminException { - List<org.apache.archiva.configuration.FileType> configFileTypes = + List<org.apache.archiva.configuration.model.FileType> configFileTypes = getArchivaConfiguration().getConfiguration().getRepositoryScanning().getFileTypes(); if ( configFileTypes == null || configFileTypes.isEmpty() ) { return Collections.emptyList(); } List<FileType> fileTypes = new ArrayList<>( configFileTypes.size() ); - for ( org.apache.archiva.configuration.FileType fileType : configFileTypes ) + for ( org.apache.archiva.configuration.model.FileType fileType : configFileTypes ) { fileTypes.add( getModelMapper().map( fileType, FileType.class ) ); } @@ -287,7 +287,7 @@ public class DefaultArchivaAdministration public OrganisationInformation getOrganisationInformation() throws RepositoryAdminException { - org.apache.archiva.configuration.OrganisationInformation organisationInformation = + org.apache.archiva.configuration.model.OrganisationInformation organisationInformation = getArchivaConfiguration().getConfiguration().getOrganisationInfo(); if ( organisationInformation == null ) { @@ -329,9 +329,9 @@ public class DefaultArchivaAdministration if ( organisationInformation != null ) { organisationInformation.setName( convertName( organisationInformation.getName() )); - org.apache.archiva.configuration.OrganisationInformation organisationInformationModel = + org.apache.archiva.configuration.model.OrganisationInformation organisationInformationModel = getModelMapper( ).map( organisationInformation, - org.apache.archiva.configuration.OrganisationInformation.class ); + org.apache.archiva.configuration.model.OrganisationInformation.class ); configuration.setOrganisationInfo( organisationInformationModel ); } else @@ -382,7 +382,7 @@ public class DefaultArchivaAdministration public NetworkConfiguration getNetworkConfiguration() throws RepositoryAdminException { - org.apache.archiva.configuration.NetworkConfiguration networkConfiguration = + org.apache.archiva.configuration.model.NetworkConfiguration networkConfiguration = getArchivaConfiguration().getConfiguration().getNetworkConfiguration(); if ( networkConfiguration == null ) @@ -404,7 +404,7 @@ public class DefaultArchivaAdministration else { configuration.setNetworkConfiguration( getModelMapper().map( networkConfiguration, - org.apache.archiva.configuration.NetworkConfiguration.class ) ); + org.apache.archiva.configuration.model.NetworkConfiguration.class ) ); } // setupWagon( networkConfiguration ); saveConfiguration( configuration ); @@ -415,9 +415,9 @@ public class DefaultArchivaAdministration // //------------------------- - private org.apache.archiva.configuration.FileType getFileTypeById( String id, Configuration configuration ) + private org.apache.archiva.configuration.model.FileType getFileTypeById( String id, Configuration configuration ) { - for ( org.apache.archiva.configuration.FileType fileType : configuration.getRepositoryScanning().getFileTypes() ) + for ( org.apache.archiva.configuration.model.FileType fileType : configuration.getRepositoryScanning().getFileTypes() ) { if ( StringUtils.equals( id, fileType.getId() ) ) { diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java index a6276a844..f30c849a6 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/group/DefaultRepositoryGroupAdmin.java @@ -27,13 +27,12 @@ import org.apache.archiva.admin.model.beans.RepositoryGroup; import org.apache.archiva.admin.model.group.RepositoryGroupAdmin; import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.RepositoryGroupConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.model.RepositoryGroupConfiguration; import org.apache.archiva.event.Event; import org.apache.archiva.event.EventHandler; import org.apache.archiva.event.EventType; import org.apache.archiva.metadata.model.facets.AuditEvent; -import org.apache.archiva.indexer.merger.MergedRemoteIndexesScheduler; import org.apache.archiva.repository.EditableRepositoryGroup; import org.apache.archiva.repository.RepositoryException; import org.apache.archiva.repository.RepositoryRegistry; @@ -47,11 +46,6 @@ import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; import javax.inject.Inject; -import javax.inject.Named; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap; import java.util.List; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index 7a8a98291..5b6dae25b 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -25,9 +25,9 @@ import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; import org.apache.archiva.components.cache.Cache; import org.apache.archiva.components.taskqueue.TaskQueueException; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.configuration.ProxyConnectorConfiguration; +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.indexer.ArchivaIndexManager; import org.apache.archiva.indexer.IndexManagerFactory; import org.apache.archiva.indexer.IndexUpdateFailedException; @@ -63,7 +63,6 @@ import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.Map; import java.util.stream.Collectors; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/networkproxy/DefaultNetworkProxyAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/networkproxy/DefaultNetworkProxyAdmin.java index b6ccc73ff..7fd43ec3c 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/networkproxy/DefaultNetworkProxyAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/networkproxy/DefaultNetworkProxyAdmin.java @@ -23,8 +23,8 @@ import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.beans.NetworkProxy; import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.NetworkProxyConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.model.NetworkProxyConfiguration; import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.archiva.repository.RemoteRepository; import org.apache.archiva.repository.RepositoryException; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java index 4a8f452ba..e6ec28b42 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnector/DefaultProxyConnectorAdmin.java @@ -24,9 +24,9 @@ import org.apache.archiva.admin.model.beans.ProxyConnector; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorAdmin; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorOrderComparator; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.ProxyConnectorConfiguration; -import org.apache.archiva.configuration.functors.ProxyConnectorSelectionPredicate; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; +import org.apache.archiva.configuration.model.functors.ProxyConnectorSelectionPredicate; import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.archiva.repository.RepositoryRegistry; import org.apache.commons.collections4.IterableUtils; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java index 9dbc37429..b6dd64bcc 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/proxyconnectorrule/DefaultProxyConnectorRuleAdmin.java @@ -25,9 +25,9 @@ import org.apache.archiva.admin.model.beans.ProxyConnectorRule; import org.apache.archiva.proxy.model.ProxyConnectorRuleType; import org.apache.archiva.admin.model.proxyconnectorrule.ProxyConnectorRuleAdmin; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.ProxyConnectorConfiguration; -import org.apache.archiva.configuration.ProxyConnectorRuleConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; +import org.apache.archiva.configuration.model.ProxyConnectorRuleConfiguration; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/remote/DefaultRemoteRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/remote/DefaultRemoteRepositoryAdmin.java index 4a845beea..427f52e27 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/remote/DefaultRemoteRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/remote/DefaultRemoteRepositoryAdmin.java @@ -23,9 +23,9 @@ import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; import org.apache.archiva.common.utils.PathUtil; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.RemoteRepositoryConfiguration; -import org.apache.archiva.configuration.RepositoryCheckPath; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; +import org.apache.archiva.configuration.model.RepositoryCheckPath; import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.archiva.repository.RemoteRepository; import org.apache.archiva.repository.RepositoryCredentials; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultArchivaRuntimeConfigurationAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultArchivaRuntimeConfigurationAdmin.java index b6b1eb41b..2413c7194 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultArchivaRuntimeConfigurationAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultArchivaRuntimeConfigurationAdmin.java @@ -24,9 +24,9 @@ import org.apache.archiva.admin.model.beans.CacheConfiguration; import org.apache.archiva.admin.model.beans.FileLockConfiguration; import org.apache.archiva.admin.model.runtime.ArchivaRuntimeConfigurationAdmin; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.IndeterminateConfigurationException; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.provider.IndeterminateConfigurationException; import org.apache.archiva.components.cache.Cache; import org.apache.archiva.components.registry.RegistryException; import org.springframework.stereotype.Service; @@ -146,7 +146,7 @@ public class DefaultArchivaRuntimeConfigurationAdmin } protected ArchivaRuntimeConfiguration build( - org.apache.archiva.configuration.ArchivaRuntimeConfiguration archivaRuntimeConfiguration ) + org.apache.archiva.configuration.model.ArchivaRuntimeConfiguration archivaRuntimeConfiguration ) { if ( archivaRuntimeConfiguration == null ) { @@ -175,24 +175,24 @@ public class DefaultArchivaRuntimeConfigurationAdmin return res; } - protected org.apache.archiva.configuration.ArchivaRuntimeConfiguration build( + protected org.apache.archiva.configuration.model.ArchivaRuntimeConfiguration build( ArchivaRuntimeConfiguration archivaRuntimeConfiguration ) { if ( archivaRuntimeConfiguration == null ) { - return new org.apache.archiva.configuration.ArchivaRuntimeConfiguration(); + return new org.apache.archiva.configuration.model.ArchivaRuntimeConfiguration(); } - org.apache.archiva.configuration.ArchivaRuntimeConfiguration res = + org.apache.archiva.configuration.model.ArchivaRuntimeConfiguration res = getModelMapper().map( archivaRuntimeConfiguration, - org.apache.archiva.configuration.ArchivaRuntimeConfiguration.class ); + org.apache.archiva.configuration.model.ArchivaRuntimeConfiguration.class ); if ( archivaRuntimeConfiguration.getUrlFailureCacheConfiguration() != null ) { res.setUrlFailureCacheConfiguration( getModelMapper().map( archivaRuntimeConfiguration.getUrlFailureCacheConfiguration(), - org.apache.archiva.configuration.CacheConfiguration.class ) ); + org.apache.archiva.configuration.model.CacheConfiguration.class ) ); } @@ -200,7 +200,7 @@ public class DefaultArchivaRuntimeConfigurationAdmin { res.setFileLockConfiguration( getModelMapper().map( archivaRuntimeConfiguration.getFileLockConfiguration(), - org.apache.archiva.configuration.FileLockConfiguration.class ) ); + org.apache.archiva.configuration.model.FileLockConfiguration.class ) ); } return res; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java index d15990189..9c6afe659 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java @@ -25,15 +25,14 @@ import org.apache.archiva.admin.model.beans.LdapGroupMapping; import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration; import org.apache.archiva.admin.model.runtime.RedbackRuntimeConfigurationAdmin; import org.apache.archiva.admin.repository.AbstractRepositoryAdmin; -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.IndeterminateConfigurationException; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.provider.IndeterminateConfigurationException; import org.apache.archiva.components.cache.Cache; import org.apache.archiva.components.registry.RegistryException; -import org.apache.archiva.configuration.util.ConfigMapper; +import org.apache.archiva.configuration.provider.util.ConfigMapper; import org.apache.archiva.redback.configuration.UserConfiguration; import org.apache.archiva.redback.configuration.UserConfigurationException; -import org.apache.archiva.redback.configuration.UserConfigurationKeys; import org.apache.archiva.redback.users.User; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -349,7 +348,7 @@ public class DefaultRedbackRuntimeConfigurationAdmin public void updateRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration ) throws RepositoryAdminException { - org.apache.archiva.configuration.RedbackRuntimeConfiguration runtimeConfiguration = + org.apache.archiva.configuration.model.RedbackRuntimeConfiguration runtimeConfiguration = build( redbackRuntimeConfiguration ); Configuration configuration = archivaConfiguration.getConfiguration(); configuration.setRedbackRuntimeConfiguration( runtimeConfiguration ); @@ -368,7 +367,7 @@ public class DefaultRedbackRuntimeConfigurationAdmin } private RedbackRuntimeConfiguration build( - org.apache.archiva.configuration.RedbackRuntimeConfiguration runtimeConfiguration ) + org.apache.archiva.configuration.model.RedbackRuntimeConfiguration runtimeConfiguration ) { RedbackRuntimeConfiguration redbackRuntimeConfiguration = getModelMapper().map( runtimeConfiguration, RedbackRuntimeConfiguration.class ); @@ -396,13 +395,13 @@ public class DefaultRedbackRuntimeConfigurationAdmin redbackRuntimeConfiguration.setUsersCacheConfiguration( new CacheConfiguration() ); } - List<org.apache.archiva.configuration.LdapGroupMapping> mappings = runtimeConfiguration.getLdapGroupMappings(); + List<org.apache.archiva.configuration.model.LdapGroupMapping> mappings = runtimeConfiguration.getLdapGroupMappings(); if ( mappings != null && mappings.size() > 0 ) { List<LdapGroupMapping> ldapGroupMappings = new ArrayList<>( mappings.size() ); - for ( org.apache.archiva.configuration.LdapGroupMapping mapping : mappings ) + for ( org.apache.archiva.configuration.model.LdapGroupMapping mapping : mappings ) { ldapGroupMappings.add( new LdapGroupMapping( mapping.getGroup(), mapping.getRoleNames() ) ); } @@ -426,19 +425,19 @@ public class DefaultRedbackRuntimeConfigurationAdmin LDAP_MAPPER.getAllAttributes( ).stream( ).forEach( att -> properties.remove( att ) ); } - private org.apache.archiva.configuration.RedbackRuntimeConfiguration build( + private org.apache.archiva.configuration.model.RedbackRuntimeConfiguration build( RedbackRuntimeConfiguration redbackRuntimeConfiguration ) { - org.apache.archiva.configuration.RedbackRuntimeConfiguration res = + org.apache.archiva.configuration.model.RedbackRuntimeConfiguration res = getModelMapper().map( redbackRuntimeConfiguration, - org.apache.archiva.configuration.RedbackRuntimeConfiguration.class ); + org.apache.archiva.configuration.model.RedbackRuntimeConfiguration.class ); if ( redbackRuntimeConfiguration.getLdapConfiguration() == null ) { redbackRuntimeConfiguration.setLdapConfiguration( new LdapConfiguration() ); } res.setLdapConfiguration( getModelMapper().map( redbackRuntimeConfiguration.getLdapConfiguration(), - org.apache.archiva.configuration.LdapConfiguration.class ) ); + org.apache.archiva.configuration.model.LdapConfiguration.class ) ); if ( redbackRuntimeConfiguration.getUsersCacheConfiguration() == null ) { @@ -446,21 +445,21 @@ public class DefaultRedbackRuntimeConfigurationAdmin } res.setUsersCacheConfiguration( getModelMapper().map( redbackRuntimeConfiguration.getUsersCacheConfiguration(), - org.apache.archiva.configuration.CacheConfiguration.class ) ); + org.apache.archiva.configuration.model.CacheConfiguration.class ) ); List<LdapGroupMapping> ldapGroupMappings = redbackRuntimeConfiguration.getLdapGroupMappings(); if ( ldapGroupMappings != null && ldapGroupMappings.size() > 0 ) { - List<org.apache.archiva.configuration.LdapGroupMapping> mappings = + List<org.apache.archiva.configuration.model.LdapGroupMapping> mappings = new ArrayList<>( ldapGroupMappings.size() ); for ( LdapGroupMapping ldapGroupMapping : ldapGroupMappings ) { - org.apache.archiva.configuration.LdapGroupMapping mapping = - new org.apache.archiva.configuration.LdapGroupMapping(); + org.apache.archiva.configuration.model.LdapGroupMapping mapping = + new org.apache.archiva.configuration.model.LdapGroupMapping(); mapping.setGroup( ldapGroupMapping.getGroup() ); mapping.setRoleNames( new ArrayList<>( ldapGroupMapping.getRoleNames() ) ); mappings.add( mapping ); diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/ArchivaIndexManagerMock.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/ArchivaIndexManagerMock.java index 6fbfa9589..0557fdb7b 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/ArchivaIndexManagerMock.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/ArchivaIndexManagerMock.java @@ -21,7 +21,7 @@ package org.apache.archiva.admin.mock; import org.apache.archiva.common.filelock.DefaultFileLockManager; import org.apache.archiva.common.utils.PathUtil; -import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; import org.apache.archiva.indexer.ArchivaIndexManager; import org.apache.archiva.indexer.ArchivaIndexingContext; import org.apache.archiva.indexer.IndexCreationFailedException; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/AbstractRepositoryAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/AbstractRepositoryAdminTest.java index 2d84e474f..9d7a9661f 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/AbstractRepositoryAdminTest.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/AbstractRepositoryAdminTest.java @@ -27,7 +27,7 @@ import org.apache.archiva.admin.model.managed.ManagedRepositoryAdmin; import org.apache.archiva.admin.model.proxyconnector.ProxyConnectorAdmin; import org.apache.archiva.admin.model.proxyconnectorrule.ProxyConnectorRuleAdmin; import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin; -import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; import org.apache.archiva.redback.role.RoleManager; import org.apache.archiva.redback.users.User; import org.apache.archiva.redback.users.memory.SimpleUser; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java index 2e542d5cc..2378d49e5 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java @@ -21,7 +21,7 @@ package org.apache.archiva.admin.repository.managed; import org.apache.archiva.admin.model.beans.ManagedRepository; import org.apache.archiva.admin.repository.AbstractRepositoryAdminTest; import org.apache.archiva.common.utils.FileUtils; -import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; import org.apache.archiva.metadata.model.facets.AuditEvent; import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.security.common.ArchivaRoleConstants; diff --git a/archiva-modules/archiva-base/archiva-repository-api/pom.xml b/archiva-modules/archiva-base/archiva-repository-api/pom.xml index be94705fe..4ae27d9e3 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-api/pom.xml @@ -52,8 +52,8 @@ <artifactId>archiva-model</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.springframework</groupId> diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContentFactory.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContentFactory.java index 537a043a6..3ea75b266 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContentFactory.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContentFactory.java @@ -19,10 +19,10 @@ package org.apache.archiva.repository; * under the License. */ -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.ConfigurationNames; import org.apache.archiva.components.registry.Registry; import org.apache.archiva.components.registry.RegistryListener; +import org.apache.archiva.configuration.model.ConfigurationNames; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Service; diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryHandler.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryHandler.java index ee7f1e4e1..8ed6c37da 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryHandler.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryHandler.java @@ -17,8 +17,8 @@ package org.apache.archiva.repository; * under the License. */ -import org.apache.archiva.configuration.AbstractRepositoryConfiguration; -import org.apache.archiva.configuration.Configuration; +import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration; +import org.apache.archiva.configuration.model.Configuration; import org.apache.archiva.repository.validation.CheckedResult; import org.apache.archiva.repository.validation.RepositoryChecker; import org.apache.archiva.repository.validation.RepositoryValidator; @@ -141,6 +141,19 @@ public interface RepositoryHandler<R extends Repository, C extends AbstractRepos putWithCheck( C repositoryConfiguration, RepositoryChecker<R, D> checker ) throws RepositoryException; /** + * Adds or updates a repository from the given configuration data. The resulting repository is + * checked by the default repository checker of the handler instance and the result is returned. + * If the checker returns a valid result, the registry is updated and configuration is saved. + * + * @param repositoryConfiguration the repository configuration + * @return the repository and the check result as map of attributes -> list of validation errors + * @throws RepositoryException if the creation or update failed + */ + CheckedResult<R, Map<String, List<ValidationError>>> + putWithCheck( C repositoryConfiguration ) throws RepositoryException; + + + /** * Removes the given repository from the registry and updates references and saves the new configuration. * * @param id The repository identifier diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryHandlerManager.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryHandlerManager.java index d3270d184..f47bb184a 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryHandlerManager.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryHandlerManager.java @@ -17,7 +17,7 @@ package org.apache.archiva.repository; * under the License. */ -import org.apache.archiva.configuration.AbstractRepositoryConfiguration; +import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration; import org.apache.archiva.event.Event; import org.apache.archiva.event.EventHandler; diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryProvider.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryProvider.java index 813acb61d..89005f662 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryProvider.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryProvider.java @@ -19,9 +19,9 @@ package org.apache.archiva.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.event.RepositoryEvent; diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java index 718045e29..1c6123a83 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java @@ -19,11 +19,11 @@ package org.apache.archiva.repository; * under the License. */ -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.configuration.RemoteRepositoryConfiguration; -import org.apache.archiva.configuration.RepositoryGroupConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +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.EventSource; import org.apache.archiva.indexer.ArchivaIndexManager; import org.apache.archiva.indexer.IndexUpdateFailedException; @@ -191,6 +191,16 @@ public interface RepositoryRegistry extends EventSource, RepositoryHandlerManage ManagedRepository putRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration, Configuration configuration ) throws RepositoryException; /** + * Validates the given repository configuration and adds the repository persistent to the registry, if it is valid. + * If the validation was not successful, the repository will not be added or persistet, and it will return the list of validation errors. + * + * @param configuration the managed repository configuration + * @return the managed repository or a list of validation errors + * @throws RepositoryException if there are errors while adding the repository + */ + CheckedResult<ManagedRepository, Map<String, List<ValidationError>>> putRepositoryAndValidate( ManagedRepositoryConfiguration configuration) throws RepositoryException; + + /** * Adds or updates the given repository group. If a repository group with the given id exists already, it is updated * from the data of the given instance. Otherwise a new repository is created and updated by the data of the given instance. * @@ -265,6 +275,19 @@ public interface RepositoryRegistry extends EventSource, RepositoryHandlerManage * Adds or updates the given remote repository. If a remote repository with the given id exists already, it is updated * from the data of the given configuration. Otherwise a new repository is created and updated by the data of the given configuration. * + * The remoteRepositoryConfiguration is validated before adding to the registry and persisting. If the validation fails, + * it is not registered or updated. + * + * @param remoteRepositoryConfiguration the remote repository configuration + * @return the repository instance, that was created or updated + * @throws RepositoryException if an error occurred while creating or updating the instance + */ + CheckedResult<RemoteRepository, Map<String, List<ValidationError>>> putRepositoryAndValidate( RemoteRepositoryConfiguration remoteRepositoryConfiguration ) throws RepositoryException; + + /** + * Adds or updates the given remote repository. If a remote repository with the given id exists already, it is updated + * from the data of the given configuration. Otherwise a new repository is created and updated by the data of the given configuration. + * * This method can be used, if the archiva configuration should not be saved. It will only update the given configuration object. * * @param remoteRepositoryConfiguration the remote repository configuration diff --git a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml index c68e4bce6..b9b6f4558 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml @@ -54,8 +54,8 @@ <artifactId>archiva-repository-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> diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRepositoryHandler.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRepositoryHandler.java index 9e316a7fe..0e17aacd6 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRepositoryHandler.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRepositoryHandler.java @@ -18,9 +18,9 @@ package org.apache.archiva.repository.base; */ import org.apache.archiva.components.registry.RegistryException; -import org.apache.archiva.configuration.AbstractRepositoryConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.IndeterminateConfigurationException; +import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.provider.IndeterminateConfigurationException; import org.apache.archiva.event.Event; import org.apache.archiva.event.EventManager; import org.apache.archiva.event.EventType; @@ -214,7 +214,13 @@ public abstract class AbstractRepositoryHandler<R extends Repository, C extends } - protected abstract C findRepositoryConfiguration(Configuration configuration, String id); + @Override + public CheckedResult<R, Map<String, List<ValidationError>>> putWithCheck( C repositoryConfiguration ) throws RepositoryException + { + return putWithCheck( repositoryConfiguration, getValidator( ) ); + } + + protected abstract C findRepositoryConfiguration( Configuration configuration, String id); protected abstract void removeRepositoryConfiguration(Configuration configuration, C repoConfiguration ); diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/ArchivaRepositoryRegistry.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/ArchivaRepositoryRegistry.java index a2c7dc39f..1d0c32207 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/ArchivaRepositoryRegistry.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/ArchivaRepositoryRegistry.java @@ -20,15 +20,15 @@ package org.apache.archiva.repository.base; */ import org.apache.archiva.components.registry.RegistryException; -import org.apache.archiva.configuration.AbstractRepositoryConfiguration; -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.ConfigurationEvent; -import org.apache.archiva.configuration.ConfigurationListener; -import org.apache.archiva.configuration.IndeterminateConfigurationException; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.configuration.RemoteRepositoryConfiguration; -import org.apache.archiva.configuration.RepositoryGroupConfiguration; +import org.apache.archiva.configuration.model.AbstractRepositoryConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.provider.ConfigurationEvent; +import org.apache.archiva.configuration.provider.ConfigurationListener; +import org.apache.archiva.configuration.provider.IndeterminateConfigurationException; +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.Event; import org.apache.archiva.event.EventHandler; import org.apache.archiva.event.EventManager; @@ -563,6 +563,17 @@ public class ArchivaRepositoryRegistry implements ConfigurationListener, EventHa } } + @Override + public CheckedResult<ManagedRepository, Map<String, List<ValidationError>>> putRepositoryAndValidate( ManagedRepositoryConfiguration configuration ) throws RepositoryException + { + rwLock.writeLock().lock(); + try { + return managedRepositoryHandler.putWithCheck( configuration ); + } finally + { + rwLock.writeLock( ).unlock( ); + } + } /** * Adds a new repository group to the current list, or replaces the repository group definition with @@ -620,7 +631,7 @@ public class ArchivaRepositoryRegistry implements ConfigurationListener, EventHa rwLock.writeLock( ).lock( ); try { - return groupHandler.putWithCheck( repositoryGroupConfiguration, groupHandler.getValidator( ) ); + return groupHandler.putWithCheck( repositoryGroupConfiguration ); } finally { @@ -695,6 +706,18 @@ public class ArchivaRepositoryRegistry implements ConfigurationListener, EventHa } } + @Override + public CheckedResult<RemoteRepository, Map<String, List<ValidationError>>> putRepositoryAndValidate( RemoteRepositoryConfiguration remoteRepositoryConfiguration ) throws RepositoryException + { + rwLock.writeLock().lock(); + try { + return remoteRepositoryHandler.putWithCheck( remoteRepositoryConfiguration ); + } finally + { + rwLock.writeLock().unlock(); + } + } + /** * Adds a new repository or updates the repository with the same id. The given configuration object is updated, but * the configuration is not saved. diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/ConfigurationHandler.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/ConfigurationHandler.java index 9278e022a..b54e385a1 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/ConfigurationHandler.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/ConfigurationHandler.java @@ -18,10 +18,10 @@ package org.apache.archiva.repository.base; */ import org.apache.archiva.components.registry.RegistryException; -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.ConfigurationListener; -import org.apache.archiva.configuration.IndeterminateConfigurationException; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.provider.ConfigurationListener; +import org.apache.archiva.configuration.provider.IndeterminateConfigurationException; import org.springframework.stereotype.Service; import java.util.concurrent.locks.ReentrantReadWriteLock; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/group/RepositoryGroupHandler.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/group/RepositoryGroupHandler.java index 9285de888..547a66659 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/group/RepositoryGroupHandler.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/group/RepositoryGroupHandler.java @@ -18,10 +18,10 @@ package org.apache.archiva.repository.base.group; */ import org.apache.archiva.components.registry.RegistryException; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.IndeterminateConfigurationException; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.configuration.RepositoryGroupConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.provider.IndeterminateConfigurationException; +import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; +import org.apache.archiva.configuration.model.RepositoryGroupConfiguration; import org.apache.archiva.indexer.merger.MergedRemoteIndexesScheduler; import org.apache.archiva.repository.EditableRepository; import org.apache.archiva.repository.EditableRepositoryGroup; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/managed/ManagedRepositoryHandler.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/managed/ManagedRepositoryHandler.java index 0ed99ecc7..bdcbf04d8 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/managed/ManagedRepositoryHandler.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/managed/ManagedRepositoryHandler.java @@ -18,9 +18,9 @@ package org.apache.archiva.repository.base.managed; */ import org.apache.archiva.components.registry.RegistryException; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.IndeterminateConfigurationException; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.provider.IndeterminateConfigurationException; +import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; import org.apache.archiva.indexer.ArchivaIndexManager; import org.apache.archiva.indexer.IndexCreationFailedException; import org.apache.archiva.indexer.IndexManagerFactory; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/remote/RemoteRepositoryHandler.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/remote/RemoteRepositoryHandler.java index ea1f19c91..9d9417f86 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/remote/RemoteRepositoryHandler.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/remote/RemoteRepositoryHandler.java @@ -18,10 +18,10 @@ package org.apache.archiva.repository.base.remote; */ import org.apache.archiva.components.registry.RegistryException; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.IndeterminateConfigurationException; -import org.apache.archiva.configuration.ProxyConnectorConfiguration; -import org.apache.archiva.configuration.RemoteRepositoryConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.provider.IndeterminateConfigurationException; +import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; +import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; import org.apache.archiva.indexer.ArchivaIndexManager; import org.apache.archiva.indexer.IndexCreationFailedException; import org.apache.archiva.indexer.IndexManagerFactory; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java index cb8b6eb4d..2a385ba5d 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java @@ -25,12 +25,12 @@ import org.apache.archiva.common.utils.VersionComparator; import org.apache.archiva.common.utils.VersionUtil; 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.ConfigurationEvent; -import org.apache.archiva.configuration.ConfigurationListener; -import org.apache.archiva.configuration.ConfigurationNames; -import org.apache.archiva.configuration.FileTypes; -import org.apache.archiva.configuration.ProxyConnectorConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.provider.ConfigurationEvent; +import org.apache.archiva.configuration.provider.ConfigurationListener; +import org.apache.archiva.configuration.model.ConfigurationNames; +import org.apache.archiva.configuration.provider.FileTypes; +import org.apache.archiva.configuration.model.ProxyConnectorConfiguration; import org.apache.archiva.model.ArchivaRepositoryMetadata; import org.apache.archiva.model.Plugin; import org.apache.archiva.model.SnapshotVersion; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/ArchivaRepositoryRegistryTest.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/ArchivaRepositoryRegistryTest.java index e4bb05230..d1f58e263 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/ArchivaRepositoryRegistryTest.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/ArchivaRepositoryRegistryTest.java @@ -19,10 +19,10 @@ package org.apache.archiva.repository.base; * under the License. */ -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.configuration.RemoteRepositoryConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; +import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.ReleaseScheme; import org.apache.archiva.repository.RemoteRepository; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/group/RepositoryGroupHandlerTest.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/group/RepositoryGroupHandlerTest.java index ea65a2e0e..fb607e427 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/group/RepositoryGroupHandlerTest.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/group/RepositoryGroupHandlerTest.java @@ -21,11 +21,11 @@ package org.apache.archiva.repository.base.group; import org.apache.archiva.common.filelock.DefaultFileLockManager; import org.apache.archiva.common.filelock.FileLockManager; import org.apache.archiva.common.utils.FileUtils; -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; -import org.apache.archiva.configuration.RemoteRepositoryConfiguration; -import org.apache.archiva.configuration.RepositoryGroupConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +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.indexer.merger.MergedRemoteIndexesScheduler; import org.apache.archiva.repository.EditableRepositoryGroup; import org.apache.archiva.repository.ManagedRepository; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/managed/BasicManagedRepositoryValidatorTest.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/managed/BasicManagedRepositoryValidatorTest.java index 2fe4f671e..a5ed4b5b0 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/managed/BasicManagedRepositoryValidatorTest.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/managed/BasicManagedRepositoryValidatorTest.java @@ -20,7 +20,7 @@ package org.apache.archiva.repository.base.managed; import org.apache.archiva.common.filelock.DefaultFileLockManager; import org.apache.archiva.common.filelock.FileLockManager; -import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; import org.apache.archiva.repository.EditableManagedRepository; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.RepositoryException; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/managed/ManagedRepositoryHandlerTest.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/managed/ManagedRepositoryHandlerTest.java index 8811d4a46..fb6505de7 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/managed/ManagedRepositoryHandlerTest.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/managed/ManagedRepositoryHandlerTest.java @@ -21,11 +21,10 @@ package org.apache.archiva.repository.base.managed; import org.apache.archiva.common.filelock.DefaultFileLockManager; import org.apache.archiva.common.filelock.FileLockManager; import org.apache.archiva.common.utils.FileUtils; -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.ManagedRepositoryConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.model.ManagedRepositoryConfiguration; import org.apache.archiva.indexer.IndexManagerFactory; -import org.apache.archiva.indexer.merger.MergedRemoteIndexesScheduler; import org.apache.archiva.repository.EditableManagedRepository; import org.apache.archiva.repository.ManagedRepository; import org.apache.archiva.repository.Repository; @@ -41,7 +40,6 @@ import org.apache.archiva.repository.validation.RepositoryValidator; import org.apache.archiva.repository.validation.ValidationError; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/remote/RemoteRepositoryHandlerTest.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/remote/RemoteRepositoryHandlerTest.java index f596b8e23..b23c7f92f 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/remote/RemoteRepositoryHandlerTest.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/base/remote/RemoteRepositoryHandlerTest.java @@ -21,9 +21,9 @@ package org.apache.archiva.repository.base.remote; import org.apache.archiva.common.filelock.DefaultFileLockManager; import org.apache.archiva.common.filelock.FileLockManager; import org.apache.archiva.common.utils.FileUtils; -import org.apache.archiva.configuration.ArchivaConfiguration; -import org.apache.archiva.configuration.Configuration; -import org.apache.archiva.configuration.RemoteRepositoryConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; +import org.apache.archiva.configuration.model.Configuration; +import org.apache.archiva.configuration.model.RemoteRepositoryConfiguration; import org.apache.archiva.indexer.IndexManagerFactory; import org.apache.archiva.repository.EditableRemoteRepository; import org.apache.archiva.repository.RemoteRepository; diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java index 5a3a4736d..3a0707367 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java @@ -19,9 +19,9 @@ package org.apache.archiva.repository.mock; * 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.*; import org.apache.archiva.event.Event; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml b/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml index c57a4ba1e..11131f74d 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml @@ -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> diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java index 650162bd5..0fd0c3cac 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java @@ -19,7 +19,7 @@ package org.apache.archiva.repository.scanner; * under the License. */ -import org.apache.archiva.configuration.FileTypes; +import org.apache.archiva.configuration.provider.FileTypes; import org.apache.archiva.consumers.ConsumerException; import org.apache.archiva.consumers.InvalidRepositoryContentConsumer; import org.apache.archiva.consumers.KnownRepositoryContentConsumer; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java index 0795fa557..5457202a2 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java @@ -23,7 +23,7 @@ import org.apache.archiva.admin.model.RepositoryAdminException; import org.apache.archiva.admin.model.admin.ArchivaAdministration; import org.apache.archiva.common.utils.BaseFile; import org.apache.archiva.common.utils.PathUtil; -import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; import org.apache.archiva.consumers.ConsumerException; import org.apache.archiva.consumers.InvalidRepositoryContentConsumer; import org.apache.archiva.consumers.KnownRepositoryContentConsumer; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/ArchivaAdministrationStub.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/ArchivaAdministrationStub.java index d3eadfdfa..ca43b6569 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/ArchivaAdministrationStub.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/ArchivaAdministrationStub.java @@ -26,7 +26,7 @@ import org.apache.archiva.admin.model.beans.LegacyArtifactPath; import org.apache.archiva.admin.model.beans.NetworkConfiguration; import org.apache.archiva.admin.model.beans.OrganisationInformation; import org.apache.archiva.admin.model.beans.UiConfiguration; -import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; import org.springframework.stereotype.Service; import java.util.List; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryContentConsumersTest.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryContentConsumersTest.java index b2bfd5191..40b0e9e77 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryContentConsumersTest.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryContentConsumersTest.java @@ -20,7 +20,7 @@ package org.apache.archiva.repository.scanner; */ import junit.framework.TestCase; -import org.apache.archiva.configuration.ArchivaConfiguration; +import org.apache.archiva.configuration.provider.ArchivaConfiguration; import org.apache.archiva.consumers.InvalidRepositoryContentConsumer; import org.apache.archiva.consumers.KnownRepositoryContentConsumer; import org.apache.archiva.repository.base.managed.BasicManagedRepository; diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml index 219f7144a..a77f925e2 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml @@ -24,7 +24,7 @@ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" default-lazy-init="true"> - <bean name="archivaConfiguration#test-conf" class="org.apache.archiva.configuration.DefaultArchivaConfiguration"> + <bean name="archivaConfiguration#test-conf" class="org.apache.archiva.configuration.provider.DefaultArchivaConfiguration"> <property name="registry" ref="registry#configured"/> </bean> |