Use open source Chinese third-party Maven library

If you are having this issue with OSC Maven:

[ERROR] Failed to execute goal on project ...: Could not resolve dependencies for project ...: The following artifacts could not be resolved: com.smart:smart-framework:jar:1.0, ...: Failure to find com.smart:smart-framework:jar:1.0 in http://maven.oschina.net/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of osc has elapsed or updates are forced -> [Help 1]  

Maybe this article will help you solve this problem.

It is understood that OSC Maven has put all third-party jar packages into a separate warehouse. The address of the warehouse is as follows:

http://maven.oschina.net/content/repositories/thirdparty/

In order to prevent conflicts when synchronizing with the central repository, currently the thirdparty repository has no intersection with the public repository, which means they are completely independent, and public no longer includes thirdparty.

So you need to do the following configuration in your own setting.xml (note the green text):

Configure mirror

<mirrors>
...
        <mirror>
            <id>osc</id>
            <mirrorOf>central</mirrorOf>
            <url>http://maven.oschina.net/content/groups/public/</url>
        </mirror>
        <mirror>
            <id>osc_thirdparty</id>
            <mirrorOf>thirdparty</mirrorOf>
            <url>http://maven.oschina.net/content/repositories/thirdparty/</url>
        </mirror>
...
</mirrors>

configuration profile

<profiles>
...
        <profile>
            <id>osc</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>osc</id>
                    <url>http://maven.oschina.net/content/groups/public/</url>
                </repository>
                <repository>
                    <id>osc_thirdparty</id>
                    <url>http://maven.oschina.net/content/repositories/thirdparty/</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>osc</id>
                    <url>http://maven.oschina.net/content/groups/public/</url>
                </pluginRepository>
            </pluginRepositories>
        </profile>
...
</profiles>

 

Welcome to the OSC Maven repository:   maven.oschina.net  

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326578245&siteId=291194637