java - Problems with Maven -


this question has answer here:

i following error when want run "mvn deploy" in project:

[info] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ jimp --- [info] downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar [info] downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.6/plexus-utils-1.5.6.jar (245 kb @ 188.8 kb/sec) [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 17.973 s [info] finished at: 2014-12-16t10:35:39+01:00 [info] final memory: 24m/226m [info] ------------------------------------------------------------------------ [error] failed execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project jimp: deployment failed: repository element not specified in pom inside distributionmanagement element or in -daltdeploymentrepository=id::layout::url parameter -> [help 1] [error]  [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error]  [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojoexecutionexception 

my pom-file looks that:

<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">     <modelversion>4.0.0</modelversion>     <groupid>jimp</groupid>     <artifactid>jimp</artifactid>     <version>0.0.1-snapshot</version>     <build>         <sourcedirectory>src</sourcedirectory>         <plugins>             <plugin>                 <artifactid>maven-compiler-plugin</artifactid>                 <version>3.1</version>                 <configuration>                     <source>1.7</source>                     <target>1.7</target>                 </configuration>             </plugin>         </plugins>     </build>     <dependencies>         <dependency>             <groupid>org.apache.xmlbeans</groupid>             <artifactid>xmlbeans</artifactid>             <version>2.6.0</version>         </dependency>         <dependency>             ....         </dependency>     </dependencies> </project> 

in project using bunch of jar-files (like swt, log4j , on, own libraries). of these added local repository (my own libs added mvn install:install-file ..) , in depedencies of pom.. in eclipse project "knows" imports, code looks fine, has no errors or that..

if run

mvn package 

and executing jar

java -cp target\jimp-0.0.1-snapshot.jar de.my.path.jimp 

he throws classnotfoundexception because couldn't find class of own lib.. lib added local repository , depedency in pom-file.. :/

maybe me..!!

i appreciate much!

for mvn deploy issue

you need provide repository address want deploy arfifact in pom.xml below

<distributionmanagement>   <repository>     <id>mycompany-repository</id>     <name>mycompany repository</name>     <url>your repository url</url>   </repository> </distributionmanagement> 

to run maven artifact jar, need use mvn exec command, includes jars mentioned in pom.xml in classpath. see example below

mvn exec:java -dexec.mainclass="de.my.path.jimp" 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -