How to add the jars needed to compile the maven project if they were never built using pom?

I am just starting with maven, starting with years of work with Ant. Now I am trying to complete the basic task, creating a simple project that requires some libraries from the provider. I have banks in src \ main \ resources \ VENDORNAME. When I run mvn compilation, it does not work when compiling, saying that libraries do not exist. I cannot add them as dependencies because I do not know their version number and, since they are property, I can not find them in ibiblio or elsewhere. Without these Jars, I cannot compile my classes.
Is there a way to use banks that did not comply with the Maven convention? I may not understand if this is correct, so any guidance is appreciated. Thanks so much for any answers.

+5
source share
2 answers

I would write my own POM file for these jars and add them to your repository. There should be nothing fancy, just a POM file with bare bones. That way you can enable them without breaking the "Maven Path".

If you want Maven to automatically generate one for you and install it in a local repo, you can use this command:

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
    -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
+4
source

- - ​​.. , , , (, , , -maven). POM, JAR, /:

<project ...>
...
        <dependency>
            <groupId>com.ascentialsoftware</groupId>
            <artifactId>tr4j</artifactId>
            <version>8.1</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/tr4j.jar</systemPath>
        </dependency>
...
</project>

ehm, , "Maven: ", - . , , .

0

All Articles