0

I'm trying to build a project which contains the following 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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <build>
    <plugins>
        <plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-java2ws-plugin</artifactId>
            <dependencies>
                <dependency>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-rt-frontend-jaxws</artifactId>
                    <version>${cxf.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-rt-frontend-simple</artifactId>
                    <version>${cxf.version}</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
    <pluginManagement>
        <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.cxf</groupId>
                                    <artifactId>
                                        cxf-java2ws-plugin
                                    </artifactId>
                                    <versionRange>
                                        [2.4.1-fuse-00-43,)
                                    </versionRange>
                                    <goals>
                                        <goal>java2ws</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
  </build>
</project>

But I get the following error, which I don't understand:

[ERROR] Plugin org.apache.cxf:cxf-java2ws-plugin:2.4.3-fuse-01-02 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.cxf:cxf-java2ws-plugin:jar:2.4.3-fuse-01-02: Could not find artifact org.apache.cxf:cxf-java2ws-plugin:pom:2.4.3-fuse-01-02 in central (http://repo.maven.apache.org/maven2) -> [Help 1]

Can you please help me to understand how to fix it ?

3 Answers 3

1

From the error, we can see that a dependency could not be resolved.

There must be something wrong with one of your dependencies' configuration.

For the first dependency write this:

<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.7.0</version>

And for the second one write this:

<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>2.7.0</version>


P.S: You can always check a specific library's configuration using here.

Sign up to request clarification or add additional context in comments.

2 Comments

I changed the versions as you said and I run a clean install with the -U option, but I still get the following error: [ERROR] Plugin org.apache.cxf:cxf-java2ws-plugin:2.4.3-fuse-01-02 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.cxf:cxf-java2ws-plugin:jar:2.4.3-fuse-01-02: Could not find artifact org.apache.cxf:cxf-java2ws-plugin:pom:2.4.3-fuse-01-02 in central (repo.maven.apache.org/maven2) -> [Help 1]
Is your server connected to internet?
1

Try deleting the org.apache.cfx group from your local repository. If that does not help, run maven with -X switch. Open the url of the artifact in a browser and verify that the file is present at the repository and that its pom.xml is valid.

Comments

0

i faced this issue , when i did a build path to my project for one of the jar file and my project already had the same jar file . when i deleted the external attached jar file from configure build path , libraries. Issue got resolved . enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.