Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
OPEN - issue NXCM-2124: Bundle Enunciate
Browse files Browse the repository at this point in the history
https://issues.sonatype.org/browse/NXCM-2124

git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/trunk@6630 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
  • Loading branch information
velo committed Jun 14, 2010
1 parent 3b66139 commit dbfd106
Show file tree
Hide file tree
Showing 23 changed files with 273 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public abstract class AbstractDocumentationNexusResourceBundle
mediaTypes.put( "jar", "application/zip" );
mediaTypes.put( "zip", "application/zip" );
mediaTypes.put( "txt", "text/plain" );
mediaTypes.put( "css", "text/css" );
mediaTypes.put( "js", "text/javascript" );
MEDIA_TYPES = Collections.unmodifiableMap( mediaTypes );
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
23 changes: 23 additions & 0 deletions nexus/nexus-core-plugins/nexus-core-documentation-plugin/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>nexus-core-documentation-plugin</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Mon Jun 14 09:49:05 BRT 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Mon Jun 14 09:49:04 BRT 2010
activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources resources\:testResources
skipCompilerPlugin=true
version=1
47 changes: 47 additions & 0 deletions nexus/nexus-core-plugins/nexus-core-documentation-plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sonatype.nexus.plugins</groupId>
<artifactId>nexus-core-plugins</artifactId>
<version>1.7.1-SNAPSHOT</version>
</parent>

<artifactId>nexus-core-documentation-plugin</artifactId>
<packaging>nexus-plugin</packaging>
<name>Nexus Core Plugin :: Core Documentation</name>
<description>Plugin only used to expose nexus core documentation</description>
<url>http://nexus.sonatype.org/</url>

<dependencies>
<dependency>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-rest-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>app-lifecycle-maven-plugin</artifactId>
<version>1.1</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>org.sonatype.plugins</groupId>
<artifactId>app-lifecycle-nexus</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package org.sonatype.nexus.plugin.coredocumentation;

import java.io.IOException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.zip.ZipFile;

import org.codehaus.plexus.component.annotations.Component;
import org.sonatype.nexus.plugins.rest.AbstractDocumentationNexusResourceBundle;
import org.sonatype.nexus.plugins.rest.NexusResourceBundle;
import org.sonatype.nexus.rest.NexusApplication;

