当前位置: 首页 > 知识库问答 >
问题:

如何在maven中排除依赖关系

莘钧
2023-03-14

<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.dhl.crdb</groupId>
    <artifactId>crdb</artifactId>
    <version>1.2.2-SNAPSHOT</version>
    <packaging>war</packaging>

    <properties>
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
        <project.build.date>${maven.build.timestamp}</project.build.date>
        <!--<dhl.web.common.version>1.2.28.0</dhl.web.common.version>-->
        <!--<dhl.web.common.version>1.2.1.10</dhl.web.common.version>-->
        <dhl.web.common.version>1.1.310.1</dhl.web.common.version>
        <!--<dhl.web.common.version>1.2.65.0</dhl.web.common.version>-->
        <hsqldb.version>2.2.8</hsqldb.version>
        <mockito.version>1.9.5</mockito.version>
        <junit.version>4.11</junit.version>
        <sonar.host.url>https://sonarqube.dhl.com</sonar.host.url>
    </properties>

    <!--<scm>-->
    <!--<connection>scm:git:https://repository.dhl.com/git/resp-crdb.git</connection>-->
    <!--<developerConnection>-->
    <!--scm:git:[fetch=]https://repository.dhl.com/git/resp-crdb.git[push=]https://repository.dhl.com/git/resp-crdb.git-->
    <!--</developerConnection>-->
    <!--<url>https://repository.dhl.com/git/resp-crdb.git</url>-->
    <!--<tag>crdb-1.0.0.0</tag>-->
    <!--</scm>-->

    <distributionManagement>
        <repository>
            <id>releases</id>
            <name>releases</name>
            <url>http://czcholstc000112.prg-dc.dhl.com:8272/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <name>snapshots</name>
            <url>http://czcholstc000112.prg-dc.dhl.com:8272/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <finalName>crdb</finalName>

        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>${basedir}/src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>${basedir}/src/main/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <filtering>false</filtering>
                <directory>${basedir}/src/test/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </testResource>
            <testResource>
                <filtering>false</filtering>
                <directory>${basedir}/src/test/resources</directory>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <version>3.5.1</version>
                <inherited>true</inherited>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <warName>crdb</warName>
                    <archive>
                        <manifest>
                            <addClasspath>false</addClasspath>
                        </manifest>
                        <manifestEntries>
                            <appVersion>${project.version}</appVersion>
                            <appReleaseDate>${project.build.date}</appReleaseDate>
                            <appCode>crdb</appCode>
                        </manifestEntries>
                    </archive>
                    <!--<packagingExcludes>-->
                    <!--**/crdb.dev.properties,-->
                    <!--**/log4j.properties-->
                    <!--</packagingExcludes>-->
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.7.1</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
            </plugin>

            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.9.4</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.dhl.webcommon</groupId>
            <artifactId>dhl-wc</artifactId>
            <version>${dhl.web.common.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>servlet-api</artifactId>
                    <groupId>javax.servlet</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org.apache.poi</artifactId>
                    <groupId>poi</groupId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>

            </exclusions>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/animal-sniffer-maven-plugin -->
        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>animal-sniffer-annotations</artifactId>
            <version>1.14</version>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>org.slf4j</groupId>-->
        <!--            <artifactId>log4j-over-slf4j</artifactId>-->
        <!--            <version>1.7.7</version>-->
        <!--        </dependency>-->
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.2.11</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>net.logstash.logback</groupId>
            <artifactId>logstash-logback-encoder</artifactId>
            <version>6.3</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.janino</groupId>
            <artifactId>janino</artifactId>
            <version>3.0.6</version>
        </dependency>

        <!-- Spring OAUTH dependency -->
        <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
            <version>2.0.12.RELEASE</version>
            <exclusions>
                <exclusion>
                    <artifactId>spring-beans</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-context</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-core</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-expression</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-aop</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.ttddyy</groupId>
            <artifactId>datasource-proxy</artifactId>
            <version>1.4.1</version>
        </dependency>

        <!-- testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>${hsqldb.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>0.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path-assert</artifactId>
            <version>0.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wicketstuff</groupId>
            <artifactId>wicketstuff-tinymce</artifactId>
            <version>6.5.0</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-core</artifactId>
            <version>1.17</version>
        </dependency>
        <dependency>
            <groupId>org.apache.wicket</groupId>
            <artifactId>wicket-request</artifactId>
            <version>6.5.0</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <!--<version>3.13</version>-->
            <version>3.17</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <!--<version>3.13</version>-->
            <version>3.17</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.9.2</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.9.2</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>21.0</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>0.7.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.1</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.ws</groupId>
            <artifactId>jaxws-api</artifactId>
            <version>2.2.12</version>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>6.0.7.Final</version>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.0.CR5</version>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-jaxrs</artifactId>
            <version>1.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.owasp.esapi</groupId>
            <artifactId>esapi</artifactId>
            <version>2.2.3.1</version>                
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>

</project>

依赖关系:树是:

com.dhl.crdb:crdb:war:1.2.2-SNAPSHOT
[INFO] +- com.dhl.webcommon:dhl-wc:jar:1.1.310.1:compile
[INFO] |  +- org.springframework:spring-tx:jar:4.1.7.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:4.1.7.RELEASE:compile
[INFO] |  +- org.springframework:spring-webmvc:jar:4.1.7.RELEASE:compile
[INFO] |  +- org.springframework:spring-core:jar:4.1.7.RELEASE:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  +- org.springframework:spring-orm:jar:4.1.7.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jdbc:jar:4.1.7.RELEASE:compile
[INFO] |  +- org.springframework:spring-web:jar:4.1.7.RELEASE:compile
[INFO] |  +- org.springframework:spring-expression:jar:4.1.7.RELEASE:compile
[INFO] |  +- org.springframework:spring-aop:jar:4.1.7.RELEASE:compile
[INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  +- org.springframework:spring-aspects:jar:4.1.7.RELEASE:compile
[INFO] |  |  \- org.aspectj:aspectjweaver:jar:1.8.6:compile
[INFO] |  +- org.springframework:spring-test:jar:4.1.7.RELEASE:compile
[INFO] |  +- org.springframework:spring-jms:jar:4.1.7.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-messaging:jar:4.1.7.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:4.1.7.RELEASE:compile
[INFO] |  +- org.springframework:spring-context-support:jar:4.1.7.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-core:jar:3.2.3.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-web:jar:3.2.3.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-config:jar:3.2.3.RELEASE:compile
[INFO] |  +- org.springframework.batch:spring-batch-core:jar:2.2.1.RELEASE:compile
[INFO] |  |  +- org.springframework.batch:spring-batch-infrastructure:jar:2.2.1.RELEASE:compile
[INFO] |  |  |  \- org.springframework.retry:spring-retry:jar:1.0.2.RELEASE:compile
[INFO] |  |  +- com.thoughtworks.xstream:xstream:jar:1.3:compile
[INFO] |  |  |  \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] |  |  \- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] |  +- org.springframework.ldap:spring-ldap-core:jar:1.3.2.RELEASE:compile
[INFO] |  +- org.apache.wicket:wicket-core:jar:6.5.0:compile
[INFO] |  +- org.apache.wicket:wicket-spring:jar:6.5.0:compile
[INFO] |  |  \- org.apache.wicket:wicket-ioc:jar:6.5.0:compile
[INFO] |  |     +- cglib:cglib:jar:2.2.2:compile
[INFO] |  |     \- javax.inject:javax.inject:jar:1:compile
[INFO] |  +- org.wicketstuff:wicketstuff-minis:jar:6.5.0:compile
[INFO] |  +- org.apache.wicket:wicket-bean-validation:jar:6.20.0:compile
[INFO] |  +- com.vaynberg.wicket.select2:wicket-select2:jar:2.3:compile
[INFO] |  +- cas:casclient:jar:2.1.1:compile
[INFO] |  +- org.jasig.cas:cas-client-core:jar:3.1.2:compile
[INFO] |  +- joda-time:joda-time-hibernate:jar:1.3:compile
[INFO] |  +- org.jadira.usertype:usertype.jodatime:jar:2.0.1:compile
[INFO] |  |  \- org.jadira.usertype:usertype.spi:jar:2.0.1:compile
[INFO] |  +- org.hibernate:hibernate-core:jar:4.3.11.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
[INFO] |  |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile
[INFO] |  |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  |  +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final:compile
[INFO] |  |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] |  |  +- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] |  |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  |  \- org.jboss:jandex:jar:1.1.0.Final:compile
[INFO] |  +- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] |  |  \- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] |  +- org.hibernate:hibernate-validator-annotation-processor:jar:4.2.0.Final:compile
[INFO] |  |  \- org.hibernate:hibernate-validator:jar:4.2.0.Final:compile
[INFO] |  +- org.hibernate:hibernate-ehcache:jar:4.3.11.Final:compile
[INFO] |  |  \- net.sf.ehcache:ehcache-core:jar:2.4.3:compile
[INFO] |  +- com.ibm.icu:icu4j:jar:4.0.1:compile
[INFO] |  +- com.oracle:ojdbc16:jar:11.2.0.3.0:runtime
[INFO] |  +- commons-lang:commons-lang:jar:2.6:compile
[INFO] |  +- org.aspectj:aspectjrt:jar:1.5.4:compile
[INFO] |  +- log4j:log4j:jar:1.2.17:compile
[INFO] |  +- commons-io:commons-io:jar:2.4:compile
[INFO] |  +- org.hibernate:hibernate-envers:jar:4.3.11.Final:compile
[INFO] |  |  \- org.hibernate:hibernate-entitymanager:jar:4.3.11.Final:compile
[INFO] |  +- javax.mail:mail:jar:1.4.4:compile
[INFO] |  |  \- javax.activation:activation:jar:1.1:compile
[INFO] |  +- com.code-troopers:wicket-editable-grid:jar:0.1:compile
[INFO] |  +- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.7.3:compile
[INFO] |  |  +- org.apache.cxf:cxf-api:jar:2.7.3:compile
[INFO] |  |  |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.4:runtime
[INFO] |  |  |  |  \- org.codehaus.woodstox:stax2-api:jar:3.1.1:runtime
[INFO] |  |  |  +- org.apache.ws.xmlschema:xmlschema-core:jar:2.0.3:compile
[INFO] |  |  |  \- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-core:jar:2.7.3:compile
[INFO] |  |  +- com.sun.xml.bind:jaxb-impl:jar:2.1.13:compile
[INFO] |  |  \- com.sun.xml.bind:jaxb-xjc:jar:2.1.13:compile
[INFO] |  +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.7.3:compile
[INFO] |  |  +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] |  |  +- asm:asm:jar:3.3.1:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-bindings-soap:jar:2.7.3:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.7.3:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.7.3:compile
[INFO] |  |  \- org.apache.cxf:cxf-rt-ws-addr:jar:2.7.3:compile
[INFO] |  |     \- org.apache.cxf:cxf-rt-ws-policy:jar:2.7.3:compile
[INFO] |  |        \- org.apache.neethi:neethi:jar:3.0.2:compile
[INFO] |  +- org.apache.cxf:cxf-rt-transports-http:jar:2.7.3:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.4:compile
[INFO] |  |  \- org.apache.httpcomponents:httpcore:jar:4.4:compile
[INFO] |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] |  +- com.googlecode.wicket-jquery-ui:wicket-jquery-ui:jar:6.17.0:compile
[INFO] |  |  \- com.googlecode.wicket-jquery-ui:wicket-jquery-ui-core:jar:6.17.0:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.4.1:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.0:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.4.1:compile
[INFO] |  +- com.dhl.webcommon:saml-filter:jar:1.0.10.0:compile
[INFO] |  |  \- joda-time:joda-time:jar:2.1:compile
[INFO] |  +- com.dhl.webcommon:dhl-dbc:jar:1.1.82.0:compile
[INFO] |  +- com.dhl.webcommon:dhl-resources:jar:1.1.143.0:compile
[INFO] |  \- org.flywaydb:flyway-core:jar:4.0.3:compile
[INFO] +- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] +- javax.xml.bind:jaxb-api:jar:2.2.11:compile
[INFO] +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- net.logstash.logback:logstash-logback-encoder:jar:6.3:compile
[INFO] +- org.codehaus.janino:janino:jar:3.0.6:compile
[INFO] |  \- org.codehaus.janino:commons-compiler:jar:3.0.6:compile
[INFO] +- org.springframework.security.oauth:spring-security-oauth2:jar:2.0.12.RELEASE:compile
[INFO] |  \- commons-codec:commons-codec:jar:1.9:compile
[INFO] +- net.ttddyy:datasource-proxy:jar:1.4.1:compile
[INFO] |  \- org.mockito:mockito-core:jar:1.9.5:compile
[INFO] |     \- org.objenesis:objenesis:jar:1.0:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.hsqldb:hsqldb:jar:2.2.8:test
[INFO] +- org.mockito:mockito-all:jar:1.9.5:test
[INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:test
[INFO] +- com.jayway.jsonpath:json-path:jar:0.8.1:test
[INFO] |  \- net.minidev:json-smart:jar:1.1.1:test
[INFO] +- com.jayway.jsonpath:json-path-assert:jar:0.8.1:test
[INFO] |  \- org.hamcrest:hamcrest-library:jar:1.2.1:test
[INFO] +- org.wicketstuff:wicketstuff-tinymce:jar:6.5.0:compile
[INFO] |  +- org.apache.wicket:wicket-extensions:jar:6.5.0:compile
[INFO] |  +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] |  +- net.sf.jazzy:jazzy:jar:0.5.2-rtext-1.4.1:compile
[INFO] |  +- org.json:json:jar:20090211:compile
[INFO] |  \- org.apache.wicket:wicket:pom:6.5.0:compile
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided
[INFO] +- org.apache.tika:tika-core:jar:1.17:compile
[INFO] +- org.apache.wicket:wicket-request:jar:6.5.0:compile
[INFO] |  \- org.apache.wicket:wicket-util:jar:6.5.0:compile
[INFO] +- org.apache.poi:poi:jar:3.17:compile
[INFO] +- org.apache.poi:poi-ooxml:jar:3.17:compile
[INFO] |  +- org.apache.poi:poi-ooxml-schemas:jar:3.17:compile
[INFO] |  |  \- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile
[INFO] |  |     \- stax:stax-api:jar:1.0.1:compile
[INFO] |  \- com.github.virtuald:curvesapi:jar:1.04:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] |  +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] |  +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] |  +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] |  |  \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] |  |     \- net.bytebuddy:byte-buddy:jar:1.8.12:compile
[INFO] |  +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] |  +- com.fasterxml:classmate:jar:1.4.0:compile
[INFO] |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
[INFO] +- com.google.guava:guava:jar:21.0:compile
[INFO] +- io.jsonwebtoken:jjwt:jar:0.7.0:compile
[INFO] +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] +- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] +- javax.xml.ws:jaxws-api:jar:2.2.12:compile
[INFO] |  \- javax.xml.soap:javax.xml.soap-api:jar:1.3.5:compile
[INFO] +- javax:javaee-api:jar:7.0:compile
[INFO] |  \- com.sun.mail:javax.mail:jar:1.5.0:compile
[INFO] +- org.hibernate.validator:hibernate-validator:jar:6.0.7.Final:compile
[INFO] |  \- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] +- javax.validation:validation-api:jar:1.0.CR5:compile
[INFO] +- io.swagger:swagger-jaxrs:jar:1.6.0:compile
[INFO] |  +- io.swagger:swagger-core:jar:1.6.0:compile
[INFO] |  |  +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] |  |  \- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.10.1:compile
[INFO] |  |     \- org.yaml:snakeyaml:jar:1.24:compile
[INFO] |  +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] |  \- org.reflections:reflections:jar:0.9.11:compile
[INFO]    \- xml-apis:xml-apis:jar:1.4.01:compile

