aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-10-25 21:16:58 +0000
committerOlivier Lamy <olamy@apache.org>2011-10-25 21:16:58 +0000
commit7359332b422c8ad4bbc8d3255531e582375ce3a9 (patch)
tree338221da6e2df0bb23da88c7b2a63228cdaf2813 /archiva-modules
parent930e9268a0cf4249f4574a7f025cf67cac39d32f (diff)
downloadarchiva-7359332b422c8ad4bbc8d3255531e582375ce3a9.tar.gz
archiva-7359332b422c8ad4bbc8d3255531e582375ce3a9.zip
[MRM-1538] Managed Repositories > Show Snippet ought to include a pluginRepositories section.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1188916 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/CopyPasteSnippetTag.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/CopyPasteSnippetTag.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/CopyPasteSnippetTag.java
index 6f2467359..ba2afa9dc 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/CopyPasteSnippetTag.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/tags/CopyPasteSnippetTag.java
@@ -171,6 +171,30 @@ public class CopyPasteSnippetTag
snippet.append( " </snapshots>\n" );
snippet.append( " </repository>\n" );
snippet.append( " </repositories>\n" );
+ snippet.append( " <pluginRepositories>\n" );
+ snippet.append( " <pluginRepository>\n" );
+ snippet.append( " <id>" ).append( repo.getId() ).append( "</id>\n" );
+ snippet.append( " <name>" ).append( repo.getName() ).append( "</name>\n" );
+
+ snippet.append( " <url>" );
+ snippet.append( ContextUtils.getBaseURL( pageContext, "repository" ) );
+ snippet.append( "/" ).append( repo.getId() ).append( "/" );
+
+ snippet.append( "</url>\n" );
+
+ if ( !"default".equals( repo.getLayout() ) )
+ {
+ snippet.append( " <layout>" ).append( repo.getLayout() ).append( "</layout>\n" );
+ }
+
+ snippet.append( " <releases>\n" );
+ snippet.append( " <enabled>" ).append( Boolean.valueOf( repo.isReleases() ) ).append( "</enabled>\n" );
+ snippet.append( " </releases>\n" );
+ snippet.append( " <snapshots>\n" );
+ snippet.append( " <enabled>" ).append( Boolean.valueOf( repo.isSnapshots() ) ).append( "</enabled>\n" );
+ snippet.append( " </snapshots>\n" );
+ snippet.append( " </pluginRepository>\n" );
+ snippet.append( " </pluginRepositories>\n" );
snippet.append( " ...\n" );
snippet.append( "</project>\n" );