@Component( role = NexusResourceBundle.class, hint = "CoreDocumentationResourceBundle" )
public class CoreDocumentationResourceBundle
extends AbstractDocumentationNexusResourceBundle
{

@Override
protected String getPluginId()
{
return "nexus-core-documentation-plugin";
}

@Override
protected ZipFile getZipFile()
throws IOException
{
URL baseClass = NexusApplication.class.getClassLoader().getResource( NexusApplication.class.getName().replace( '.', '/' ) + ".class" );
assert baseClass.getProtocol().equals( "jar" );

String jarPath = baseClass.getPath().substring( 6, baseClass.getPath().indexOf( "!" ) );
return new ZipFile( URLDecoder.decode( jarPath, "UTF-8" ) );
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<modelVersion>1.0.0</modelVersion>
<groupId>org.sonatype.nexus.plugins</groupId>
<artifactId>nexus-core-documentation-plugin</artifactId>
<version>1.7.1-SNAPSHOT</version>
<name>Nexus Core Plugin :: Core Documentation</name>
<description>Plugin only used to expose nexus core documentation</description>
<pluginSite>http://nexus.sonatype.org/</pluginSite>
<applicationId>nexus</applicationId>
<applicationEdition>OSS</applicationEdition>
<applicationMinVersion>1.4.0</applicationMinVersion>
</plugin>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Written on: Mon Jun 14 10:27:10 BRT 2010
#Mon Jun 14 10:27:10 BRT 2010
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Generated by Maven
#Mon Jun 14 10:27:10 BRT 2010
version=1.7.1-SNAPSHOT
groupId=org.sonatype.nexus.plugins
artifactId=nexus-core-documentation-plugin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.sonatype.nexus.security.ldap.realms;

import org.codehaus.plexus.component.annotations.Component;
import org.sonatype.nexus.plugins.rest.AbstractDocumentationNexusResourceBundle;
import org.sonatype.nexus.plugins.rest.NexusResourceBundle;

@Component( role = NexusResourceBundle.class, hint = "LdapDocumentationResourceBundle" )
public class LdapDocumentationResourceBundle
extends AbstractDocumentationNexusResourceBundle
{

@Override
protected String getPluginId()
{
return "nexus-ldap-realm-plugin";
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.sonatype.nexus.plugins.lvo;

import org.codehaus.plexus.component.annotations.Component;
import org.sonatype.nexus.plugins.rest.AbstractDocumentationNexusResourceBundle;
import org.sonatype.nexus.plugins.rest.NexusResourceBundle;

@Component( role = NexusResourceBundle.class, hint = "LvoDocumentationResourceBundle" )
public class LvoDocumentationResourceBundle
extends AbstractDocumentationNexusResourceBundle
{

@Override
protected String getPluginId()
{
return "nexus-lvo-plugin";
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.sonatype.nexus.plugins.rrb;

import org.codehaus.plexus.component.annotations.Component;
import org.sonatype.nexus.plugins.rest.AbstractDocumentationNexusResourceBundle;
import org.sonatype.nexus.plugins.rest.NexusResourceBundle;

@Component( role = NexusResourceBundle.class, hint = "RRBDocumentationResourceBundle" )
public class RRBDocumentationResourceBundle
extends AbstractDocumentationNexusResourceBundle
{

@Override
protected String getPluginId()
{
return "nexus-rrb-plugin";
}

}
1 change: 1 addition & 0 deletions nexus/nexus-core-plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<module>nexus-plugin-console-plugin</module>
<module>nexus-ldap-plugin-parent</module>
<module>nexus-rrb-plugin</module>
<module>nexus-core-documentation-plugin</module>
</modules>

</project>
7 changes: 7 additions & 0 deletions nexus/nexus-distributions/nexus-oss-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
<classifier>bundle</classifier>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.sonatype.nexus.plugins</groupId>
<artifactId>nexus-core-documentation-plugin</artifactId>
<version>${project.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.sonatype.nexus</groupId>
<artifactId>guice-nexus-shim</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@
<outputDirectory>${runtimeDir}/runtime/apps/${appName}/plugin-repository
</outputDirectory>
</itar>
<itar>
<groupId>org.sonatype.nexus.plugins</groupId>
<artifactId>nexus-core-documentation-plugin</artifactId>
<version>${project.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<virtual>true</virtual>
<unpack>true</unpack>
<outputDirectory>${runtimeDir}/runtime/apps/${appName}/plugin-repository
</outputDirectory>
</itar>
<itar>
<groupId>org.sonatype.runtime.itars</groupId>
<artifactId>itar-work-dir</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package org.sonatype.nexus.plugin.lucene.ui;

import java.io.IOException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.zip.ZipFile;

import org.codehaus.plexus.component.annotations.Component;
import org.sonatype.nexus.plugins.rest.AbstractDocumentationNexusResourceBundle;
import org.sonatype.nexus.plugins.rest.NexusResourceBundle;
import org.sonatype.nexus.rest.AbstractIndexerNexusPlexusResource;

@Component( role = NexusResourceBundle.class, hint = "IndexerDocumentationResourceBundle" )
public class IndexerDocumentationResourceBundle
extends AbstractDocumentationNexusResourceBundle
{

@Override
protected String getPluginId()
{
return "nexus-indexer-lucene-plugin";
}

@Override
protected ZipFile getZipFile()
throws IOException
{
URL baseClass = AbstractIndexerNexusPlexusResource.class.getClassLoader().getResource( AbstractIndexerNexusPlexusResource.class.getName().replace( '.', '/' ) + ".class" );
assert baseClass.getProtocol().equals( "jar" );

String jarPath = baseClass.getPath().substring( 6, baseClass.getPath().indexOf( "!" ) );
return new ZipFile( URLDecoder.decode( jarPath, "UTF-8" ) );
}
}
17 changes: 17 additions & 0 deletions nexus/nexus-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@
<type>zip</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.sonatype.nexus.plugins</groupId>
<artifactId>nexus-core-documentation-plugin</artifactId>
<version>${project.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.sonatype.nexus.plugins.ldap</groupId>
Expand Down Expand Up @@ -300,6 +309,14 @@
<type>zip</type>
<outputDirectory>target/${plugin-repository.directory}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.sonatype.nexus.plugins</groupId>
<artifactId>nexus-core-documentation-plugin</artifactId>
<version>${project.version}</version>
<classifier>bundle</classifier>
<type>zip</type>
<outputDirectory>target/${plugin-repository.directory}</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.sonatype.nexus.plugins.ldap</groupId>
<artifactId>nexus-ldap-realm-plugin</artifactId>
Expand Down

0 comments on commit dbfd106

Please sign in to comment.