0

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.

Shelly
  • 1,035
  • 5
  • 27
  • 51
  • 1
    If you changed the content of jwebbuild.jar then you should probably increment the version. If you expect to make more changes to it during this release cycle then give it a SNAPSHOT version (such as 1.0.1-SNAPSHOT). – Steve C Oct 08 '14 at 02:03
  • I edited my post showing that i'm using snapshot. – Shelly Oct 08 '14 at 11:32

1 Answers1

1

Try to use maven-snapshots.

What exactly is a Maven Snapshot and why do we need it?

Community
  • 1
  • 1
OhadR
  • 8,276
  • 3
  • 47
  • 53
  • did you change the version to snapshot also in the pom that is dependent on the one that u have updated? – OhadR Oct 08 '14 at 13:03