debian/0000755000000000000000000000000012235077547007202 5ustar debian/maven.cleanIgnoreRules0000644000000000000000000000000112233566361013455 0ustar debian/maven.ignoreRules0000644000000000000000000000111212233566361012516 0ustar junit junit * * * * org.apache.maven.archetype archetype-common * * * * org.apache.maven.plugins maven-failsafe-plugin * * * * org.apache.maven.plugins maven-javadoc-plugin * * * * org.apache.maven.plugins maven-shade-plugin * * * * org.apache.maven.plugins maven-surefire-plugin * * * * org.apache.maven.wagon wagon-http-lightweight * * * * org.apache.rat apache-rat-plugin * * * * org.codehaus.mojo animal-sniffer-maven-plugin * * * * org.jmock jmock * * * * org.mortbay.jetty jetty * * * * org.sonatype.plugins port-allocator-maven-plugin * * * * de.schlichtherle.truezip * * * * * debian/maven.publishedRules0000644000000000000000000000036112233566361013217 0ustar org.apache.maven.indexer indexer-artifact jar s/5\..*/5.x/ * * org.apache.maven.indexer indexer-cli jar s/5\..*/5.x/ * * org.apache.maven.indexer indexer-core jar s/5\..*/5.x/ * * org.apache.maven.indexer maven-indexer pom s/5\..*/5.x/ * * debian/README.debian0000644000000000000000000000040512233566361011275 0ustar Maven-Indexer for Debian ------------------------ This package has been slightly simplified from the upstream version through the use of two patches. Truezip is not a supported zip provider in this package, and support for Maven archetypes has been disabled. debian/maven.rules0000644000000000000000000000372412233566361011365 0ustar org.sonatype.sisu sisu-inject-bean bundle 2.3.0 * * org.sonatype.sisu sisu-inject-plexus bundle 2.3.0 * * org.sonatype.sisu sisu-inject pom 2.3.0 * * org.sonatype.sisu sisu-parent pom 2.3.0 * * org.sonatype.sisu.inject containers pom 2.3.0 * * org.sonatype.sisu.inject guice-bean-binders jar 2.3.0 * * org.sonatype.sisu.inject guice-bean-containers jar 2.3.0 * * org.sonatype.sisu.inject guice-bean-converters jar 2.3.0 * * org.sonatype.sisu.inject guice-bean-inject jar 2.3.0 * * org.sonatype.sisu.inject guice-bean-locators jar 2.3.0 * * org.sonatype.sisu.inject guice-bean-reflect jar 2.3.0 * * org.sonatype.sisu.inject guice-bean-scanners jar 2.3.0 * * org.sonatype.sisu.inject guice-bean pom 2.3.0 * * org.sonatype.sisu.inject guice-plexus-binders jar 2.3.0 * * org.sonatype.sisu.inject guice-plexus-converters jar 2.3.0 * * org.sonatype.sisu.inject guice-plexus-lifecycles jar 2.3.0 * * org.sonatype.sisu.inject guice-plexus-locators jar 2.3.0 * * org.sonatype.sisu.inject guice-plexus-metadata jar 2.3.0 * * org.sonatype.sisu.inject guice-plexus-scanners jar 2.3.0 * * org.sonatype.sisu.inject guice-plexus-shim jar 2.3.0 * * org.sonatype.sisu.inject guice-plexus pom 2.3.0 * * org.apache.maven maven-parent pom s/.*/debian/ * * org.apache.maven.indexer indexer-artifact jar s/5\..*/5.x/ * * org.apache.maven.indexer indexer-cli jar s/5\..*/5.x/ * * org.apache.maven.indexer indexer-core jar s/5\..*/5.x/ * * org.apache.maven.indexer maven-indexer pom s/5\..*/5.x/ * * org.apache.maven.wagon wagon-http jar s/.*/debian/ * * org.apache.maven.wagon wagon-provider-api jar s/.*/debian/ * * org.codehaus.plexus plexus-cli jar s/.*/debian/ * * org.codehaus.plexus plexus-component-annotations jar s/.*/1.5.5/ * * org.codehaus.plexus plexus-component-metadata maven-plugin s/.*/1.5.5/ * * org.codehaus.plexus plexus-utils jar s/2\..*/2.x/ * * org.codehaus.plexus plexus-utils jar s/3\..*/2.x/ * * org.sonatype.aether aether-api jar s/.*/debian/ * * org.sonatype.aether aether-util jar s/.*/debian/ * * debian/watch0000644000000000000000000000024212233566361010224 0ustar version=3 opts="uversionmangle=s/-(alpha|beta)-/~$1/" \ http://svn.apache.org/repos/asf/maven/indexer/tags/ \ maven-indexer-(\d.*)/ debian debian/orig-tar.sh debian/rules0000755000000000000000000000044612233566361010261 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/maven.mk JAVA_HOME := /usr/lib/jvm/default-java DEB_MAVEN_DOC_TARGET := javadoc:jar javadoc:aggregate get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename debian/changelog0000644000000000000000000000024112233566361011044 0ustar maven-indexer (5.1.1-1) unstable; urgency=low * Initial release (Closes: #723038) -- Andrew Ross Mon, 28 Oct 2013 22:48:29 +0000 debian/libmaven-indexer-java.poms0000644000000000000000000000357412233566361014256 0ustar # List of POM files for the package # Format of this file is: # [option]* # where option can be: # --ignore: ignore this POM and its artifact if any # --ignore-pom: don't install the POM. To use on POM files that are created # temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] # --no-parent: remove the tag from the POM # --package=: an alternative package to use when installing this POM # and its artifact # --has-package-version: to indicate that the original version of the POM is the same as the upstream part # of the version for the package. # --keep-elements=: a list of XML elements to keep in the POM # during a clean operation with mh_cleanpom or mh_installpom # --artifact=: path to the build artifact associated with this POM, # it will be installed when using the command mh_install. [mh_install] # --java-lib: install the jar into /usr/share/java to comply with Debian # packaging guidelines # --usj-name=: name to use when installing the library in /usr/share/java # --usj-version=: version to use when installing the library in /usr/share/java # --no-usj-versionless: don't install the versionless link in /usr/share/java # --dest-jar=: the destination for the real jar. # It will be installed with mh_install. [mh_install] # --classifier=: Optional, the classifier for the jar. Empty by default. # --site-xml=: Optional, the location for site.xml if it needs to be installed. # Empty by default. [mh_install] # pom.xml --has-package-version indexer-core/pom.xml --has-package-version --java-lib --usj-name=maven-indexer-core indexer-artifact/pom.xml --has-package-version --java-lib --usj-name=maven-indexer-artifact indexer-cli/pom.xml --has-package-version --java-lib --usj-name=maven-indexer-cli debian/patches/0000755000000000000000000000000012233566361010624 5ustar debian/patches/series0000644000000000000000000000007112233566361012037 0ustar classpath.patch disable-truezip.patch no-archetype.patch debian/patches/classpath.patch0000644000000000000000000000201512233566361013625 0ustar Modify the pom.xml for the cli component so that the jar file contains the correct classpath, so that it can easily be run. The upstream version instead ships all the dependencies in the jar, but we've disabled that by disabling the maven-shade plugin in debian/maven.ignoreRules. --- a/indexer-cli/pom.xml +++ b/indexer-cli/pom.xml @@ -112,6 +112,19 @@ + maven-jar-plugin + + + + org.apache.maven.index.cli.NexusIndexerCli + true + repository + /usr/share/maven-repo + + + + + org.apache.maven.plugins maven-shade-plugin 1.7.1 debian/patches/no-archetype.patch0000644000000000000000000001417412233566361014252 0ustar The support for Maven Archetypes is optional at runtime. We disable it to reduce dependencies, although there would be value in including it in future. There is an ITP for the relevent dependency, #721982. --- a/indexer-core/src/main/java/org/apache/maven/index/archetype/AbstractArchetypeDataSource.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.apache.maven.index.archetype; - -/* - * 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.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; - -import org.apache.lucene.search.Query; -import org.apache.maven.archetype.catalog.Archetype; -import org.apache.maven.archetype.catalog.ArchetypeCatalog; -import org.apache.maven.archetype.source.ArchetypeDataSource; -import org.apache.maven.archetype.source.ArchetypeDataSourceException; -import org.apache.maven.index.ArtifactInfo; -import org.apache.maven.index.FlatSearchRequest; -import org.apache.maven.index.FlatSearchResponse; -import org.apache.maven.index.Indexer; -import org.apache.maven.index.MAVEN; -import org.apache.maven.index.context.IndexingContext; -import org.apache.maven.index.expr.SourcedSearchExpression; -import org.codehaus.plexus.component.annotations.Requirement; -import org.codehaus.plexus.logging.AbstractLogEnabled; - -public abstract class AbstractArchetypeDataSource - extends AbstractLogEnabled - implements ArchetypeDataSource -{ - @Requirement - private Indexer indexer; - - public ArchetypeCatalog getArchetypeCatalog( final Properties properties ) - throws ArchetypeDataSourceException - { - final ArchetypeCatalog catalog = new ArchetypeCatalog(); - try - { - final Map repositories = getRepositoryMap(); - final Query pq = indexer.constructQuery( MAVEN.PACKAGING, new SourcedSearchExpression( "maven-archetype" ) ); - final FlatSearchRequest searchRequest = new FlatSearchRequest( pq ); - searchRequest.setContexts( getIndexingContexts() ); - final FlatSearchResponse searchResponse = indexer.searchFlat( searchRequest ); - for ( ArtifactInfo info : searchResponse.getResults() ) - { - Archetype archetype = new Archetype(); - archetype.setGroupId( info.groupId ); - archetype.setArtifactId( info.artifactId ); - archetype.setVersion( info.version ); - archetype.setDescription( info.description ); - archetype.setRepository( repositories.get( info.repository ) ); - catalog.addArchetype( archetype ); - } - } - catch ( Exception ex ) - { - getLogger().error( "Unable to retrieve archetypes", ex ); - } - - return catalog; - } - - private Map getRepositoryMap() - { - // can't cache this because indexes can be changed - Map repositories = new HashMap(); - - for ( IndexingContext context : getIndexingContexts() ) - { - String repositoryUrl = context.getRepositoryUrl(); - if ( repositoryUrl != null ) - { - repositories.put( context.getId(), repositoryUrl ); - } - } - - return repositories; - } - - public void updateCatalog( Properties properties, Archetype archetype ) - { - // TODO maybe update index - } - - // == - - protected abstract List getIndexingContexts(); -} --- a/indexer-core/src/main/java/org/apache/maven/index/archetype/NexusArchetypeDataSource.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.apache.maven.index.archetype; - -/* - * 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.ArrayList; -import java.util.List; - -import org.apache.maven.archetype.source.ArchetypeDataSource; -import org.apache.maven.index.NexusIndexer; -import org.apache.maven.index.context.IndexingContext; -import org.codehaus.plexus.component.annotations.Component; -import org.codehaus.plexus.component.annotations.Requirement; - -/** - * Nexus Archetype Data Source. - * - * @author Eugene Kuleshov - * @deprecated Extend {@link AbstractArchetypeDataSource} instead, and make it suit your case. - */ -@Deprecated -@Component( role = ArchetypeDataSource.class, hint = "nexus" ) -public class NexusArchetypeDataSource - extends AbstractArchetypeDataSource -{ - @Requirement - private NexusIndexer nexusIndexer; - - @Override - protected List getIndexingContexts() - { - return new ArrayList( nexusIndexer.getIndexingContexts().values() ); - } -} debian/patches/disable-truezip.patch0000644000000000000000000000407512233566361014756 0ustar Truezip is optional at run-time, so disable its use entirely and rely on the build in functionality. --- a/indexer-core/src/main/java/org/apache/maven/index/util/zip/ZipFacade.java +++ b/indexer-core/src/main/java/org/apache/maven/index/util/zip/ZipFacade.java @@ -33,7 +33,7 @@ static { - Class clazz; + /*Class clazz; try { @@ -44,7 +44,8 @@ clazz = null; } - TRUEZIP_AVAILABLE = clazz != null; + TRUEZIP_AVAILABLE = clazz != null;*/ + TRUEZIP_AVAILABLE = false; } public static ZipHandle getZipHandle( File targetFile ) @@ -52,14 +53,14 @@ { if ( targetFile.isFile() ) { - if ( TRUEZIP_AVAILABLE && targetFile.length() > JAVA_ZIPFILE_SIZE_THRESHOLD ) + /*if ( TRUEZIP_AVAILABLE && targetFile.length() > JAVA_ZIPFILE_SIZE_THRESHOLD ) { return new TrueZipZipFileHandle( targetFile ); } else - { + {*/ return new JavaZipFileHandle( targetFile ); - } + /*}*/ } throw new IOException( "The targetFile should point to an existing ZIP file!" ); --- a/indexer-core/src/main/java/org/apache/maven/index/util/zip/TrueZipZipFileHandle.java +++ b/indexer-core/src/main/java/org/apache/maven/index/util/zip/TrueZipZipFileHandle.java @@ -26,14 +26,14 @@ import java.util.Enumeration; import java.util.List; -import de.schlichtherle.truezip.zip.ZipEntry; -import de.schlichtherle.truezip.zip.ZipFile; +//import de.schlichtherle.truezip.zip.ZipEntry; +//import de.schlichtherle.truezip.zip.ZipFile; public class TrueZipZipFileHandle - extends AbstractZipHandle - implements ZipHandle +// extends AbstractZipHandle +// implements ZipHandle { - private final ZipFile zipFile; +/* private final ZipFile zipFile; public TrueZipZipFileHandle( final File targetFile ) throws IOException @@ -107,6 +107,6 @@ throws IOException { getZipFile().close(); - } + }*/ } debian/maven.properties0000644000000000000000000000017112233566361012420 0ustar # Include here properties to pass to Maven during the build. # For example: # maven.test.skip=true maven.test.skip=true debian/orig-tar.sh0000755000000000000000000000073012233566361011260 0ustar #!/bin/sh -e VERSION=$2 TAR=../maven-indexer_$VERSION.orig.tar.gz DIR=maven-indexer-$VERSION TAG=$(echo "maven-indexer-$VERSION" | sed -re's/~(alpha|beta)/-\1-/') svn export http://svn.apache.org/repos/asf/maven/indexer/tags/${TAG}/ $DIR GZIP=--best tar -c -z -f $TAR --exclude '*.jar' --exclude '*.class' $DIR rm -rf $DIR ../$TAG # move to directory 'tarballs' if [ -r .svn/deb-layout ]; then . .svn/deb-layout mv $TAR $origDir && echo "moved $TAR to $origDir" fi debian/source/0000755000000000000000000000000012233566361010475 5ustar debian/source/format0000644000000000000000000000001412233566361011703 0ustar 3.0 (quilt) debian/README.source0000644000000000000000000000045112233566361011354 0ustar Information about maven-indexer ------------------------------ This package was debianized using the mh_make command from the maven-debian-helper package. The build system uses Maven but prevents it from downloading anything from the Internet, making the build compliant with the Debian policy. debian/compat0000644000000000000000000000000212233566361010373 0ustar 7 debian/copyright0000644000000000000000000000104112233566361011124 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Maven :: Indexer Upstream-Contact: https://builds.apache.org/job/maven-indexer/ Source: http://maven.apache.org/maven-indexer/ Files: * Copyright: 2002-2013, The Apache Software Foundation License: Apache-2.0 Files: debian/* Copyright: 2013, Andrew Ross License: Apache-2.0 License: Apache-2.0 On Debian GNU/Linux system you can find the complete text of the Apache-2.0 license in '/usr/share/common-licenses/Apache-2.0' debian/control0000644000000000000000000000215712233566361010605 0ustar Source: maven-indexer Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Andrew Ross Build-Depends: debhelper (>= 7), cdbs, default-jdk, maven-debian-helper (>= 1.5) Build-Depends-Indep: libplexus-component-metadata-java, libaether-java, libcommons-cli-java, liblucene3-contrib-java, liblucene3-java, libmaven-parent-java (>= 21), libplexus-cli-java, libplexus-containers1.5-java (>= 1.5.5), libplexus-utils2-java, libsisu-ioc-java (>= 2.2.3), maven2 Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/maven-indexer.git Vcs-Git: git://anonscm.debian.org/pkg-java/maven-indexer.git Homepage: http://maven.apache.org/maven-indexer/ Package: libmaven-indexer-java Architecture: all Depends: ${misc:Depends}, ${maven:Depends} Recommends: ${maven:OptionalDepends} Description: Maven :: Indexer Apache Maven Indexer (former Sonatype Nexus Indexer) is the defacto standard for producing indexes of Maven repositories. The Indexes are produced and consumed by all major tools in the ecosystem.