簡體   English   中英

如何修復丟失神器的POM?

[英]How to repair my POM with missing artifact?

我有一個不是我的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.transaction:jta:jar:1.0.1B

無法從https://maven-repository.dev.java.net/nonav/repository傳輸javax.jms:jms:jar:1.1被緩存在本地存儲庫中,直到java.net的更新間隔才會重新嘗試解析已經過去或強制更新。 原始錯誤:無法傳輸工件javax.jms:jms:jar:1.1 from / to java.net( https://maven-repository.dev.java.net/nonav/repository ):無法訪問https:// maven- repository.dev.java.net/nonav/repository使用可用的連接器工廠,傳統型:AetherRepositoryConnectorFactory,BasicRepositoryConnectorFactory

請幫忙

如果你真的想要javax.transaction:jta:jar:1.0.1B工件,它可以在這里找到 ,所以你可以添加http://mirrors.ibiblio.org/maven/mule/dependencies/maven2/作為存儲庫你的pom有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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM