Maven Tutorial
Introduction to Maven Installation and environment configuration Maven settings Standard directory structure in Maven project command line IntelliJ IDEA Super POM and Parent POM Understanding POM.xml file Declaring maven dependencies Dependency management using repositories in Maven Adding jar file as a dependency in Maven Maven archetypes Maven build life cycle, phases and goals Generating project API documentation Generating Site documentation for a project Installing artifacts in local repository Deploying the artifact on remote repository Maven plug-ins surefire plugin compiler plugin Profiles in MavenExecuting Maven phases and goals through command prompt Maven command line optionsexec-maven-plugin usage Skipping tests in Maven Test execution report in MavenRepositories in Maven
Maven searches for artifacts in 3 repositories.- Local ( userHomeDirectory/.m2/repository )
- Central (https://repo1.maven.org/maven2/)
- Remote repositories (if any specified)
could not find the artifact.
[ERROR] Failed to execute goal on project xyz: Could not resolve
dependencies for project xyz:jar:1.0-SNAPSHOT: Could not find artifact
org.seleniumhq.selenium:selenium-java1:jar:2.52.0 in repository1
But if that artifact is available in different repository, you can add that repository in POM file using repository tag so that maven will search there. Please note that you can also add repositories in settings.xml file
<repositories>
<repository>
<id>org.softpost</id>
<url>https://softpost.org/repositories/public/</url>
</repository>
<repository>
<id>xyz.lib</id>
<url>https://download.xyz/lib</url>
</repository>
</repositories>
Web development and Automation testing
solutions delivered!!