pom.xml - build error when compiling with maven (failed to resolve artifact) -


i doing application assignment. beginner. , doing assignment modified example teacher gives me. tried compile app command line using maven. build error occured.

microsoft windows [版本 6.1.7601] 版权所有 (c) 2009 microsoft corporation。保留所有权利。  c:\users\dell>f:  f:\>cd \coit13235-s0234380-ass1\assignment 1  f:\coit13235-s0234380-ass1\assignment 1> mvn compile [info] scanning projects... [info] ------------------------------------------------------------------------ [info] building folder_a [info]    task-segment: [compile] [info] ------------------------------------------------------------------------ [warning] pom 'commons-cli:commons-cli:pom:1.0:runtime' invalid.  dependencies (if any) not available current build. [info] [resources:resources {execution: default-resources}] [warning] using platform encoding (gb18030 actually) copy filtered resources, i.e. build platform dependent! [info] copying 1 resource downloading: http://repo1.maven.org/maven2/org/eclipse/persistence/javax.persist ence/${derby-version}/javax.persistence-${derby-version}.pom [info] unable find resource 'org.eclipse.persistence:javax.persistence:pom:${ derby-version}' in repository central (http://repo1.maven.org/maven2) downloading: http://repo1.maven.org/maven2/org/eclipse/persistence/eclipselink/$ {derby-version}/eclipselink-${derby-version}.pom [info] unable find resource 'org.eclipse.persistence:eclipselink:pom:${derby- version}' in repository central (http://repo1.maven.org/maven2) downloading: http://repo1.maven.org/maven2/org/apache/derby/derbyclient/${derby- version}/derbyclient-${derby-version}.pom [info] unable find resource 'org.apache.derby:derbyclient:pom:${derby-version }' in repository central (http://repo1.maven.org/maven2) downloading: http://repo1.maven.org/maven2/org/apache/derby/derby/${derby-versio n}/derby-${derby-version}.pom [info] unable find resource 'org.apache.derby:derby:pom:${derby-version}' in repository central (http://repo1.maven.org/maven2) downloading: http://repo1.maven.org/maven2/org/eclipse/persistence/javax.persist ence/${derby-version}/javax.persistence-${derby-version}.jar downloading: http://repo1.maven.org/maven2/org/apache/derby/derbyclient/${derby- version}/derbyclient-${derby-version}.jar [info] unable find resource 'org.eclipse.persistence:javax.persistence:jar:${ derby-version}' in repository central (http://repo1.maven.org/maven2) downloading: http://repo1.maven.org/maven2/org/eclipse/persistence/eclipselink/$ {derby-version}/eclipselink-${derby-version}.jar [info] unable find resource 'org.apache.derby:derbyclient:jar:${derby-version }' in repository central (http://repo1.maven.org/maven2) downloading: http://repo1.maven.org/maven2/org/apache/derby/derby/${derby-versio n}/derby-${derby-version}.jar [info] unable find resource 'org.eclipse.persistence:eclipselink:jar:${derby- version}' in repository central (http://repo1.maven.org/maven2) [info] unable find resource 'org.apache.derby:derby:jar:${derby-version}' in repository central (http://repo1.maven.org/maven2) [info] ------------------------------------------------------------------------ [error] build error [info] ------------------------------------------------------------------------ [info] failed resolve artifact.  missing:  ---------- 1) org.eclipse.persistence:javax.persistence:jar:${derby-version}    try downloading file manually project website.    then, install using command:       mvn install:install-file -dgroupid=org.eclipse.persistence -dartifactid=ja  vax.persistence -dversion=${derby-version} -dpackaging=jar -dfile=/path/to/file    alternatively, if host own repository can deploy file there:        mvn deploy:deploy-file -dgroupid=org.eclipse.persistence -dartifactid=java  x.persistence -dversion=${derby-version} -dpackaging=jar -dfile=/path/to/file -d url=[url] -drepositoryid=[id]    path dependency:         1) task1:folders:jar:2.0         2) org.eclipse.persistence:javax.persistence:jar:${derby-version}   2) org.apache.derby:derbyclient:jar:${derby-version}    try downloading file manually project website.     then, install using command:       mvn install:install-file -dgroupid=org.apache.derby -dartifactid=derbyclie nt -dversion=${derby-version} -dpackaging=jar -dfile=/path/to/file    alternatively, if host own repository can deploy file there:        mvn deploy:deploy-file -dgroupid=org.apache.derby -dartifactid=derbyclient  -dversion=${derby-version} -dpackaging=jar -dfile=/path/to/file -durl=[url] -dr epositoryid=[id]    path dependency:         1) task1:folders:jar:2.0         2) org.apache.derby:derbyclient:jar:${derby-version}  3) org.eclipse.persistence:eclipselink:jar:${derby-version}    try downloading file manually project website.    then, install using command:       mvn install:install-file -dgroupid=org.eclipse.persistence -dartifactid=ec lipselink -dversion=${derby-version} -dpackaging=jar -dfile=/path/to/file    alternatively, if host own repository can deploy file there:        mvn deploy:deploy-file -dgroupid=org.eclipse.persistence -dartifactid=ecli pselink -dversion=${derby-version} -dpackaging=jar -dfile=/path/to/file -durl=[u rl] -drepositoryid=[id]    path dependency:         1) task1:folders:jar:2.0         2) org.eclipse.persistence:eclipselink:jar:${derby-version}  4) org.apache.derby:derby:jar:${derby-version}    try downloading file manually project website.    then, install using command:        mvn install:install-file -dgroupid=org.apache.derby -dartifactid=derby -dv  ersion=${derby-version} -dpackaging=jar -dfile=/path/to/file    alternatively, if host own repository can deploy file there:        mvn deploy:deploy-file -dgroupid=org.apache.derby -dartifactid=derby -dver sion=${derby-version} -dpackaging=jar -dfile=/path/to/file -durl=[url] -dreposit oryid=[id]    path dependency:         1) task1:folders:jar:2.0         2) org.apache.derby:derby:jar:${derby-version}  ---------- 4 required artifacts missing.  artifact:   task1:folders:jar:2.0  specified remote repositories:   central (http://repo1.maven.org/maven2)    [info] ------------------------------------------------------------------------ [info] more information, run maven -e switch [info] ------------------------------------------------------------------------ [info] total time: 1 second [info] finished at: thu aug 01 16:07:06 est 2013 [info] final memory: 8m/75m [info] ------------------------------------------------------------------------ 'cmd' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 f:\coit13235-s0234380-ass1\assignment 1> 

and part of pom.xml file.

<modelversion>4.0.0</modelversion> <groupid>task1</groupid> <artifactid>folders</artifactid> <packaging>jar</packaging> <version>2.0</version> <name>folder_a</name>  <dependencies>     <dependency>         <groupid>org.eclipse.persistence</groupid>         <artifactid>javax.persistence</artifactid>         <version>${derby-version}</version><!--<scope>provided</scope>-->     </dependency>     <dependency>         <groupid>org.eclipse.persistence</groupid>         <artifactid>eclipselink</artifactid>         <version>${derby-version}</version><!--<scope>provided</scope>-->     </dependency>     <dependency>         <groupid>org.apache.derby</groupid>         <artifactid>derbyclient</artifactid>         <version>${derby-version}</version>     </dependency>     <dependency>         <groupid>org.apache.derby</groupid>         <artifactid>derby</artifactid>         <version>${derby-version}</version><!--<scope>test</scope>-->     </dependency> </dependencies> 

looks you're missing ${derby-version} property.

you should have defined in pom as

<properties> <derby-version>your_derby_version_identifier_here</derby-version> </properties> 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -