maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject [18/50] git commit: added developer documentation about logging APIs
Date Mon, 18 Mar 2013 21:47:28 GMT
added developer documentation about logging APIs

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1410815 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/b1a90588
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/b1a90588
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/b1a90588

Branch: refs/heads/master
Commit: b1a90588d22154bd8eba1263520a980a87653ae6
Parents: 3c6b12a
Author: Herve Boutemy <hboutemy@apache.org>
Authored: Sun Nov 18 02:23:48 2012 +0000
Committer: Herve Boutemy <hboutemy@apache.org>
Committed: Sun Nov 18 02:23:48 2012 +0000

----------------------------------------------------------------------
 maven-embedder/pom.xml                  |    2 +-
 maven-embedder/src/site/apt/index.apt   |    6 +++-
 maven-embedder/src/site/apt/logging.apt |   39 ++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/b1a90588/maven-embedder/pom.xml
----------------------------------------------------------------------
diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml
index b0cee82..587398f 100644
--- a/maven-embedder/pom.xml
+++ b/maven-embedder/pom.xml
@@ -22,7 +22,7 @@
   <artifactId>maven-embedder</artifactId>
 
   <name>Maven Embedder</name>
-  <description>Maven embeddable component, with CLI support.</description>
+  <description>Maven embeddable component, with CLI and logging support.</description>
 
   <dependencies>
     <dependency>

http://git-wip-us.apache.org/repos/asf/maven/blob/b1a90588/maven-embedder/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/maven-embedder/src/site/apt/index.apt b/maven-embedder/src/site/apt/index.apt
index 4642256..cde7aff 100644
--- a/maven-embedder/src/site/apt/index.apt
+++ b/maven-embedder/src/site/apt/index.apt
@@ -10,4 +10,8 @@ ${project.name}
 
  ${project.description}
 
- See {{{./cli.html}CLI options}} reference.
\ No newline at end of file
+* References
+
+ * {{{./cli.html}CLI options}},
+
+ * {{{./logging.html}logging API}}.

http://git-wip-us.apache.org/repos/asf/maven/blob/b1a90588/maven-embedder/src/site/apt/logging.apt
----------------------------------------------------------------------
diff --git a/maven-embedder/src/site/apt/logging.apt b/maven-embedder/src/site/apt/logging.apt
new file mode 100644
index 0000000..e2830c4
--- /dev/null
+++ b/maven-embedder/src/site/apt/logging.apt
@@ -0,0 +1,39 @@
+ -----
+ Maven Logging
+ -----
+ Hervé Boutemy
+ -----
+ 2012-04-29
+ -----
+
+Maven Logging
+
+ Maven uses
+ {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/package-summary.html}Plexus
+ Container logging API}}, like any other Plexus components, ie 
+ {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/LoggerManager.html}LoggerManager}}
+ / {{{http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/org/codehaus/plexus/logging/Logger.html}Logger}}.
+
+ Starting with Maven 3.1.0, instead of implementing the API itself,
+ Maven maps to {{{http://slf4j.org/apidocs/}SLF4J API}}'s {{{http://slf4j.org/apidocs/org/slf4j/ILoggerFactory.html}ILoggerFactory}}
+ / {{{http://slf4j.org/apidocs/org/slf4j/Logger.html}Logger}} through
+ {{{./apidocs/org/apache/maven/cli/logging/Slf4jLoggerManager.html}Slf4jLoggerManager}}
+ / {{{./apidocs/org/apache/maven/cli/logging/Slf4jLogger.html}Slf4jLogger}}.
+
+* Getting Logger Instance
+
+ Plexus Logger can be injected in Plexus component using Plexus annotations
+
++------
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.component.annotations.Requirement;
+
+@Component( role = MyComponent.class )
+public class DefaultMyComponent
+    implements MyComponent
+{
+    @Requirement
+    private Logger logger;
+}
++------


Mime
View raw message