0

I would like to add the following jar

gson-extras-1.0-SNAPSHOT.jar

the jar structure is the following

enter image description here

looking at the manifest the version is

Manifest-Version: 1.0

the pom is the following

<repositories>
        <repository>
            <id>grupoicarep</id>
            <url>file:///C:/stix/stix_ica/stix2/lib/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>com.google.gson</groupId>
            <artifactId>typeadapters</artifactId>
            <version>0.1</version>
        </dependency>
    

but it shows the following error:

Failed to execute goal on project stix2: Could not resolve dependencies for project es.grupoica:stix2:jar:0.0.1-SNAPSHOT: Failure to find com.google.gson:typeadapters:jar:0.1 in file:///C:/stix/stix_ica/stix2/lib/ was cached in the local repository, resolution will not be reattempted until the update interval of grupoicarep has elapsed or updates are forced -> [Help 1] [ERROR]

I have tried many combinations but I am just guessing and not getting the right result

I don´t know what I am doing wrong

many thanks in advance

Ana

AnaGutiFontan
  • 19
  • 1
  • 4
  • Where is the given dependency `typeadapters` coming from? If it's coming from google you have to use the correct repository which is obviously not the case. – khmarbaise Aug 24 '21 at 14:54

1 Answers1

0

Use below dependency to include the jar available in the local machine to maven.

<dependency>    
  <groupId>groupid</groupId>    
  <artifactId>artifactid</artifactId>   
  <version>1.0</version>    
  <scope>system</scope> 
  <systemPath>${basedir}\lib\JAR_NAME.jar</systemPath>  
</dependency>
Nagaraju Chitimilla
  • 530
  • 3
  • 7
  • 23
  • 3
    System scope is deprecated. Use `mvn install:install-file` to install the library in to your local repository. Ref:[How to add local jar files to a Maven project?](https://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-to-a-maven-project) – seenukarthi Aug 24 '21 at 09:40