0

I tried to run mvn clean insatll and I got any error

plugin:jar:1.0.0 in 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 – 

The issue is with the pom.xml

<plugin> <groupId>myGroupId</groupId> <artifactId>my-artifactId</artifactId> <version>$1.0.0</version> <executions> <execution> <phase>generate-resources</phase> <goals> <goal>mygoal</goal> </goals> </execution> </executions> </plugin> 

when I removed this plugin and added only dependency for this artifactId it worked. When I tried to add also the dependencies and the plugin sections I got the same error

My settigns.xml

<interactiveMode>false</interactiveMode> <localRepository>/../.../</localRepository> <profiles> <profile> <repositories> <repositorty> <id>..</id> <url>..</url> </repositorty> </profile> </profiles> <activeProfiles> .... </activeProfiles> 

Could you help me why I got this error ?

1 Answer 1

1

Try running mvn -U clean install

What does the error mean ?

According to default updatePolicy of maven.Maven will fetch the jars from repo on daily basis.So if during 1st attempt your internet was not working then it would not try to fetch this jar again until 24hours spent. That's why the error message.

By forcing update you are trying to fetch the plugin jar from the remote repository and caching it in your local maven repo

Also check the below things as the error is misleading

Things you might want to check for resolution:

1) Is there an actual JAR for the dependency in the repo? If not, you need to change your dependency. (for example, you could be pointing at a top level parent dependency, when you should be pointing at a sub project)

2) If the jar exists on the remote repo, then just delete your local copy. It will be in your home directory (unless you configured differently) under .m2/repository (ls -a to show hidden if on Linux). Hope this helps

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

4 Comments

It didn't work I still got the same error. The attrifcats is exist on my private repo and not in public nexus therefore I used the settings.xml to look the arrifcats in this location. I tried to remove also the localRepository and it didn't work
The issue occur only for plugin if I added it as dependency then I succeed to get the atrifcats . do I need to change the settings.xml ?
If it is not available in the remote repository then i think you will have to change the remote repo mirror in settings.xml
yes it is not available in the remote and it is ok , what do you mean change the repo mirror in the settings.xml ?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.