سؤال

I am newbie using maven m2e plugin in my eclipse and JFrog Artifactory.

As given in the instructions I downloaded JFrog Artifactory war and deployed it using Tomcat 8 Windows installer service. I am using windows 8.1 64 bit OS.

Once the artifactory been deployed through tomcat i added some jars required for my project through Deploy option in artifactory into ext-release-local and maven-clean, other such jars to plugins-relase-local.

Then i generated settings.xml file and copied it to .m2 file. My settings.xml file consists of

<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
    <profiles>
        <profile>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>central</id>
                    <name>libs-release</name>
                    <url>http://localhost:8082/artifactory/libs-release</url>
                </repository>
                <repository>
                    <snapshots/>
                    <id>snapshots</id>
                    <name>libs-snapshot</name>
                    <url>http://localhost:8082/artifactory/libs-snapshot</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>central</id>
                    <name>plugins-release</name>
                    <url>http://localhost:8082/artifactory/plugins-release</url>
                </pluginRepository>
                <pluginRepository>
                    <snapshots/>
                    <id>snapshots</id>
                    <name>plugins-snapshot</name>
                    <url>http://localhost:8082/artifactory/plugins-snapshot</url>
                </pluginRepository>
            </pluginRepositories>
            <id>artifactory</id>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>artifactory</activeProfile>
    </activeProfiles>
</settings>

And then when I tried to clean install -X -e the project I am getting the following exceptions.

[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Failure to find org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 in http://localhost:8082/artifactory/plugins-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1

How to integrate Artifactory with Maven.

  1. The primary goal is only for the very first time the jars and other dependencies should be fetched from central repository, all other times the jars should be fetched from local repos.

  2. how to deploy jars in bundle. Example : Deploying all jars of spring 4.X in a single deployment process.

  3. Any guide or proper documentation or rules of thumb explaining proper way of maintaining repositories etc.,

  4. How to change admin username and password of Artifactory. creating multiple users in Artifactory with user defined roles. etc.,

  5. More very simple best practices/ tutorial explaining how to configure and use Artifactory with Maven

  6. One more issue with the Artifactory web UI is its often freezing and when i check it out with the tomcat service in task manager the tomcat freezes with 'stopping..'. And ended up in connection reset error in browser. I cant stop the service immediately through tomcat configurer. The tomcat is taking too long time to stop and restart. Any clues to properly use tomcat deploy?

Thanks

هل كانت مفيدة؟

المحلول

Your Artifactory should proxy external repositories with the most common artifacts and plugins. E.g. the maven-clean-plugin should be resolved without any problems. If Artifactory is behind proxy, you should configure it in the Admin screen as described in the User Guide.

I would generally suggest going though it, it should answer all the mentioned questions.

Regarding freezes - if you deployed the war into existing Tomcat installation without configuring its JVM paramteres, the freezes you see are full GC cycles - you are running out of memory. That brings us to the User Guide again.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top