There is a project in Maven for Java. There is a library in the project dependencies, in the project source I change some classes of this library. As a result, I need to build a new version of this library, where the modified classes should replace the old ones, but not the modified ones, just to be copied. I know how to turn it in Gradle, but here it does not work.
- In fact, you need to build your version of the library, and then connect it to the project as a normal dependency. What part of this process is difficult? - Lea32
- How can I get the classes from the library to be attacked, which is in dependencies in the package being built? I mean how to set up a configuration file. I can collect new classes without problems, but I have to throw them into the jar library, replacing the old ones. And it would be desirable, that at mvn package, jar automatically with all changes gathered, that is old classes (untouched) + the changed classes. - Bagomot
- Somehow you are overly complicating the process. Let's see first what these “changed classes” are. Are they related to your project (and dependence on it)? If so, why try to shove them back into the library? It is better to import the library as it is, and leave the new classes directly in the project, shoving them into a separate package with the proud name utils, for example. If not, then you need, in essence, to make your library on the basis of the existing one, launch some Nexus or Archiva for convenience and put this artifact there, from where it will be imported. - Lea32
- Ok, I get it, thanks. - Bagomot
|