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

Commit

Permalink
[maven-release-plugin] copy for tag nexus-1.2.0.3
Browse files Browse the repository at this point in the history
git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/tags/nexus-1.2.0.3@2941 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
  • Loading branch information
mpowers committed Jan 7, 2009
2 parents 33ce2b1 + 59f8a5d commit 28e90c5
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class OSSApplicationStatusSource

public OSSApplicationStatusSource()
{
systemStatus.setEdition( "OSS" );
systemStatus.setEdition( "Open Source" );
systemStatus.setAppName( "Sonatype Nexus Maven Repository Manager" );
systemStatus.setFormattedAppName( "Sonatype Nexus™" );

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package org.sonatype.nexus.rest;

import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.restlet.Context;
import org.restlet.data.Request;
import org.restlet.data.Response;
import org.restlet.resource.ResourceException;
import org.restlet.resource.Variant;
import org.sonatype.plexus.rest.resource.ManagedPlexusResource;
import org.sonatype.plexus.rest.resource.PathProtectionDescriptor;

/**
* Resource to redirect to the absolute URI to the index.html.
*/
@Component(role=ManagedPlexusResource.class, hint="IndexRedirectingPlexusResource")
public class IndexRedirectingPlexusResource
extends AbstractNexusPlexusResource implements ManagedPlexusResource
{

@Requirement( hint = "indexTemplate" )
private ManagedPlexusResource indexTemplateResource;

@Override
public Object getPayloadInstance()
{
return null;
}

@Override
public PathProtectionDescriptor getResourceProtection()
{
return null;
}

@Override
public String getResourceUri()
{
return "";
}

@Override
public Object get( Context context, Request request, Response response, Variant variant )
throws ResourceException
{
response.redirectPermanent( createRootReference(request, indexTemplateResource.getResourceUri().replaceFirst( "/", "" ) ));

return null;
}



}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.codehaus.plexus.component.annotations.Requirement;
import org.restlet.Application;
import org.restlet.Directory;
import org.restlet.Redirector;
import org.restlet.Router;
import org.sonatype.jsecurity.web.PlexusMutableWebConfiguration;
import org.sonatype.jsecurity.web.PlexusWebConfiguration;
Expand Down Expand Up @@ -80,6 +79,9 @@ public class NexusApplication
@Requirement( hint = "indexTemplate" )
private ManagedPlexusResource indexTemplateResource;

@Requirement( hint = "IndexRedirectingPlexusResource" )
private ManagedPlexusResource indexRedirectingResource;

@Requirement( hint = "content" )
private ManagedPlexusResource contentResource;

Expand Down Expand Up @@ -459,44 +461,44 @@ public XStream doConfigureXstream( XStream xstream )
new AliasingListConverter( ClientPermission.class, "permission" ) );

xstream.omitField( ClientPermission.class, "modelEncoding" );

xstream.omitField( UserToRoleResourceRequest.class, "modelEncoding" );
xstream.omitField( UserToRoleResource.class, "modelEncoding" );
xstream.alias( "user-to-role", UserToRoleResourceRequest.class );

xstream.omitField( PlexusUserResourceResponse.class, "modelEncoding" );
xstream.alias( "plexus-user", PlexusUserResourceResponse.class );
xstream.omitField( PlexusUserResource.class, "modelEncoding" );
xstream.registerLocalConverter( PlexusUserResource.class, "roles", new AliasingListConverter(
PlexusRoleResource.class,
"plexus-role" ) );
"plexus-role" ) );

xstream.omitField( PlexusRoleResource.class, "modelEncoding" );
xstream.alias( "plexus-role", PlexusRoleResource.class );

xstream.omitField( PlexusUserListResourceResponse.class, "modelEncoding" );
xstream.alias( "plexus-user-list", PlexusUserListResourceResponse.class );
xstream.registerLocalConverter( PlexusUserListResourceResponse.class, "data", new AliasingListConverter(
PlexusUserResource.class,
"plexus-user" ) );
"plexus-user" ) );

xstream.omitField( ExternalRoleMappingResourceResponse.class, "modelEncoding" );
xstream.alias( "external-role-mapping", ExternalRoleMappingResourceResponse.class );
xstream.registerLocalConverter( ExternalRoleMappingResourceResponse.class, "data", new AliasingListConverter(
ExternalRoleMappingResource.class,
"mapping" ) );
"mapping" ) );
xstream.omitField( ExternalRoleMappingResource.class, "modelEncoding" );
xstream.alias( "mapping", ExternalRoleMappingResource.class );
xstream.alias( "mapping", ExternalRoleMappingResource.class );
xstream.registerLocalConverter( ExternalRoleMappingResource.class, "mappedRoles", new AliasingListConverter(
PlexusRoleResource.class,
"plexus-role" ) );
"plexus-role" ) );

xstream.omitField( PlexusRoleListResourceResponse.class, "modelEncoding" );
xstream.alias( "plexus-roles", PlexusRoleListResourceResponse.class );
xstream.registerLocalConverter( PlexusRoleListResourceResponse.class, "data", new AliasingListConverter(
PlexusRoleResource.class,
"plexus-role" ) );
"plexus-role" ) );

// Maven model
xstream.omitField( Model.class, "modelEncoding" );
xstream.omitField( ModelBase.class, "modelEncoding" );
Expand Down Expand Up @@ -542,13 +544,9 @@ protected void doCreateRoot( Router root, boolean isStarted )

