0

我已将我的 Maven 项目导入 Eclipse。该项目与另一台机器上的另一个 Eclipse 一起工作。

我收到以下编译错误: [ERROR] bad path element "/home/ps/.m2/repository/javax/mail/mail/1.4/activation.jar": no such file or directory

当我查看m2时,确实没有activation.jar。

当我在另一台机器上查看副本时,我看到的唯一区别是它在引用的库列表中有 ojdbc6.jar。所有其他库都来自 M2。

但是,查看 javax/mail/mail/1.4/mail-1.4.jar 的清单, jar xf ~/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar META-INF/MANIFEST.MF; grep -i 'class-path' META-INF/MANIFEST.MF;我发现它在类路径中有activation.jar。这是编译错误的原因吗?

也许我还应该提一下,我不得不将机器上的 java 版本设置从 1.6 更改为 1.8,因为新机器没有 1.6。

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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.xxxmonitor</groupId>
    <artifactId>xxx</artifactId>
    <name>cdxxx</name>
    <packaging>war</packaging>
    <version>1.0.0-BUILD-SNAPSHOT</version>
    <properties>
        <java-version>1.6</java-version>
        <org.springframework-version>3.1.1.RELEASE</org.springframework-version>
        <org.aspectj-version>1.6.10</org.aspectj-version>
        <org.slf4j-version>1.6.6</org.slf4j-version>
    </properties>
    <dependencies>
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework-version}</version>
            <exclusions>
                <!-- Exclude Commons Logging in favor of SLF4j -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework-version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${org.springframework-version}</version>
        </dependency>


        <!-- Hibernate -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.0.0.GA</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>3.6.0.Final</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.0-api</artifactId>
            <version>1.0.0.Final</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>taglibs</groupId>
            <artifactId>standard</artifactId>
            <version>1.1.2</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>20030825.184428</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>20030825.183949</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.6</version>
        </dependency>
        <!-- <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> 
            <version>5.1.21</version> <scope>runtime</scope> </dependency> -->
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>1.9.5</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.7.1</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1</version>
        </dependency>
        <!-- Email -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>commons-email</groupId>
            <artifactId>commons-email</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
            <type>jar</type>
        </dependency>


        <!-- AspectJ -->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${org.aspectj-version}</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${org.slf4j-version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
            </exclusions>
            <scope>compile</scope>
        </dependency>

        <!-- @Inject -->
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>

        <!-- Servlet -->
        <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>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.ldap</groupId>
            <artifactId>spring-ldap-core</artifactId>
            <version>2.0.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-ldap</artifactId>
            <version>3.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.apache.james</groupId>
            <artifactId>apache-mime4j-core</artifactId>
            <version>0.7.2</version>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>javax.mail-api</artifactId>
            <version>1.5.0-b01</version>
        </dependency>
        <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>1.5.3</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.53</version>
        </dependency>
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt</artifactId>
            <version>1.9.1</version>
        </dependency>
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt-spring31</artifactId>
            <version>1.9.2</version>
        </dependency>
        <dependency>
            <groupId>org.samba.jcifs</groupId>
            <artifactId>jcifs</artifactId>
            <version>1.3.14-kohsuke-1</version>
        </dependency>
        <dependency>
            <groupId>org.opensmpp</groupId>
            <artifactId>opensmpp-core</artifactId>
            <version>3.0.0</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/httpunit/httpunit -->
        <dependency>
            <groupId>httpunit</groupId>
            <artifactId>httpunit</artifactId>
            <version>1.7</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.mozilla/rhino -->
        <dependency>
            <groupId>org.mozilla</groupId>
            <artifactId>rhino</artifactId>
            <version>1.7.10</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <additionalProjectnatures>
                        <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
                    </additionalProjectnatures>
                    <additionalBuildcommands>
                        <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
                    </additionalBuildcommands>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <compilerArgument>-Xlint:all</compilerArgument>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <configuration>
                    <mainClass>org.test.int1.Main</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

期望的行为:项目应该编译没有错误。

我创建了一个依赖树,但我不明白:

ps@REGULUS:~/Projects/xxx-monitoring/xxx2$ mvn dependency:tree -Dverbose
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building cdxxx 1.0.0-BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ xxx ---
[INFO] com.xxxmonitor:xxx:war:1.0.0-BUILD-SNAPSHOT
[INFO] +- org.springframework:spring-context:jar:3.1.1.RELEASE:compile
[INFO] |  +- org.springframework:spring-aop:jar:3.1.1.RELEASE:compile
[INFO] |  |  +- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  |  +- (org.springframework:spring-asm:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-beans:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-core:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-beans:jar:3.1.1.RELEASE:compile
[INFO] |  |  \- (org.springframework:spring-core:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-core:jar:3.1.1.RELEASE:compile
[INFO] |  |  \- (org.springframework:spring-asm:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-expression:jar:3.1.1.RELEASE:compile
[INFO] |  |  \- (org.springframework:spring-core:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  \- org.springframework:spring-asm:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:3.1.1.RELEASE:compile
[INFO] |  +- (org.springframework:spring-asm:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- (org.springframework:spring-beans:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- (org.springframework:spring-context:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-context-support:jar:3.1.1.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-beans:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-context:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-core:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- (org.springframework:spring-core:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- (org.springframework:spring-expression:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  \- org.springframework:spring-web:jar:3.1.1.RELEASE:compile
[INFO] |     +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
[INFO] |     +- (org.springframework:spring-beans:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |     +- (org.springframework:spring-context:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |     \- (org.springframework:spring-core:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework:spring-orm:jar:3.1.1.RELEASE:compile
[INFO] |  +- (org.springframework:spring-beans:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- (org.springframework:spring-core:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-jdbc:jar:3.1.1.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-beans:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-core:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-tx:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |  \- org.springframework:spring-tx:jar:3.1.1.RELEASE:compile
[INFO] |     +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
[INFO] |     +- (org.springframework:spring-aop:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |     +- (org.springframework:spring-beans:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |     +- (org.springframework:spring-context:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] |     \- (org.springframework:spring-core:jar:3.1.1.RELEASE:compile - omitted for duplicate)
[INFO] +- org.hibernate:hibernate-validator:jar:4.0.0.GA:compile
[INFO] |  +- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] |  +- (org.slf4j:slf4j-api:jar:1.5.6:compile - omitted for conflict with 1.6.6)
[INFO] |  +- javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO] |  |  +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] |  |  \- (javax.activation:activation:jar:1.1:compile - omitted for duplicate)
[INFO] |  \- com.sun.xml.bind:jaxb-impl:jar:2.1.3:compile
[INFO] |     \- (javax.xml.bind:jaxb-api:jar:2.1:compile - omitted for duplicate)
[INFO] +- org.hibernate:hibernate-entitymanager:jar:3.6.0.Final:compile
[INFO] |  +- org.hibernate:hibernate-core:jar:3.6.0.Final:compile
[INFO] |  |  +- antlr:antlr:jar:2.7.6:compile
[INFO] |  |  +- commons-collections:commons-collections:jar:3.1:compile
[INFO] |  |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  |  +- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO] |  |  |  \- (org.slf4j:slf4j-api:jar:1.5.8:compile - omitted for conflict with 1.5.6)
[INFO] |  |  +- (org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile - omitted for duplicate)
[INFO] |  |  +- javax.transaction:jta:jar:1.1:compile
[INFO] |  |  \- (org.slf4j:slf4j-api:jar:1.6.1:compile - omitted for conflict with 1.5.6)
[INFO] |  +- cglib:cglib:jar:2.2:compile
[INFO] |  |  \- asm:asm:jar:3.1:compile
[INFO] |  +- javassist:javassist:jar:3.12.0.GA:compile
[INFO] |  +- (org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile - omitted for duplicate)
[INFO] |  \- (org.slf4j:slf4j-api:jar:1.6.1:compile - omitted for conflict with 1.5.6)
[INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO] +- taglibs:standard:jar:1.1.2:compile
[INFO] +- commons-dbcp:commons-dbcp:jar:20030825.184428:compile
[INFO] +- commons-pool:commons-pool:jar:20030825.183949:compile
[INFO] +- commons-net:commons-net:jar:2.0:compile
[INFO] +- commons-codec:commons-codec:jar:1.6:compile
[INFO] +- org.liquibase:liquibase-core:jar:1.9.5:compile
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.7.1:compile
[INFO] |  \- org.codehaus.jackson:jackson-core-asl:jar:1.7.1:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1:compile
[INFO] +- commons-io:commons-io:jar:1.3.2:compile
[INFO] +- org.apache.commons:commons-email:jar:1.1:compile
[INFO] |  +- javax.mail:mail:jar:1.4:compile
[INFO] |  |  \- (javax.activation:activation:jar:1.1:compile - omitted for duplicate)
[INFO] |  \- javax.activation:activation:jar:1.1:compile
[INFO] +- commons-lang:commons-lang:jar:2.4:compile
[INFO] +- org.aspectj:aspectjrt:jar:1.6.10:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.6:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.6.6:runtime
[INFO] |  \- (org.slf4j:slf4j-api:jar:1.6.6:runtime - omitted for duplicate)
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.6:runtime
[INFO] |  +- (org.slf4j:slf4j-api:jar:1.6.6:runtime - omitted for duplicate)
[INFO] |  \- (log4j:log4j:jar:1.2.17:runtime - omitted for conflict with 1.2.15)
[INFO] +- log4j:log4j:jar:1.2.15:compile
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided (scope not updated to compile)
[INFO] +- javax.servlet.jsp:jsp-api:jar:2.1:provided
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- junit:junit:jar:4.7:test
[INFO] +- org.quartz-scheduler:quartz:jar:2.2.1:compile
[INFO] |  +- c3p0:c3p0:jar:0.9.1.1:compile
[INFO] |  \- (org.slf4j:slf4j-api:jar:1.6.6:compile - omitted for duplicate)
[INFO] +- org.springframework.ldap:spring-ldap-core:jar:2.0.2.RELEASE:compile
[INFO] |  +- (org.springframework:spring-tx:jar:3.2.8.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] |  +- org.springframework.data:spring-data-commons:jar:1.6.1.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-core:jar:3.1.4.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] |  |  +- (org.springframework:spring-beans:jar:3.1.4.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] |  |  +- (org.slf4j:slf4j-api:jar:1.7.1:compile - omitted for conflict with 1.6.6)
[INFO] |  |  \- (org.slf4j:jcl-over-slf4j:jar:1.7.1:runtime - omitted for conflict with 1.6.6)
[INFO] |  +- (org.springframework:spring-beans:jar:3.2.8.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] |  \- (org.springframework:spring-core:jar:3.2.8.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] +- org.springframework.security:spring-security-ldap:jar:3.0.1.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-core:jar:3.0.1.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-expression:jar:3.0.0.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] |  |  +- (org.springframework:spring-core:jar:3.0.0.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] |  |  +- (org.springframework:spring-context:jar:3.0.0.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] |  |  +- (org.springframework:spring-tx:jar:3.0.0.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] |  |  +- (org.springframework:spring-aop:jar:3.0.0.RELEASE:compile - omitted for conflict with 3.1.1.RELEASE)
[INFO] |  |  +- (org.aspectj:aspectjrt:jar:1.6.5:compile - omitted for conflict with 1.6.10)
[INFO] |  |  +- org.aspectj:aspectjweaver:jar:1.6.5:compile
[INFO] |  |  \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for duplicate)
[INFO] |  +- (org.springframework.ldap:spring-ldap-core:jar:1.3.0.RELEASE:compile - omitted for conflict with 2.0.2.RELEASE)
[INFO] |  \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- org.apache.james:apache-mime4j-core:jar:0.7.2:compile
[INFO] +- javax.mail:javax.mail-api:jar:1.5.0-b01:compile
[INFO] |  \- (javax.activation:activation:jar:1.1:compile - omitted for duplicate)
[INFO] +- com.sun.mail:javax.mail:jar:1.5.3:compile
[INFO] |  \- (javax.activation:activation:jar:1.1:compile - omitted for duplicate)
[INFO] +- com.jcraft:jsch:jar:0.1.53:compile
[INFO] +- org.jasypt:jasypt:jar:1.9.1:compile
[INFO] +- org.jasypt:jasypt-spring31:jar:1.9.2:compile
[INFO] |  \- (org.jasypt:jasypt:jar:1.9.2:compile - omitted for conflict with 1.9.1)
[INFO] +- org.samba.jcifs:jcifs:jar:1.3.14-kohsuke-1:compile
[INFO] +- org.opensmpp:opensmpp-core:jar:3.0.0:compile
[INFO] |  \- org.opensmpp:opensmpp-charset:jar:3.0.0:compile
[INFO] +- httpunit:httpunit:jar:1.7:compile
[INFO] |  +- (javax.servlet:servlet-api:jar:2.3:compile - omitted for conflict with 2.5)
[INFO] |  \- jtidy:jtidy:jar:4aug2000r7-dev:compile
[INFO] \- org.mozilla:rhino:jar:1.7.10:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.346 s
[INFO] Finished at: 2020-02-20T16:34:22+01:00
[INFO] Final Memory: 33M/1932M
[INFO] ------------------------------------------------------------------------
4

1 回答 1

0

我更新了两个依赖项,由于依赖项树中的冲突,我发现了它们。

    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>1.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-email</artifactId>
        <version>1.5</version>
        <!-- <version>1.1</version> -->
    </dependency>

我无法使用 hibernate-validator 的 6.1.2.Final 版本,因为 tomcat 7 存在问题。

    <!-- https://mvnrepository.com/artifact/org.hibernate.validator/hibernate-validator -->
    <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.2.0.Final</version>
            <scope>compile</scope>
    </dependency>

看起来它有所帮助,我只在编译输出中留下了字符编码错误。

字符编码问题已通过以下方式临时修复:

<properties>
    ..
    <project.build.sourceEncoding>Cp1252</project.build.sourceEncoding>
</properties>
于 2020-02-20T16:14:32.653 回答