From 947857a170cd290cdea331187cf9d071238a8ae0 Mon Sep 17 00:00:00 2001 From: ltheussl Date: Tue, 14 Feb 2006 00:37:37 +0000 Subject: [PATCH] PR: MPXDOC-191 Include dependencies' scope in dependencies page. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@377551 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/org/apache/maven/DescribedDependency.java | 8 ++++++++ xdoc/src/plugin-resources/templates/dependencies.xml | 11 +++++++++++ .../plugin-resources/templates/templates.properties | 1 + .../templates/templates_de.properties | 1 + .../templates/templates_fr.properties | 1 + xdoc/xdocs/changes.xml | 1 + xdoc/xdocs/properties.xml | 7 +++++-- 7 files changed, 28 insertions(+), 2 deletions(-) diff --git a/xdoc/src/main/org/apache/maven/DescribedDependency.java b/xdoc/src/main/org/apache/maven/DescribedDependency.java index 6acdd854..7b919881 100644 --- a/xdoc/src/main/org/apache/maven/DescribedDependency.java +++ b/xdoc/src/main/org/apache/maven/DescribedDependency.java @@ -229,4 +229,12 @@ public class DescribedDependency implements Comparable public String getComment() { return dependency.getProperty("comment"); } + + /** + * Delegate method from Dependency.getProperty("scope") + */ + public String getScope() + { + return dependency.getProperty("scope"); + } } diff --git a/xdoc/src/plugin-resources/templates/dependencies.xml b/xdoc/src/plugin-resources/templates/dependencies.xml index 84c7cedf..650fed57 100644 --- a/xdoc/src/plugin-resources/templates/dependencies.xml +++ b/xdoc/src/plugin-resources/templates/dependencies.xml @@ -56,6 +56,12 @@ + + + + + @@ -72,6 +78,11 @@ ${dep.ArtifactId} ${dep.Type} ${dep.Version} + + #if (${dep.scope}) + ${dep.scope} + #end + #if ($dep.Url) ${dep.Url} diff --git a/xdoc/src/plugin-resources/templates/templates.properties b/xdoc/src/plugin-resources/templates/templates.properties index 389d2281..6210a1a7 100644 --- a/xdoc/src/plugin-resources/templates/templates.properties +++ b/xdoc/src/plugin-resources/templates/templates.properties @@ -72,6 +72,7 @@ template.dependencies.section.dependencies=The following is a list of dependenci template.dependencies.section.artifactID=Artifact ID template.dependencies.section.type=Type template.dependencies.section.version=Version +template.dependencies.section.scope=Scope template.dependencies.section.url=URL template.dependencies.section.comment=Comment diff --git a/xdoc/src/plugin-resources/templates/templates_de.properties b/xdoc/src/plugin-resources/templates/templates_de.properties index 8c2ab51e..1bd91ddb 100644 --- a/xdoc/src/plugin-resources/templates/templates_de.properties +++ b/xdoc/src/plugin-resources/templates/templates_de.properties @@ -73,6 +73,7 @@ template.dependencies.section.dependencies = Im Folgenden finden Sie eine Liste template.dependencies.section.artifactID = Artifact ID template.dependencies.section.type = Typ template.dependencies.section.version = Version +template.dependencies.section.scope=Scope template.dependencies.section.url = URL template.dependencies.section.comment=Kommentar diff --git a/xdoc/src/plugin-resources/templates/templates_fr.properties b/xdoc/src/plugin-resources/templates/templates_fr.properties index 45b96029..e4e8092c 100644 --- a/xdoc/src/plugin-resources/templates/templates_fr.properties +++ b/xdoc/src/plugin-resources/templates/templates_fr.properties @@ -73,6 +73,7 @@ template.dependencies.section.dependencies=Ce qui suit est une liste des d template.dependencies.section.artifactID=Artefact ID template.dependencies.section.type=Type template.dependencies.section.version=Version +template.dependencies.section.scope=Scope template.dependencies.section.url=URL template.dependencies.section.comment=Commentaire diff --git a/xdoc/xdocs/changes.xml b/xdoc/xdocs/changes.xml index f70afc69..f2010d43 100644 --- a/xdoc/xdocs/changes.xml +++ b/xdoc/xdocs/changes.xml @@ -27,6 +27,7 @@ + Include dependencies' scope in dependencies page. Include the new theme maven-stylus.css. Document the use of pom settings by the xdoc plugin. CVS usage page is blank when using Subversion. diff --git a/xdoc/xdocs/properties.xml b/xdoc/xdocs/properties.xml index 558e8d77..ecc35532 100644 --- a/xdoc/xdocs/properties.xml +++ b/xdoc/xdocs/properties.xml @@ -761,8 +761,11 @@ The contents of the <dependency> element are used in the Dependencies page. - Note in particular that the optional comment is generated by a - <comment> element in the <properties> section. + Note in particular that the optional comment and scope entries are generated by + <comment> and <scope> elements in the <properties> section of each dependency. + The scope parameter is not used in Maven 1 but it is + recommended + to specify it in order to make the transition to Maven 2 easier.

The contents of the