diff options
Diffstat (limited to 'archiva-modules/archiva-base/archiva-common')
-rw-r--r-- | archiva-modules/archiva-base/archiva-common/pom.xml | 4 | ||||
-rw-r--r-- | archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/ArchivaNexusIndexerUtil.java | 41 |
2 files changed, 45 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-common/pom.xml b/archiva-modules/archiva-base/archiva-common/pom.xml index 995be9b2f..45d0dacf3 100644 --- a/archiva-modules/archiva-base/archiva-common/pom.xml +++ b/archiva-modules/archiva-base/archiva-common/pom.xml @@ -66,6 +66,10 @@ <version>1.6.1</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.sonatype.nexus</groupId> + <artifactId>nexus-indexer</artifactId> + </dependency> </dependencies> <build> <plugins> diff --git a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/ArchivaNexusIndexerUtil.java b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/ArchivaNexusIndexerUtil.java new file mode 100644 index 000000000..ebac81159 --- /dev/null +++ b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/ArchivaNexusIndexerUtil.java @@ -0,0 +1,41 @@ +package org.apache.maven.archiva.common.utils; + +/* + * 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. + */ + +import java.util.Arrays; +import java.util.List; + +import org.sonatype.nexus.index.context.IndexCreator; +import org.sonatype.nexus.index.creator.JarFileContentsIndexCreator; +import org.sonatype.nexus.index.creator.MavenPluginArtifactInfoIndexCreator; +import org.sonatype.nexus.index.creator.MinimalArtifactInfoIndexCreator; + +/** + * ArchivaNexusIndexerUtil + * + */ +public class ArchivaNexusIndexerUtil +{ + public static final List<? extends IndexCreator> FULL_INDEX = Arrays.<IndexCreator>asList( + new MinimalArtifactInfoIndexCreator(), + new JarFileContentsIndexCreator(), + new MavenPluginArtifactInfoIndexCreator() ); + +} |