When I imported Existing Maven Projects
downloaded from open-source-website(eg. Apache, Github) into Eclipse
, Several errors happened :( . Note that, all maven projects can correctly compile and test under the Eclipse.
- Firstly, after importing maven projects into Eclipse, there will be a
red X
on the project icon, but there are no error in projects. I found there existparent
node inpom.xml
file. I deleted the node then the error is gone, I want to know why since there is no module in maven project. the following code is the node I deleted before.
<parent> <groupId> org.apache.commons </groupId> <artifactId> commons-parent </artifactId> <version> 38</version> </parent>
Next, In the project
jaxen
, this project's structure is odd. In the project I just foundsrc/java/main
andsrc/java/test
rather than src/main/java and src/test/java, is there any other configuration I should do even though it can correctly run under Eclipse?What's more, I also found errors in code sources of
jaxen
, See this picture, the error information is partial given as follows, look for your help and thanks in advance :)
Failure to transfer xerces:xmlParserAPIs:jar:2.6.2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact xerces:xmlParserAPIs:jar:2.6.2 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled. org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer xerces:xmlParserAPIs:jar:2.6.2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact xerces:xmlParserAPIs:jar:2.6.2 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled. at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:238) at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
jaxen
project when I import it. – Yongfeng