There is a third-party project based on Maven, it is going to ...
Well, let there be a library and put it in the local Maven repository.
I will name conditionally the project " lib "There is a second project, also created by third-party developers.
Also the Maven project using the library from the first project.
Let this project be called an " app ".
It was possible to figure out how to build this bundle, although not quickly: I collected the lib project at the beginning, so that it would get into the Maven repository, and only then the second one, the app , would be assembled.
BUT! .. Problem :
When the first project is changed, it seems to be reassembled and the JAR is updated to the repository.
Building the second one also seems to be done, and all its changes are compiled into a JAR. But when debugging, it turns out that the first successful build of lib is pulled, not the last.
And it’s not quite clear where from — I have already changed the project directory, cleaned the repository (the build date is updated there, new files are thrown). But for the app, these changes still don't seem to exist.
The question is how to build the modified first project ( lib ) so that the actual version would be pulled up by the second project ( app )? Or to say that I would always pull dependencies from the repository, no matter what?
Additionally, I want to clarify that in Java I program a little, until recently with NetBeans and Maven.
UPD:
The "app" connects the "lib" as follows:
<modelVersion>4.0.0</modelVersion> <!-- ... --> <packaging>pom</packaging> <!-- ... --> <properties> <!-- ... --> <customutils.version>1.1</customutils.version> <!-- ... --> </properties> <dependencyManagement> <dependencies> <!-- ... --> <dependency> <groupId>ru.company.customutils</groupId> <artifactId>customutils</artifactId> <version>${customutils.version}</version> </dependency> <!-- ... --> </dependencies> </dependencyManagement> <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <artifactId>maven-deploy-plugin</artifactId> <executions> <execution> <id>default-deploy</id> <phase>deploy</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> <configuration> <skip>true</skip> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>2.2.1</version> <executions> <execution> <goals> <goal>jar-no-fork</goal> </goals> <phase>package</phase> </execution> </executions> </plugin> </plugins> </build>