Shelly
Shelly

Reputation: 1035

jar file is not updated in main project maven

I have a "sub-project" with a lot of Util Class for another main projects, i export this to a "jar" file and i use a maven command to import this with pom.xml.

See my maven command:

mvn install:install-file -Dfile=/home/ronaldo/workspace/libs/jwebbuild.jar -DgroupId=br.com.jwebbuild -DartifactId=jwebbuild -Dversion=1.0 -Dpackaging=jar

With this command i can use this inside a pom.xml, like this:

<dependency>
            <groupId>br.com.jwebbuild</groupId>
            <artifactId>jwebbuild</artifactId>
            <version>1.0</version>
        </dependency>

THe problem is i changed the jwebbuild project (something inside a class), export to jar and re-install with maven but in "Maven Dependencies", in my Main project, the jwebbuil.jar don't change. I tried build and clean, maven clean and update project manually, close eclipse and open again but nothing work. The jwebbuild.jar don't change in my Maven Dependencies.

Edit 1

I think my project have SNAPSHOT "ON". The header of my pom.xml:

<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>br.com.jwebbuild</groupId>
  <artifactId>jwebbuild</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>Java Web Build</name>

SOLUTION

The solution was another not expected. I deleted the files in /home/ronaldo/.m2/repository/br/com/jwebbuild/jwebbuild/1.0 and use "maven install" command again, now everything was updated. Thanks everyone.

Upvotes: 0

Views: 6028

Answers (1)

Related Questions