Could you try declaring a dependency on commons-logging directly, and setting its scope to provided? Then you can remove all of those exclusions, and it won't get bundled with your app. (At least, that's the theory...)
Wayne On 11/24/07, Roger Ye <[EMAIL PROTECTED]> wrote: > Here is my attempt to do logging only with log4j, no commons-logging > or jdk-logging. > > So, the original intent is to drop commons-logging away, but now it's > everywhere in my pom.xml... > > and, what's interesting, to do "mvn tomcat:run", I have to explicitly > include the 1.1 version of JCL to make the problematic JCL 1.0.3 > version go away. BTW. maybe this is not the most appropriate way? if > so, please tell me. > > then I still have the error > > ==================== Console output ======================== > [INFO] [tomcat:run] > [INFO] Using existing Tomcat server configuration at C:\work\prj\target/tomcat > [INFO] Starting tomcat server > [INFO] Starting Servlet Engine: Apache Tomcat/5.5.15 > [INFO] XML validation disabled > log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not > assignable to a "org.apache.log4j.Appender" variable. > log4j:ERROR The class "org.apache.log4j.Appender" was loaded by > log4j:ERROR [EMAIL PROTECTED] > whereas object of type > log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by > [WebappClassLoader > delegate: false > repositories: > ----------> Parent Classloader: > [EMAIL PROTECTED] > ]. > log4j:ERROR Could not instantiate appender named "stdout". > 2007-11-24 18:23:04,732 WARN > org.apache.struts2.config.Settings.getLocale(Settings.java:143) > Settings: Could not parse struts.locale setting, substituting > default VM locale > > [INFO] Initializing Coyote HTTP/1.1 on http-8080 > [INFO] Starting Coyote HTTP/1.1 on http-8080 > > > > > ================== POM ========================== > > <?xml version="1.0" encoding="UTF-8"?> > <project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd"> > > <modelVersion>4.0.0</modelVersion> > <groupId>pkg</groupId> > <artifactId>prj</artifactId> > <packaging>war</packaging> > <name>PRJ</name> > <version>1.0-M1</version> > <description>...</description> > > <build> > <finalName>prj</finalName> > <plugins> > <plugin> > <!-- reference > https://jaxb.dev.java.net/jaxb-maven2-plugin/ --> > <groupId>com.sun.tools.xjc.maven2</groupId> > <artifactId>maven-jaxb-plugin</artifactId> > <version>1.1</version> > <configuration> > > <generatePackage>com.ws.schema</generatePackage> > <args>-wsdl</args> > <includeSchemas> > > <includeSchema>**/*.wsdl</includeSchema> > </includeSchemas> > > <generateDirectory>/target/generated/xjc/java</generateDirectory> > </configuration> > <executions> > <execution> > <goals> > <goal>generate</goal> > </goals> > </execution> > </executions> > </plugin> > <plugin> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <encoding>UTF-8</encoding> > <source>1.5</source> > <target>1.5</target> > <fork>true</fork> > <meminitial>128m</meminitial> > <maxmem>512m</maxmem> > </configuration> > </plugin> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>tomcat-maven-plugin</artifactId> > <version>1.0-alpha-1</version> > <configuration> > <path>/</path> > </configuration> > <dependencies> > <dependency> > > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > <version>1.1</version> > </dependency> > </dependencies> > </plugin> > <plugin> > <groupId>org.codehaus.mojo</groupId> > > <artifactId>hibernate3-maven-plugin</artifactId> > <version>2.0-alpha-2</version> > <configuration> > <components> > <component> > <name>hbm2java</name> > > <outputDirectory>/target/generated/hbn/java</outputDirectory> > </component> > <component> > <name>hbm2ddl</name> > > <outputDirectory>/target/generated/hbn</outputDirectory> > </component> > </components> > <componentProperties> > > <configurationFile>/src/main/resources/hibernate.cfg.xml</configurationFile> > <drop>true</drop> > > <outputfilename>schema.sql</outputfilename> > <!-- export = false ~ do not > execute the generated ddl --> > <export>false</export> > </componentProperties> > </configuration> > <executions> > <execution> > <goals> > <goal>hbm2java</goal> > </goals> > </execution> > </executions> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <!-- > http://jira.codehaus.org/browse/SUREFIRE-59 --> > <version>2.3</version> > </plugin> > </plugins> > </build> > > <dependencies> > <dependency> > <groupId>org.testng</groupId> > <artifactId>testng</artifactId> > <version>5.1</version> > <classifier>jdk15</classifier> > <scope>test</scope> > </dependency> > <dependency> > <groupId>org.easymock</groupId> > <artifactId>easymock</artifactId> > <version>2.3</version> > <scope>test</scope> > </dependency> > <dependency> > <groupId>javax.servlet</groupId> > <artifactId>servlet-api</artifactId> > <version>2.5</version> > <scope>provided</scope> > </dependency> > <dependency> > <groupId>javax.servlet.jsp</groupId> > <artifactId>jsp-api</artifactId> > <version>2.1</version> > <scope>provided</scope> > </dependency> > <dependency> > <groupId>log4j</groupId> > <artifactId>log4j</artifactId> > <version>1.2.14</version> > </dependency><!-- > <dependency> > <groupId>commons-logging</groupId> > <artifactId>commons-logging-api</artifactId> > <version>1.1</version> > </dependency>--> > <dependency> > <groupId>org.springframework</groupId> > <artifactId>spring</artifactId> > <version>2.0.7</version> > <exclusions> > <exclusion> > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>org.springframework.ws</groupId> > <artifactId>spring-ws-core-tiger</artifactId> > <version>1.0.1</version> > <exclusions> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-beans</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-context</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-core</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-web</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-webmvc</artifactId> > </exclusion> > <exclusion> > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>org.springframework.ws</groupId> > <artifactId>spring-oxm-tiger</artifactId> > <version>1.0.1</version> > <exclusions> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-beans</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-core</artifactId> > </exclusion> > <exclusion> > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>javax.xml.bind</groupId> > <artifactId>jaxb-api</artifactId> > <version>2.1</version> > </dependency> > <dependency> > <groupId>org.hibernate</groupId> > <artifactId>hibernate</artifactId> > <version>3.2.5.ga</version> > <exclusions> > <exclusion> > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>mysql</groupId> > <artifactId>mysql-connector-java</artifactId> > <version>5.0.5</version> > </dependency> > <!-- > <dependency> > <groupId>com.microsoft.sqlserver</groupId> > <artifactId>sqljdbc</artifactId> > <version>1.1</version> > </dependency> > --> > <dependency> > <groupId>commons-dbcp</groupId> > <artifactId>commons-dbcp</artifactId> > <version>1.2.2</version> > </dependency> > <dependency> > <groupId>commons-httpclient</groupId> > <artifactId>commons-httpclient</artifactId> > <version>3.1</version> > <exclusions> > <exclusion> > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>opensymphony</groupId> > <artifactId>sitemesh</artifactId> > <version>2.3</version> > </dependency> > <dependency> > <groupId>org.apache.struts</groupId> > <artifactId>struts2-core</artifactId> > <version>2.0.9</version> > <exclusions> > <exclusion> > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>org.apache.struts</groupId> > <artifactId>struts2-spring-plugin</artifactId> > <version>2.0.11</version> > <exclusions> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-core</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-beans</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-context</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-web</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>org.apache.struts</groupId> > <artifactId>struts2-sitemesh-plugin</artifactId> > <version>2.0.11</version> > </dependency> > <dependency> > <groupId>displaytag</groupId> > <artifactId>displaytag</artifactId> > <version>1.1.1</version> > <exclusions> > <exclusion> > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>org.directwebremoting</groupId> > <artifactId>dwr</artifactId> > <version>2.0.1</version> > <exclusions> > <exclusion> > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>org.acegisecurity</groupId> > <artifactId>acegi-security</artifactId> > <version>1.0.5</version> > <exclusions> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-aop</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-beans</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-context</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-core</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-dao</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-jdbc</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > > <artifactId>spring-remoting</artifactId> > </exclusion> > <exclusion> > <groupId>org.springframework</groupId> > <artifactId>spring-support</artifactId> > </exclusion> > <exclusion> > <groupId>commons-logging</groupId> > > <artifactId>commons-logging</artifactId> > </exclusion> > </exclusions> > </dependency> > </dependencies> > > <pluginRepositories> > <pluginRepository> > <id>java.net</id> > <name>java.net Maven Repository</name> > > <url>https://maven-repository.dev.java.net/nonav/repository</url> > <layout>legacy</layout> > </pluginRepository> > </pluginRepositories> > </project> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
