提问者:小点点

如何用丢失的神器修复我的POM?


我对一个不是我的POM有意见。给你。

<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>
    <parent>
        <groupId>com.sms.smsoffice</groupId>
        <artifactId>sms-office</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

    <artifactId>sms-office-ui</artifactId>
    <packaging>jar</packaging>
    <name>sms office ui</name>
    <description>sms office ui</description>

    <build>
        <resources>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/java</directory>
                <targetPath>${project.build.outputDirectory}</targetPath>
                <includes>
                    <include>**</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/resources</directory>
                <targetPath>${project.build.outputDirectory}/resources</targetPath>
                <includes>
                    <include>**</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>make shared resources</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/resources.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- Project Internal Dependencies -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sms-office-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- External dependencies -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
        </dependency>
        <dependency>
            <groupId>org.apache.wicket</groupId>
            <artifactId>wicket</artifactId>
            <version>${wicket.version}</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.wicket</groupId>
            <artifactId>wicket-extensions</artifactId>
            <version>${wicket.version}</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.wicket</groupId>
            <artifactId>wicket-datetime</artifactId>
            <version>1.4.3</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.wicket</groupId>
            <artifactId>wicket-auth-roles</artifactId>
            <version>${wicket.auth-roles.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.wicket</groupId>
            <artifactId>wicket-spring</artifactId>
            <version>1.4.7</version>
        </dependency>
    </dependencies>
</project>

这是错误:缺少工件javax.交易:jta: jar:1.0.1B

无法将javax. jms:jms:jar:1.1从缓存在本地存储库中的https://maven-repository.dev.java.net/nonav/repository传输,在java.net的更新间隔过去或强制更新之前,不会重新尝试解析。原始错误:无法将工件javax.jms:jms:jar:1.1从/传输到java.net(https://maven-repository.dev.java.net/nonav/repository):无法使用可用的连接器访问具有旧式类型的https://maven-repository.dev.java.net/nonav/repository工厂:AetherRepositoryConnectorFactory,BasicRepositoryConnectorFactory

请帮帮忙


共3个答案

匿名用户

如果你真的想要javax. trade:jta:jar:1.0.1B工件,它在这里可用,所以你可以在pom中添加http://mirrors.ibiblio.org/maven/mule/dependencies/maven2/作为存储库让maven下载它,或者手动下载并自己安装它。

但是你应该做的是将你的log4j版本升级到1.2.17,因为1.2.15有不好的元数据。你也可能想要依赖org. apache.wicket:wicket-core而不是org.apache.wicket:wicket,因为org.apache.wicket:wicket是一个聚合器项目,而不是一个jar。

匿名用户

尝试将此依赖项添加到POM:

<dependency>
    <groupId>javax.transaction</groupId>
    <artifactId>jta</artifactId>
    <version>1.0.1B</version>
</dependency>

匿名用户

只需简单地从有问题的依赖关系中排除jta工件。例如:

        <dependency>
            <groupId>org.codehaus.castor</groupId>
            <artifactId>castor</artifactId>
            <version>1.1</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>