Module 37 - Apache Maven | Selenium Forum
M
Posted on 11/08/2016
Hi,
When i import Jars file into my Maven project --- > for that i add one more <artifactId> with latest Selenium Version. and again compile these jars using [b:swyy1uie]mvn compile[/b:swyy1uie] command into command prompt it give below error. so please help me to solve this.

Error :-


Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
iler-manager/2.2/plexus-compiler-manager-2.2.pom (690 B at 1.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-com
piler-javac/2.2/plexus-compiler-javac-2.2.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
iler-javac/2.2/plexus-compiler-javac-2.2.pom (769 B at 1.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-com
pilers/2.2/plexus-compilers-2.2.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
ilers/2.2/plexus-compilers-2.2.pom (2 KB at 2.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-con
tainer-default/1.5.5/plexus-container-default-1.5.5.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-cont
ainer-default/1.5.5/plexus-container-default-1.5.5.pom (3 KB at 4.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-cla
ssworlds/2.2.2/plexus-classworlds-2.2.2.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-clas
sworlds/2.2.2/plexus-classworlds-2.2.2.pom (4 KB at 6.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/xbean/xbean-reflect
/3.4/xbean-reflect-3.4.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/xbean/xbean-reflect/
3.4/xbean-reflect-3.4.pom (3 KB at 4.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/xbean/xbean/3.4/xbe
an-3.4.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/xbean/xbean/3.4/xbea
n-3.4.pom (19 KB at 30.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/log4j/log4j/1.2.12/log4j-1.2.1
2.pom
Downloaded: https://repo.maven.apache.org/maven2/log4j/log4j/1.2.12/log4j-1.2.12
.pom (145 B at 0.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-logging/commons-loggin
g-api/1.1/commons-logging-api-1.1.pom
Downloaded: https://repo.maven.apache.org/maven2/commons-logging/commons-logging
-api/1.1/commons-logging-api-1.1.pom (6 KB at 8.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/com/google/collections/google-
collections/1.0/google-collections-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/com/google/collections/google-c
ollections/1.0/google-collections-1.0.pom (3 KB at 4.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/com/google/google/1/google-1.p
om
Downloaded: https://repo.maven.apache.org/maven2/com/google/google/1/google-1.po
m (2 KB at 2.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.
pom
Downloaded: https://repo.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.p
om (747 B at 1.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-
api/2.0.9/maven-plugin-api-2.0.9.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-core/2.
0.9/maven-core-2.0.9.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifac
t/2.0.9/maven-artifact-2.0.9.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-setting
s/2.0.9/maven-settings-2.0.9.jar
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-uti
ls/1.5.1/plexus-utils-1.5.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-a
pi/2.0.9/maven-plugin-api-2.0.9.jar (13 KB at 21.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-
parameter-documenter/2.0.9/maven-plugin-parameter-documenter-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings
/2.0.9/maven-settings-2.0.9.jar (48 KB at 65.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile
/2.0.9/maven-profile-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-core/2.0
.9/maven-core-2.0.9.jar (156 KB at 157.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2
.0.9/maven-model-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact
/2.0.9/maven-artifact-2.0.9.jar (87 KB at 87.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-reposit
ory-metadata/2.0.9/maven-repository-metadata-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-p
arameter-documenter/2.0.9/maven-plugin-parameter-documenter-2.0.9.jar (21 KB at
17.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-error-d
iagnostics/2.0.9/maven-error-diagnostics-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/
2.0.9/maven-profile-2.0.9.jar (35 KB at 25.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project
/2.0.9/maven-project-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-reposito
ry-metadata/2.0.9/maven-repository-metadata-2.0.9.jar (24 KB at 15.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-
registry/2.0.9/maven-plugin-registry-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
s/1.5.1/plexus-utils-1.5.1.jar (206 KB at 124.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-
descriptor/2.0.9/maven-plugin-descriptor-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-error-di
agnostics/2.0.9/maven-error-diagnostics-2.0.9.jar (14 KB at 7.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifac
t-manager/2.0.9/maven-artifact-manager-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.
0.9/maven-model-2.0.9.jar (86 KB at 45.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-monitor
/2.0.9/maven-monitor-2.0.9.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-r
egistry/2.0.9/maven-plugin-registry-2.0.9.jar (29 KB at 12.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-toolcha
in/1.0/maven-toolchain-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-d
escriptor/2.0.9/maven-plugin-descriptor-2.0.9.jar (37 KB at 15.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
shared-utils/0.1/maven-shared-utils-0.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/
2.0.9/maven-project-2.0.9.jar (119 KB at 51.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr30
5/2.0.1/jsr305-2.0.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-monitor/
2.0.9/maven-monitor-2.0.9.jar (11 KB at 4.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-
shared-incremental/1.1/maven-shared-incremental-1.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact
-manager/2.0.9/maven-artifact-manager-2.0.9.jar (57 KB at 21.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-com
piler-api/2.2/plexus-compiler-api-2.2.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-toolchai
n/1.0/maven-toolchain-1.0.jar (33 KB at 11.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-com
piler-manager/2.2/plexus-compiler-manager-2.2.jar
Downloaded: https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305
/2.0.1/jsr305-2.0.1.jar (32 KB at 10.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-com
piler-javac/2.2/plexus-compiler-javac-2.2.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-s
hared-incremental/1.1/maven-shared-incremental-1.1.jar (14 KB at 4.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-con
tainer-default/1.5.5/plexus-container-default-1.5.5.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
iler-api/2.2/plexus-compiler-api-2.2.jar (25 KB at 7.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-cla
ssworlds/2.2.2/plexus-classworlds-2.2.2.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
iler-manager/2.2/plexus-compiler-manager-2.2.jar (5 KB at 1.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/xbean/xbean-reflect
/3.4/xbean-reflect-3.4.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-s
hared-utils/0.1/maven-shared-utils-0.1.jar (151 KB at 43.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/log4j/log4j/1.2.12/log4j-1.2.1
2.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
iler-javac/2.2/plexus-compiler-javac-2.2.jar (19 KB at 5.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-logging/commons-loggin
g-api/1.1/commons-logging-api-1.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/xbean/xbean-reflect/
3.4/xbean-reflect-3.4.jar (131 KB at 32.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/com/google/collections/google-
collections/1.0/google-collections-1.0.jar
Downloaded: https://repo.maven.apache.org/maven2/commons-logging/commons-logging
-api/1.1/commons-logging-api-1.1.jar (44 KB at 10.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.
jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-clas
sworlds/2.2.2/plexus-classworlds-2.2.2.jar (46 KB at 10.8 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-cont
ainer-default/1.5.5/plexus-container-default-1.5.5.jar (212 KB at 49.9 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/com/google/collections/google-c
ollections/1.0/google-collections-1.0.jar (625 KB at 97.7 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/log4j/log4j/1.2.12/log4j-1.2.12
.jar (350 KB at 47.4 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.j
ar (118 KB at 15.5 KB/sec)
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\user\maven\MyMavenProject\target\clas
ses
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.709 s
[INFO] Finished at: 2016-08-11T22:14:33+05:30
[INFO] Final Memory: 15M/135M
[INFO] ------------------------------------------------------------------------

[b:swyy1uie]C:\Users\user\maven\MyMavenProject>mvn complie
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MyMavenProject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.217 s
[INFO] Finished at: 2016-08-11T22:23:53+05:30
[INFO] Final Memory: 4M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "complie". You must specify a valid lifecycle ph
ase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-
artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate
, initialize, generate-sources, process-sources, generate-resources, process-res
ources, compile, process-classes, generate-test-sources, process-test-sources, g
enerate-test-resources, process-test-resources, test-compile, process-test-class
es, test, prepare-package, package, pre-integration-test, integration-test, post
-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-si
te, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhase
NotFoundException

C:\Users\user\maven\MyMavenProject>mvn complie
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MyMavenProject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.211 s
[INFO] Finished at: 2016-08-11T22:24:20+05:30
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "complie". You must specify a valid lifecycle ph
ase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-
artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate
, initialize, generate-sources, process-sources, generate-resources, process-res
ources, compile, process-classes, generate-test-sources, process-test-sources, g
enerate-test-resources, process-test-resources, test-compile, process-test-class
es, test, prepare-package, package, pre-integration-test, integration-test, post
-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-si
te, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhase
NotFoundException

C:\Users\user\maven\MyMavenProject>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MyMavenProject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.450 s
[INFO] Finished at: 2016-08-11T22:31:31+05:30
[INFO] Final Memory: 8M/84M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project MyMavenProject: Could not resolve depe
ndencies for project com.testing:MyMavenProject:jar:1.0-SNAPSHOT: Failure to fin
d org.seleniumhq.selenium:selenium-parent:jar:2.53.1 in https://repo.maven.apach
e.org/maven2 was cached in the local repository, resolution will not be reattemp
ted until the update interval of central has elapsed or updates are forced -> [H
elp 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException

C:\Users\user\maven\MyMavenProject>mvn complie
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MyMavenProject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.228 s
[INFO] Finished at: 2016-08-11T22:37:26+05:30
[INFO] Final Memory: 7M/85M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "complie". You must specify a valid lifecycle ph
ase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-
artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate
, initialize, generate-sources, process-sources, generate-resources, process-res
ources, compile, process-classes, generate-test-sources, process-test-sources, g
enerate-test-resources, process-test-resources, test-compile, process-test-class
es, test, prepare-package, package, pre-integration-test, integration-test, post
-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-si
te, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhase
NotFoundException[/b:swyy1uie]

C:\Users\user\maven\MyMavenProject>

M
Replied on 12/08/2016

your dependency is wrong. use this

[code:x0uoxsg3]<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.0</version>
</dependency>
[/code:x0uoxsg3]

it is written right here you'll have to start reading the errors now
[color=#FF0000:x0uoxsg3]MyMavenProject: Could not resolve depe
ndencies for project com.testing:MyMavenProject:jar:1.0-SNAPSHOT: Failure to fin
d org.seleniumhq.selenium:selenium-parent:jar:2.53.1[/color:x0uoxsg3]
maven cannot find this repo