- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有所有必要的依赖:
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.5</version>
</dependency>
但仍然在 webapp 启动时得到这个:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
它出现在 Linux 终端和 Eclipse 中。所以这与 m2e 无关。
这是 mvn dependency:tree
的输出:
[INFO] +- org.apache.tiles:tiles-jsp:jar:3.0.1:compile
[INFO] | +- org.apache.tiles:tiles-servlet:jar:3.0.1:compile
[INFO] | | +- org.apache.tiles:tiles-core:jar:3.0.1:compile
[INFO] | | | \- commons-digester:commons-digester:jar:2.0:compile
[INFO] | | \- org.apache.tiles:tiles-request-servlet:jar:1.0.1:compile
[INFO] | +- org.apache.tiles:tiles-template:jar:3.0.1:compile
[INFO] | | +- org.apache.tiles:tiles-api:jar:3.0.1:compile
[INFO] | | \- org.apache.tiles:tiles-autotag-core-runtime:jar:1.1.0:compile
[INFO] | \- org.apache.tiles:tiles-request-jsp:jar:1.0.1:compile
[INFO] | \- org.apache.tiles:tiles-request-api:jar:1.0.1:compile
[INFO] +- org.hibernate:hibernate-core:jar:4.2.7.Final:compile
[INFO] | +- antlr:antlr:jar:2.7.7:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | +- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.1.Final:compile
[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
[INFO] | \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.2.Final:compile
[INFO] +- org.hibernate:hibernate-validator:jar:5.0.1.Final:compile
[INFO] | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | \- com.fasterxml:classmate:jar:0.8.0:compile
[INFO] +- com.sun.xml.ws:jaxws-rt:jar:2.2.8:compile
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.2.7:compile
[INFO] | +- javax.xml.ws:jaxws-api:jar:2.2.9:compile
[INFO] | +- javax.xml.soap:javax.xml.soap-api:jar:1.3.5:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.2-b03:compile
[INFO] | +- javax.jws:jsr181-api:jar:1.0-MR1:compile
[INFO] | +- com.sun.xml.bind:jaxb-core:jar:2.2.7:compile
[INFO] | | \- com.sun.istack:istack-commons-runtime:jar:2.16:compile
[INFO] | +- com.sun.xml.bind:jaxb-impl:jar:2.2.7:compile
[INFO] | +- com.sun.xml.ws:policy:jar:2.3.1:compile
[INFO] | +- org.glassfish.gmbal:gmbal-api-only:jar:3.1.0-b001:compile
[INFO] | | \- org.glassfish.external:management-api:jar:3.0.0-b012:compile
[INFO] | +- org.jvnet.staxex:stax-ex:jar:1.7.1:compile
[INFO] | +- com.sun.xml.stream.buffer:streambuffer:jar:1.5.1:compile
[INFO] | +- org.jvnet.mimepull:mimepull:jar:1.9.1:compile
[INFO] | +- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.12:compile
[INFO] | +- org.glassfish.ha:ha-api:jar:3.1.9:compile
[INFO] | +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.3.20:compile
[INFO] | | \- javax.xml.soap:saaj-api:jar:1.3.4:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.2:runtime
[INFO] | +- org.codehaus.woodstox:stax2-api:jar:3.1.1:runtime
[INFO] | \- com.sun.org.apache.xml.internal:resolver:jar:20050927:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.0.13:compile
[INFO] | \- ch.qos.logback:logback-core:jar:1.0.13:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.5:compile
[INFO] +- org.postgresql:postgresql:jar:9.2-1003-jdbc4:compile
[INFO] +- org.springframework:spring-context:jar:3.2.4.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:3.2.4.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:3.2.4.RELEASE:compile
[INFO] | +- org.springframework:spring-core:jar:3.2.4.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:3.2.4.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:3.2.4.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:3.2.4.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:3.2.4.RELEASE:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.springframework:spring-webmvc:jar:3.2.4.RELEASE:compile
[INFO] | \- org.springframework:spring-web:jar:3.2.4.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-core:jar:3.1.4.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-javaconfig:jar:1.0.0.M1:compile
[INFO] +- org.springframework.social:spring-social-facebook:jar:1.1.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.social:spring-social-core:jar:1.1.0.BUILD-SNAPSHOT:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.2.2:compile
[INFO] | +- org.springframework.social:spring-social-config:jar:1.1.0.BUILD-SNAPSHOT:compile
[INFO] | | \- org.springframework.social:spring-social-web:jar:1.1.0.BUILD-SNAPSHOT:compile
[INFO] | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.2.2:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.2.2:compile
[INFO] +- org.springframework.social:spring-social-twitter:jar:1.1.0.M4:compile
[INFO] | \- org.springframework.security:spring-security-crypto:jar:3.1.4.RELEASE:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- org.webjars:bootstrap:jar:2.3.2:compile
[INFO] +- org.webjars:fancybox:jar:2.1.5:compile
[INFO] +- org.webjars:font-awesome:jar:4.0.0:compile
[INFO] +- org.webjars:jquery:jar:1.10.2:compile
[INFO] +- org.webjars:jquery-waypoints:jar:2.0.3:compile
[INFO] +- ro.isdc.wro4j:wro4j-core:jar:1.7.1:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] | \- commons-io:commons-io:jar:2.4:compile
[INFO] +- ro.isdc.wro4j:wro4j-extensions:jar:1.7.1:compile
[INFO] | +- ro.isdc.wro4j:rhino:jar:1.7R5-20130223-1:compile
[INFO] | +- commons-pool:commons-pool:jar:1.6:compile
[INFO] | +- com.google.code.gson:gson:jar:1.6:compile
[INFO] | +- com.google.javascript:closure-compiler:jar:v20130411:compile
[INFO] | | +- args4j:args4j:jar:2.0.16:compile
[INFO] | | +- com.google.guava:guava:jar:14.0.1:compile
[INFO] | | +- com.google.protobuf:protobuf-java:jar:2.4.1:compile
[INFO] | | +- org.json:json:jar:20090211:compile
[INFO] | | \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | +- com.github.lltyk:dojo-shrinksafe:jar:1.7.2:compile
[INFO] | +- org.jruby:jruby-core:jar:1.7.4:compile
[INFO] | | +- org.jruby:jruby-stdlib:jar:1.7.4:compile
[INFO] | | +- org.jruby.joni:joni:jar:2.0.0:compile
[INFO] | | +- com.github.jnr:jnr-netdb:jar:1.1.2:compile
[INFO] | | +- com.github.jnr:jnr-enxio:jar:0.4:compile
[INFO] | | +- com.github.jnr:jnr-unixsocket:jar:0.3:compile
[INFO] | | +- com.github.jnr:jnr-posix:jar:2.5.2:compile
[INFO] | | +- org.jruby.extras:bytelist:jar:1.0.10:compile
[INFO] | | +- com.github.jnr:jnr-constants:jar:0.8.4:compile
[INFO] | | +- org.jruby.jcodings:jcodings:jar:1.0.10:compile
[INFO] | | +- com.github.jnr:jffi:jar:1.2.5:compile
[INFO] | | +- org.yaml:snakeyaml:jar:1.11:compile
[INFO] | | +- jline:jline:jar:2.7:compile
[INFO] | | +- joda-time:joda-time:jar:2.1:compile
[INFO] | | +- com.jcraft:jzlib:jar:1.1.2:compile
[INFO] | | +- com.headius:invokebinder:jar:1.2:compile
[INFO] | | \- com.github.jnr:jnr-ffi:jar:1.0.4:compile
[INFO] | | +- com.github.jnr:jffi:jar:native:1.2.7:runtime
[INFO] | | \- com.github.jnr:jnr-x86asm:jar:1.0.2:compile
[INFO] | +- me.n4u.sass:sass-gems:jar:3.1.19:compile
[INFO] | +- nz.co.edmi:bourbon-gem-jar:jar:2.1.0:compile
[INFO] | +- com.github.sommeri:less4j:jar:1.1.3:compile
[INFO] | | +- org.antlr:antlr-runtime:jar:3.4:compile
[INFO] | | \- commons-beanutils:commons-beanutils:jar:1.8.3:compile
[INFO] | +- org.codehaus.gmaven.runtime:gmaven-runtime-1.7:jar:1.3:compile
[INFO] | | +- org.codehaus.gmaven.feature:gmaven-feature-support:jar:1.3:compile
[INFO] | | | \- org.codehaus.gmaven.feature:gmaven-feature-api:jar:1.3:compile
[INFO] | | +- org.codehaus.gmaven.runtime:gmaven-runtime-support:jar:1.3:compile
[INFO] | | | +- org.codehaus.gmaven.runtime:gmaven-runtime-api:jar:1.3:compile
[INFO] | | | +- org.sonatype.gshell:gshell-io:jar:2.0:compile
[INFO] | | | +- org.codehaus.plexus:plexus-utils:jar:2.0.1:compile
[INFO] | | | \- com.thoughtworks.qdox:qdox:jar:1.10:compile
[INFO] | | +- org.codehaus.groovy:groovy-all:jar:1.7.4:compile
[INFO] | | \- org.apache.ant:ant:jar:1.8.1:compile
[INFO] | | \- org.apache.ant:ant-launcher:jar:1.8.1:compile
[INFO] | +- org.webjars:webjars-locator:jar:0.5:compile
[INFO] | +- org.webjars:jshint:jar:2.1.3:compile
[INFO] | +- org.webjars:less:jar:1.3.3:compile
[INFO] | +- org.webjars:emberjs:jar:1.0.0-rc.5:compile
[INFO] | +- org.webjars:handlebars:jar:1.0.0-rc.4:compile
[INFO] | +- org.webjars:coffee-script:jar:1.6.3:compile
[INFO] | +- org.webjars:jslint:jar:c657984cd7:compile
[INFO] | \- org.webjars:json2:jar:20110223:compile
[INFO] +- cglib:cglib:jar:3.0:compile
[INFO] | \- org.ow2.asm:asm:jar:4.0:compile
[INFO] +- org.ocpsoft.prettytime:prettytime-integration-jstl:jar:3.1.0.Final:compile
[INFO] +- com.github.slugify:slugify-taglib:jar:1.0-RELEASE:compile
[INFO] | \- com.github.slugify:slugify:jar:1.0-RELEASE:compile
[INFO] | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] \- net.sf.uadetector:uadetector-resources:jar:2013.10:compile
[INFO] \- net.sf.uadetector:uadetector-core:jar:0.9.10:compile
[INFO] +- net.sf.qualitycheck:quality-check:jar:1.3:compile
[INFO] \- javax.annotation:jsr250-api:jar:1.0:compile
我正在使用 tomcat7-maven-plugin 运行我的 webapp,它的目标是 tomcat7:run
。如果 LogBACK 在类路径中,我不知道去哪里查看,但是在运行目标 package
并查看 WEB-INF/lib
时我可以看到 logback jar 文件创建 war 文件:
pom.xml:
<?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>com.mypage</groupId>
<artifactId>site</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<!-- Generic properties -->
<java.version>1.7</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Apache Tiles -->
<tiles.version>3.0.1</tiles.version>
<!-- Hibernate -->
<hibernate.version>4.2.7.Final</hibernate.version>
<hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
<!-- JAX-WS -->
<jaxws.version>2.2.8</jaxws.version>
<!-- Logging -->
<logback.version>1.0.13</logback.version>
<slf4j.version>1.7.5</slf4j.version>
<!-- PostgreSQL -->
<postgresql.version>9.2-1003-jdbc4</postgresql.version>
<!-- Spring -->
<spring-framework.version>3.2.4.RELEASE</spring-framework.version>
<spring-security.version>3.1.4.RELEASE</spring-security.version>
<spring-social.facebook.version>1.1.0.M4</spring-social.facebook.version>
<spring-social.twitter.version>1.1.0.M4</spring-social.twitter.version>
<!-- Servlet -->
<jstl.version>1.2</jstl.version>
<servlet.version>3.1.0</servlet.version>
<!-- WebJars -->
<bootstrap.version>2.3.2</bootstrap.version>
<fancybox.version>2.1.5</fancybox.version>
<font-awesome.version>4.0.0</font-awesome.version>
<jquery.version>1.10.2</jquery.version>
<waypoints.version>2.0.3</waypoints.version>
<!-- wro4j -->
<wro4j.version>1.7.1</wro4j.version>
<!-- Other -->
<cglib.version>3.0</cglib.version>
<prettytime.version>3.1.0.Final</prettytime.version>
<slugify.version>1.0-RELEASE</slugify.version>
<uadetector.version>2013.10</uadetector.version>
<!-- Plugins -->
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
<jaxws-maven-plugin.version>2.3</jaxws-maven-plugin.version>
<tomcat7-maven-plugin.version>2.1</tomcat7-maven-plugin.version>
</properties>
<repositories>
<repository>
<id>org.springframework.maven.milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://repo.springsource.org/milestone</url>
</repository>
</repositories>
<dependencies>
<!-- Apache Tiles -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>${tiles.version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of LOGBack -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<!-- JAX-WS -->
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>${jaxws.version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<!--scope>runtime</scope-->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- PostgreSQL -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring-framework.version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of LOGBack -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring-framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring-framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring-framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring-security.version}</version>
</dependency>
<!-- TODO: Remove this when updating to Spring Security 3.2 -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-javaconfig</artifactId>
<version>1.0.0.M1</version>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-facebook</artifactId>
<version>${spring-social.facebook.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-twitter</artifactId>
<version>${spring-social.twitter.version}</version>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${servlet.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
</dependency>
<!-- WebJars -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>${bootstrap.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>fancybox</artifactId>
<version>${fancybox.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>${font-awesome.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>${jquery.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery-waypoints</artifactId>
<version>${waypoints.version}</version>
</dependency>
<!-- wro4j -->
<dependency>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-core</artifactId>
<version>${wro4j.version}</version>
</dependency>
<dependency>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-extensions</artifactId>
<version>${wro4j.version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of LOGBack -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Other -->
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>${cglib.version}</version>
</dependency>
<dependency>
<groupId>org.ocpsoft.prettytime</groupId>
<artifactId>prettytime-integration-jstl</artifactId>
<version>${prettytime.version}</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.slugify</groupId>
<artifactId>slugify-taglib</artifactId>
<version>${slugify.version}</version>
</dependency>
<dependency>
<groupId>net.sf.uadetector</groupId>
<artifactId>uadetector-resources</artifactId>
<version>${uadetector.version}</version>
</dependency>
</dependencies>
<build>
<defaultGoal>tomcat7:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>${jaxws-maven-plugin.version}</version>
<configuration>
<packageName>de.openligadb.schema</packageName>
<extension>true</extension>
<wsdlUrls>
<wsdlUrl>http://www.openligadb.de/webservices/sportsdata.asmx?wsdl</wsdlUrl>
</wsdlUrls>
</configuration>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>${tomcat7-maven-plugin.version}</version>
<configuration>
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
</project>
最佳答案
您可以尝试获取有关依赖关系树的详细信息:
mvn dependency:tree -Dverbose
这将打印带有“重复问题”的依赖关系树。我怀疑是从 tiles-jsp:3.0.1 开始,详情见上:
1) 使用 apache webapp 原型(prototype)创建了一个 maven webapplication 2) 添加到 pom.xml 这些依赖项:
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>3.0.1</version>
</dependency>
3) 使用mvn dependency:tree -Dverbose
打印这个:
[INFO] it.test:test:war:0.0.1-SNAPSHOT
[INFO] +- ch.qos.logback:logback-classic:jar:1.0.13:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.0.13:compile
[INFO] | \- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for duplicate)
[INFO] +- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.5:compile
[INFO] | \- (org.slf4j:slf4j-api:jar:1.7.5:compile - omitted for duplicate)
[INFO] \- org.apache.tiles:tiles-jsp:jar:3.0.1:compile
[INFO] +- org.apache.tiles:tiles-servlet:jar:3.0.1:compile
[INFO] | +- org.apache.tiles:tiles-core:jar:3.0.1:compile
[INFO] | | +- (org.apache.tiles:tiles-api:jar:3.0.1:compile - omitted for d
uplicate)
[INFO] | | +- commons-digester:commons-digester:jar:2.0:compile
[INFO] | | | \- commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO] | | \- (org.slf4j:jcl-over-slf4j:jar:1.5.8:compile - omitted for con
flict with 1.7.5)
[INFO] | \- org.apache.tiles:tiles-request-servlet:jar:1.0.1:compile
[INFO] | \- (org.apache.tiles:tiles-request-api:jar:1.0.1:compile - omitt
ed for duplicate)
[INFO] +- org.apache.tiles:tiles-template:jar:3.0.1:compile
[INFO] | +- org.apache.tiles:tiles-api:jar:3.0.1:compile
[INFO] | | \- (org.apache.tiles:tiles-request-api:jar:1.0.1:compile - omitt
ed for duplicate)
[INFO] | \- org.apache.tiles:tiles-autotag-core-runtime:jar:1.1.0:compile
[INFO] \- org.apache.tiles:tiles-request-jsp:jar:1.0.1:compile
[INFO] +- org.apache.tiles:tiles-request-api:jar:1.0.1:compile
[INFO] \- (org.apache.tiles:tiles-request-servlet:jar:1.0.1:compile - omit
ted for duplicate)
4) 如果有冲突,应该使用<exclude>
摆脱冲突
关于java - 尽管存在绑定(bind)依赖性,但无法加载 StaticLoggerBinder,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18239826/
我正在编写一个具有以下签名的 Java 方法。 void Logger(Method method, Object[] args); 如果一个方法(例如 ABC() )调用此方法 Logger,它应该
我是 Java 新手。 我的问题是我的 Java 程序找不到我试图用作的图像文件一个 JButton。 (目前这段代码什么也没做,因为我只是得到了想要的外观第一的)。这是我的主课 代码: packag
好的,今天我在接受采访,我已经编写 Java 代码多年了。采访中说“Java 垃圾收集是一个棘手的问题,我有几个 friend 一直在努力弄清楚。你在这方面做得怎么样?”。她是想骗我吗?还是我的一生都
我的 friend 给了我一个谜语让我解开。它是这样的: There are 100 people. Each one of them, in his turn, does the following
如果我将使用 Java 5 代码的应用程序编译成字节码,生成的 .class 文件是否能够在 Java 1.4 下运行? 如果后者可以工作并且我正在尝试在我的 Java 1.4 应用程序中使用 Jav
有关于why Java doesn't support unsigned types的问题以及一些关于处理无符号类型的问题。我做了一些搜索,似乎 Scala 也不支持无符号数据类型。限制是Java和S
我只是想知道在一个 java 版本中生成的字节码是否可以在其他 java 版本上运行 最佳答案 通常,字节码无需修改即可在 较新 版本的 Java 上运行。它不会在旧版本上运行,除非您使用特殊参数 (
我有一个关于在命令提示符下执行 java 程序的基本问题。 在某些机器上我们需要指定 -cp 。 (类路径)同时执行java程序 (test为java文件名与.class文件存在于同一目录下) jav
我已经阅读 StackOverflow 有一段时间了,现在我才鼓起勇气提出问题。我今年 20 岁,目前在我的家乡(罗马尼亚克卢日-纳波卡)就读 IT 大学。足以介绍:D。 基本上,我有一家提供簿记应用
我有 public JSONObject parseXML(String xml) { JSONObject jsonObject = XML.toJSONObject(xml); r
我已经在 Java 中实现了带有动态类型的简单解释语言。不幸的是我遇到了以下问题。测试时如下代码: def main() { def ks = Map[[1, 2]].keySet()
一直提示输入 1 到 10 的数字 - 结果应将 st、rd、th 和 nd 添加到数字中。编写一个程序,提示用户输入 1 到 10 之间的任意整数,然后以序数形式显示该整数并附加后缀。 public
我有这个 DownloadFile.java 并按预期下载该文件: import java.io.*; import java.net.URL; public class DownloadFile {
我想在 GUI 上添加延迟。我放置了 2 个 for 循环,然后重新绘制了一个标签,但这 2 个 for 循环一个接一个地执行,并且标签被重新绘制到最后一个。 我能做什么? for(int i=0;
我正在对对象 Student 的列表项进行一些测试,但是我更喜欢在 java 类对象中创建硬编码列表,然后从那里提取数据,而不是连接到数据库并在结果集中选择记录。然而,自从我这样做以来已经很长时间了,
我知道对象创建分为三个部分: 声明 实例化 初始化 classA{} classB extends classA{} classA obj = new classB(1,1); 实例化 它必须使用
我有兴趣使用 GPRS 构建车辆跟踪系统。但是,我有一些问题要问以前做过此操作的人: GPRS 是最好的技术吗?人们意识到任何问题吗? 我计划使用 Java/Java EE - 有更好的技术吗? 如果
我可以通过递归方法反转数组,例如:数组={1,2,3,4,5} 数组结果={5,4,3,2,1}但我的结果是相同的数组,我不知道为什么,请帮助我。 public class Recursion { p
有这样的标准方式吗? 包括 Java源代码-测试代码- Ant 或 Maven联合单元持续集成(可能是巡航控制)ClearCase 版本控制工具部署到应用服务器 最后我希望有一个自动构建和集成环境。
我什至不知道这是否可能,我非常怀疑它是否可能,但如果可以,您能告诉我怎么做吗?我只是想知道如何从打印机打印一些文本。 有什么想法吗? 最佳答案 这里有更简单的事情。 import javax.swin
我是一名优秀的程序员,十分优秀!