// ==========
// INDEX.HTML and WAR contents
// redirector, to redirect "uncaught" requests to indexTemplateResource
Redirector redirector = new Redirector(
getContext(),
"{op}" + indexTemplateResource.getResourceUri(),
Redirector.MODE_CLIENT_PERMANENT );
attach( root, true, "", redirector );
attach( root, true, "/", redirector );
// To redirect "uncaught" requests to indexTemplateResource
attach( root, true, "", new PlexusResourceFinder( getContext(), indexRedirectingResource ) );
attach( root, true, "/", new PlexusResourceFinder( getContext(), indexRedirectingResource ) );

// the indexTemplateResource
attach( root, true, indexTemplateResource );
Expand Down
2 changes: 1 addition & 1 deletion nexus-test-harness/nexus-simple-memory-realm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-test-harness</artifactId>
<version>1.2.0.3-SNAPSHOT</version>
<version>1.2.0.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nexus-simple-memory-realm</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion nexus-test-harness/nexus-test-harness-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-test-harness</artifactId>
<version>1.2.0.3-SNAPSHOT</version>
<version>1.2.0.4-SNAPSHOT</version>
</parent>

<artifactId>nexus-test-harness-base</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion nexus-test-harness/nexus-test-harness-launcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-test-harness-parent</artifactId>
<version>1.2.0.3-SNAPSHOT</version>
<version>1.2.0.4-SNAPSHOT</version>
<relativePath>../nexus-test-harness-parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion nexus-test-harness/nexus-test-harness-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-test-harness</artifactId>
<version>1.2.0.3-SNAPSHOT</version>
<version>1.2.0.4-SNAPSHOT</version>
</parent>

<artifactId>nexus-test-harness-parent</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion nexus-test-harness/nexus-test-harness-selenium/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus-test-harness</artifactId>
<version>1.2.0.3-SNAPSHOT</version>
<version>1.2.0.4-SNAPSHOT</version>
</parent>
<artifactId>nexus-test-harness-selenium</artifactId>
<name>Nexus Test Harness selenium</name>
Expand Down
2 changes: 1 addition & 1 deletion nexus-test-harness/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonatype.nexus</groupId>
<artifactId>nexus</artifactId>
<version>1.2.0.3-SNAPSHOT</version>
<version>1.2.0.4-SNAPSHOT</version>
</parent>

<artifactId>nexus-test-harness</artifactId>
Expand Down
55 changes: 35 additions & 20 deletions nexus-webapp/src/main/webapp/js/repoServer/repoServer.helpAbout.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,45 @@
* You should have received a copy of the GNU General Public License
* Version 3 along with this program. If not, see http://www.gnu.org/licenses/.
*/
Sonatype.repoServer.HelpAboutPanel = function(config){
Sonatype.repoServer.HelpAboutPanel = function(config) {
var config = config || {};
var defaultConfig = {};
Ext.apply(this, config, defaultConfig);

Sonatype.repoServer.HelpAboutPanel.superclass.constructor.call(this, {
layout: 'border',
autoScroll: false,
width: '100%',
height: '100%',
items: [
{
xtype: 'panel',
region: 'center',
layout: 'fit',
html: '<div class="little-padding">' +
'Sonatype Nexus&trade; ' + Sonatype.utils.edition + ' Edition - ' + Sonatype.utils.version +
'<br>Copyright&copy; 2008 Sonatype, Inc. All rights reserved.' +
'<br>Includes the third-party code listed at <a href="http://www.sonatype.com">www.sonatype.com</a>' +
'</div>'
}
]
});

Sonatype.repoServer.HelpAboutPanel.superclass.constructor
.call(
this,
{
layout :'border',
autoScroll :false,
width :'100%',
height :'100%',
items : [
{
xtype :'panel',
region :'center',
layout :'fit',
html : this.getHelpText()
}
]
});
};

Ext.extend(Sonatype.repoServer.HelpAboutPanel, Ext.Panel, {
getHelpText : function() {
return '<div class="little-padding">'
+ 'Sonatype Nexus&trade; '
+ Sonatype.utils.edition
+ ' Version'
+ '<br>Copyright&copy; 2008 Sonatype, Inc. All rights reserved.'
+ '<br>Includes the third-party code listed at <a href="http://nexus.sonatype.org/dev/attributions.html" target="_new">http://nexus.sonatype.org/dev/attributions.html</a>'
+ '<br><br>This program is licensed to you under Version 3 only of the GNU General Public License as published by the Free Software Foundation.'
+ '<br>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License Version 3 for more details.'
+ '<br><br>You should have received a copy of the GNU General Public License Version 3 along with this program. If not, see <a href="http://www.gnu.org/licenses/" target="_new">http://www.gnu.org/licenses/</a>'
+ '<br>Sonatype Nexus&trade; '
+ Sonatype.utils.edition
+ ' Version is available from Sonatype, Inc.'
+ '<br>&quot;Sonatype&quot; and &quot;Sonatype Nexus&quot; are trademarks of Sonatype, Inc.'
+ '</div>'
}
});
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<plexus-jsecurity-realms.version>1.0.5</plexus-jsecurity-realms.version>
<slf4j.version>1.5.5</slf4j.version>
<maven.version>2.1-SONATYPE-653485</maven.version>
<nexus.indexer.version>1.1.2.3</nexus.indexer.version>
<nexus.indexer.version>1.1.2.4</nexus.indexer.version>
<!-- Shared with nexus-client, hence it is properties'ed -->
<plexus.restlet.bridge.version>1.6.1</plexus.restlet.bridge.version>
<micromailer.version>1.0.2</micromailer.version>
Expand Down

0 comments on commit 28e90c5

Please sign in to comment.