有人能帮我解除对验证api: jar: 1.0.0. GA的依赖吗?它似乎在wc pom中作为传递依赖。谢谢

共有1个答案

子车芷阳
2023-03-14

我没有在依赖树输出中看到javax.validation: valative-api: jar: 1.0.0. GA依赖项。

只有javax。验证:验证api:jar:1.0。CR5存在。然后你在你的pom里申报。xml作为依赖项。

为什么你认为1.0.0中有验证api库。GA版本?

 类似资料:
  • 问题内容: 我有一个项目,需要以下Maven jibx插件: 在jibx插件pom内部,有一个xpp3依赖关系,我想从我的项目构建过程中排除它(由于某种原因,我无法在私有存储库中拥有它)。 有没有一种方法可以配置我的pom.xml(而不是插件pom)来排除该依赖关系? 编辑:我试图从插件pom中删除xpp3依赖项,并且该项目可以成功构建,所以我知道依赖项不是强制性的。 问题答案: 这是一个示例,其

  • 问题内容: 我想排除Maven插件的直接依赖关系,并且此答案中描述的方法不起作用(如此注释所示)。 作为一个特定的例子: 我仍然在依赖项列表中(带有)看到了。我究竟做错了什么? (如果有人对如何用该API的JDK 9等效物替换对工件的依赖有了想法[似乎发生在Java 8上,其中“ [JAXB API os从[jar:… jre / lib /rt.jar]“],我很乐意为此开设一期新书。) 更新资

  • 我在我的项目中遇到了依赖关系冲突的问题。特别是,slf4j日志记录有两种实现:slf4j-简单和logback-经典,我得到了 在运行时。 logback-classic对我来说是必备的依赖项(因为dropwizard),但slf4j-simple不是真的,我想把它从我的uber项目中去掉。只是没那么容易。 我的“uber jar”依赖于“small jar”,而“small-jar”又依赖于“s

  • 主要内容:排除依赖,可选依赖,排除依赖 VS 可选依赖 我们知道 Maven 依赖具有传递性,例如 A 依赖于 B,B 依赖于 C,在不考虑依赖范围等因素的情况下,Maven 会根据依赖传递机制,将间接依赖 C 引入到 A 中。但如果 A 出于某种原因,希望将间接依赖 C 排除,那该怎么办呢?Maven 为用户提供了两种解决方式:排除依赖(Dependency Exclusions)和可选依赖(Optional Dependencies)。 排除依赖

  • 问题内容: 我有一个项目,该项目依赖于由供应商控制的工件。该工件包含一些我依赖的类,其中一些类较旧并且会引起问题。有没有办法让Maven自动扩展jar,删除类并将它们重新打包为依赖项?我会举一个例子。 所以- 我需要使用在项目网站,但我需要使用从神器。我无法修改Supplier:artifact或us:dependency。 有任何想法吗?! 问题答案: 从版本2.0.9开始,maven保留了类路

  • 给予 这在gradle 1.3中无法正常工作。(即,子项目包含所有依赖项) 这是一个bug还是有不同的语法来排除项目依赖关系?