vlio20
vlio20

Reputation: 9295

Error in pom file after adding external jar to project

I have created my own jar file and I included it into my project by running:

mvn install:install-file -Dfile=/Users/vladioffe/git/evappcom/evappcom/evapcom-1.0.jar -DgroupId=com.evapp.code -DartifactId=evappcom -Dversion={1.0} -Dpackaging=jar

The build succeeded - here is the output:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building EvApp_Server 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ EvApp_Server ---
[INFO] Installing /Users/vladioffe/git/evappcom/evappcom/evappcom-1.0.jar to /Users/vladioffe/.m2/repository/com/evapp/code/evappcom/{1.0}/evappcom-{1.0}.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.557s
[INFO] Finished at: Tue Jan 21 14:46:32 IST 2014
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------

When I have added the dependency to the pom file I encountered an error, here is the dependency:

<dependency>
    <groupId>com.evapp.code</groupId>
    <artifactId>evappcom</artifactId>
    <version>1.0</version>
</dependency>

And the error I see near the <dependency> tag is:

Missing artifact com.evapp.code:evappcom:jar:
 1.0

I tried to:

  1. Restart eclipse
  2. Clean project
  3. re-install jar
  4. disable and enable Maven
  5. Update Project

Thanks!

Upvotes: 2

Views: 58

Answers (1)

Eugene
Eugene

Reputation: 120848

Version is not supposed to be in brackets:

 -Dversion={1.0} // it must be -Dversion=1.0

Upvotes: 4

Related Questions