From a8e5b3a7b2c058c50ebe36514c5c74445cda8fe8 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Fri, 24 Dec 2021 12:41:05 +0100 Subject: [PATCH] Package refactoring --- .../DefaultIndexUpdateSideEffect.java | 5 ++- .../indexer}/MavenIndexContext.java | 5 ++- .../indexer}/MavenIndexManager.java | 5 ++- .../search/MavenRepositorySearch.java | 9 +++-- .../NoClassifierArtifactInfoFilter.java | 7 ++-- .../{ => maven}/indexer/util/SearchUtil.java | 5 ++- .../resources/META-INF/spring-context.xml | 2 +- .../indexer}/MavenIndexManagerTest.java | 36 +++++++++---------- .../search/AbstractMavenRepositorySearch.java | 36 +++++++++---------- .../search/MavenRepositorySearchOSGITest.java | 5 ++- .../MavenRepositorySearchPaginateTest.java | 8 ++--- .../search/MavenRepositorySearchTest.java | 9 ++--- .../src/test/resources/log4j2-test.xml | 2 +- 13 files changed, 63 insertions(+), 71 deletions(-) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/{indexer/maven => maven/indexer}/DefaultIndexUpdateSideEffect.java (94%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/{indexer/maven => maven/indexer}/MavenIndexContext.java (98%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/{indexer/maven => maven/indexer}/MavenIndexManager.java (99%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/{indexer/maven => maven/indexer}/search/MavenRepositorySearch.java (99%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/{ => maven}/indexer/search/NoClassifierArtifactInfoFilter.java (87%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/{ => maven}/indexer/util/SearchUtil.java (93%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/test/java/org/apache/archiva/{indexer/maven => maven/indexer}/MavenIndexManagerTest.java (91%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/test/java/org/apache/archiva/{indexer/maven => maven/indexer}/search/AbstractMavenRepositorySearch.java (93%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/test/java/org/apache/archiva/{indexer/maven => maven/indexer}/search/MavenRepositorySearchOSGITest.java (97%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/test/java/org/apache/archiva/{indexer/maven => maven/indexer}/search/MavenRepositorySearchPaginateTest.java (94%) rename archiva-modules/archiva-maven/archiva-maven-indexer/src/test/java/org/apache/archiva/{indexer/maven => maven/indexer}/search/MavenRepositorySearchTest.java (99%) diff --git a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/DefaultIndexUpdateSideEffect.java b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/DefaultIndexUpdateSideEffect.java similarity index 94% rename from archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/DefaultIndexUpdateSideEffect.java rename to archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/DefaultIndexUpdateSideEffect.java index cb66cbb53..4a7a6149d 100644 --- a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/DefaultIndexUpdateSideEffect.java +++ b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/DefaultIndexUpdateSideEffect.java @@ -1,4 +1,4 @@ -package org.apache.archiva.indexer.maven; +package org.apache.archiva.maven.indexer; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,8 +9,7 @@ package org.apache.archiva.indexer.maven; * "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-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexContext.java b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/MavenIndexContext.java similarity index 98% rename from archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexContext.java rename to archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/MavenIndexContext.java index 74542b221..8433e10fd 100644 --- a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexContext.java +++ b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/MavenIndexContext.java @@ -1,4 +1,4 @@ -package org.apache.archiva.indexer.maven; +package org.apache.archiva.maven.indexer; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,8 +9,7 @@ package org.apache.archiva.indexer.maven; * "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-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexManager.java b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/MavenIndexManager.java similarity index 99% rename from archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexManager.java rename to archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/MavenIndexManager.java index 234edcd51..35f61c422 100644 --- a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/MavenIndexManager.java +++ b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/MavenIndexManager.java @@ -1,4 +1,4 @@ -package org.apache.archiva.indexer.maven; +package org.apache.archiva.maven.indexer; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,8 +9,7 @@ package org.apache.archiva.indexer.maven; * "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-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearch.java b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/search/MavenRepositorySearch.java similarity index 99% rename from archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearch.java rename to archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/search/MavenRepositorySearch.java index ff594757c..082ad7d16 100644 --- a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/maven/search/MavenRepositorySearch.java +++ b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/search/MavenRepositorySearch.java @@ -1,4 +1,4 @@ -package org.apache.archiva.indexer.maven.search; +package org.apache.archiva.maven.indexer.search; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,8 +9,7 @@ package org.apache.archiva.indexer.maven.search; * "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 @@ -21,14 +20,14 @@ package org.apache.archiva.indexer.maven.search; import org.apache.archiva.indexer.UnsupportedBaseContextException; import org.apache.archiva.indexer.search.ArtifactInfoFilter; -import org.apache.archiva.indexer.search.NoClassifierArtifactInfoFilter; +import org.apache.archiva.maven.indexer.search.NoClassifierArtifactInfoFilter; import org.apache.archiva.indexer.search.RepositorySearch; import org.apache.archiva.indexer.search.RepositorySearchException; import org.apache.archiva.indexer.search.SearchFields; import org.apache.archiva.indexer.search.SearchResultHit; import org.apache.archiva.indexer.search.SearchResultLimits; import org.apache.archiva.indexer.search.SearchResults; -import org.apache.archiva.indexer.util.SearchUtil; +import org.apache.archiva.maven.indexer.util.SearchUtil; import org.apache.archiva.model.ArchivaArtifactModel; import org.apache.archiva.proxy.ProxyRegistry; import org.apache.archiva.proxy.model.ProxyConnector; diff --git a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFilter.java b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/search/NoClassifierArtifactInfoFilter.java similarity index 87% rename from archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFilter.java rename to archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/search/NoClassifierArtifactInfoFilter.java index e783e0e51..16c3d31dd 100644 --- a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/search/NoClassifierArtifactInfoFilter.java +++ b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/search/NoClassifierArtifactInfoFilter.java @@ -1,4 +1,4 @@ -package org.apache.archiva.indexer.search; +package org.apache.archiva.maven.indexer.search; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -8,8 +8,7 @@ package org.apache.archiva.indexer.search; * "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 @@ -18,6 +17,8 @@ package org.apache.archiva.indexer.search; * under the License. */ +import org.apache.archiva.indexer.search.ArtifactInfoFilter; +import org.apache.archiva.indexer.search.SearchResultHit; import org.apache.archiva.model.ArchivaArtifactModel; import org.apache.commons.lang3.StringUtils; diff --git a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/util/SearchUtil.java b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/util/SearchUtil.java similarity index 93% rename from archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/util/SearchUtil.java rename to archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/util/SearchUtil.java index d76427fd4..9f4655c51 100644 --- a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/indexer/util/SearchUtil.java +++ b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/java/org/apache/archiva/maven/indexer/util/SearchUtil.java @@ -1,4 +1,4 @@ -package org.apache.archiva.indexer.util; +package org.apache.archiva.maven.indexer.util; /* * Licensed to the Apache Software Foundation (ASF) under one @@ -9,8 +9,7 @@ package org.apache.archiva.indexer.util; * "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-maven/archiva-maven-indexer/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/resources/META-INF/spring-context.xml index 870a13b56..2049be565 100644 --- a/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-maven/archiva-maven-indexer/src/main/resources/META-INF/spring-context.xml @@ -29,7 +29,7 @@ default-lazy-init="false"> - + --> - + -- 2.39.5