commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skitch...@apache.org
Subject svn commit: r476637 - /jakarta/commons/proper/logging/trunk/pom.xml
Date Sat, 18 Nov 2006 22:32:30 GMT
Author: skitching
Date: Sat Nov 18 14:32:29 2006
New Revision: 476637

URL: http://svn.apache.org/viewvc?view=rev&rev=476637
Log:
Fix use of optional dependencies; optional is a separate flag, not a scope.
Thanks to Wendy Smoak for pointing this out.

Modified:
    jakarta/commons/proper/logging/trunk/pom.xml

Modified: jakarta/commons/proper/logging/trunk/pom.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/logging/trunk/pom.xml?view=diff&rev=476637&r1=476636&r2=476637
==============================================================================
--- jakarta/commons/proper/logging/trunk/pom.xml (original)
+++ jakarta/commons/proper/logging/trunk/pom.xml Sat Nov 18 14:32:29 2006
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -310,111 +309,38 @@
     </plugins>
   </build>
   
-  <!--
-    - Special dependency handling follows. What we really want for JCL is to declare
-    - dependencies that are required when compiling but optional at runtime.
-    - Unfortunately Maven2 doesn't support this directly; if we use normal dependency
-    - declarations then *users* of JCL will get all the supported logging libs 
-    - pulled into their project by default, but if we declare them optional then
-    - when JCL is *compiled* we get none of them in the classpath.
-    - A workaround is used here where two profiles are declared; one is active only
-    - when compiling and has "normal" dependencies while the other is active when
-    - other apps declare a dependency on this pom and as "optional" dependencies.
-    -->
-  <profiles>
-    <profile>
-      <id>build</id>
-      <activation>
-        <!--
-          - If this file is present in the current directory, then assume that
-          - someone has checked out the JCL source code and is building it. In
-          - this case declare "normal" dependencies so the logging adapters
-          - can be compiled.
-          -->
-        <file>
-          <exists>commons-logging-README.txt</exists>
-        </file>
-      </activation>
-
-	  <dependencies>
-	    <dependency>
-	      <groupId>junit</groupId>
-	      <artifactId>junit</artifactId>
-	      <version>3.8.1</version>
-	      <scope>test</scope>
-	    </dependency>
-	    <dependency>
-	      <groupId>log4j</groupId>
-	      <artifactId>log4j</artifactId>
-	      <version>1.2.12</version>
-	    </dependency>
-	    <dependency>
-	      <groupId>logkit</groupId>
-	      <artifactId>logkit</artifactId>
-	      <version>1.0.1</version>
-	    </dependency>
-	    <dependency>
-	      <groupId>avalon-framework</groupId>
-	      <artifactId>avalon-framework</artifactId>
-	      <version>4.1.3</version>
-	    </dependency>
-	    <dependency>
-	      <groupId>javax.servlet</groupId>
-	      <artifactId>servlet-api</artifactId>
-	      <version>2.3</version>
-	    </dependency>
-	  </dependencies>
-    </profile>
-
-    <profile>
-      <id>use</id>
-      <activation>
-        <!--
-          - If this file is not in the current directory, then assume that
-          - this pom is being processed because it is referenced as a
-          - dependency of some other project. In this case, don't pull in
-          - any particular logging library; the using project needs to declare
-          - a dependency on whatever lib they really want present.
-          -->
-        <file>
-          <missing>commons-logging-README.txt</missing>
-        </file>
-      </activation>
-
-	  <dependencies>
-	    <dependency>
-	      <groupId>junit</groupId>
-	      <artifactId>junit</artifactId>
-	      <version>3.8.1</version>
-	      <scope>test</scope>
-	    </dependency>
-	    <dependency>
-	      <groupId>log4j</groupId>
-	      <artifactId>log4j</artifactId>
-	      <version>1.2.12</version>
-          <scope>optional</scope>
-	    </dependency>
-	    <dependency>
-	      <groupId>logkit</groupId>
-	      <artifactId>logkit</artifactId>
-	      <version>1.0.1</version>
-	      <scope>optional</scope>
-	    </dependency>
-	    <dependency>
-	      <groupId>avalon-framework</groupId>
-	      <artifactId>avalon-framework</artifactId>
-	      <version>4.1.3</version>
-	      <scope>optional</scope>
-	    </dependency>
-	    <dependency>
-	      <groupId>javax.servlet</groupId>
-	      <artifactId>servlet-api</artifactId>
-	      <version>2.3</version>
-	      <scope>optional</scope>
-	    </dependency>
-	  </dependencies>
-    </profile>
-  </profiles>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.12</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>logkit</groupId>
+      <artifactId>logkit</artifactId>
+      <version>1.0.1</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>avalon-framework</groupId>
+      <artifactId>avalon-framework</artifactId>
+      <version>4.1.3</version>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>2.3</version>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
 
 
   <distributionManagement>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message