unable to run maven build on gitlab dependacy missing but present in maven central -
my pom.xml
<?xml version="1.0" encoding="utf-8"?> <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>net.domain.testapp</groupid> <artifactid>config</artifactid> <version>1.0-snapshot</version> <packaging>jar</packaging> <name>config</name> <description></description> <parent> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-parent</artifactid> <version>1.3.5.release</version> <relativepath/> <!-- lookup parent repository --> </parent> <repositories> <repository> <releases> <enabled>true</enabled> <updatepolicy>always</updatepolicy> <checksumpolicy>fail</checksumpolicy> </releases> <snapshots> <enabled>true</enabled> <updatepolicy>always</updatepolicy> <checksumpolicy>fail</checksumpolicy> </snapshots> <id>spring</id> <name>spring framework maven release repository</name> <url>https://repo.spring.io/release</url> <layout>default</layout> </repository> <repository> <releases> <enabled>true</enabled> <updatepolicy>always</updatepolicy> <checksumpolicy>fail</checksumpolicy> </releases> <snapshots> <enabled>true</enabled> <updatepolicy>always</updatepolicy> <checksumpolicy>fail</checksumpolicy> </snapshots> <id>central</id> <name>maven central</name> <url>https://repo1.maven.org/maven2</url> <layout>default</layout> </repository> <repository> <releases> <enabled>true</enabled> <updatepolicy>always</updatepolicy> <checksumpolicy>fail</checksumpolicy> </releases> <snapshots> <enabled>true</enabled> <updatepolicy>always</updatepolicy> <checksumpolicy>fail</checksumpolicy> </snapshots> <id>spring-plugin</id> <name>spring framework maven release repository</name> <url>http://repo.spring.io/plugins-release</url> <layout>default</layout> </repository> </repositories> <properties> <project.build.sourceencoding>utf-8</project.build.sourceencoding> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupid>org.springframework.cloud</groupid> <artifactid>spring-cloud-config-server</artifactid> </dependency> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-security</artifactid> </dependency> </dependencies> <dependencymanagement> <dependencies> <dependency> <groupid>org.springframework.cloud</groupid> <artifactid>spring-cloud-dependencies</artifactid> <version>brixton.sr7</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencymanagement> <build> <plugins> <plugin> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-maven-plugin</artifactid> <configuration> <finalname>config</finalname> </configuration> </plugin> </plugins> </build> </project>
i getting following error
96088 [debug] writing tracking file /builds/jigarshah/testapp/.m2/repository/javax-inject/javax-inject/1/javax-inject-1.pom.lastupdated 96089 [debug] using transporter wagontransporter priority -1.0 https://repo1.maven.org/maven2 96089 [debug] using connector basicrepositoryconnector priority 0.0 https://repo1.maven.org/maven2 96099 [debug] writing tracking file /builds/jigarshah/testapp/.m2/repository/javax-inject/javax-inject/1/javax-inject-1.pom.lastupdated 96100 [debug] using transporter wagontransporter priority -1.0 http://repo.spring.io/plugins-release 96100 [debug] using connector basicrepositoryconnector priority 0.0 http://repo.spring.io/plugins-release 96507 [debug] writing tracking file /builds/jigarshah/testapp/.m2/repository/javax-inject/javax-inject/1/javax-inject-1.pom.lastupdated 96514 [debug] skipped remote request javax-inject:javax-inject:pom:1, updated during session. 96515 [debug] skipped remote request javax-inject:javax-inject:pom:1, updated during session. 96515 [debug] skipped remote request javax-inject:javax-inject:pom:1, updated during session. 96516 [warning] unable create maven project javax-inject:javax-inject:pom:1 repository. org.apache.maven.project.projectbuildingexception: error resolving project artifact: failure find javax-inject:javax-inject:pom:1 in https://repo.spring.io/release cached in local repository, resolution not reattempted until update interval of spring has elapsed or updates forced project javax-inject:javax-inject:pom:1 @ org.apache.maven.project.defaultprojectbuilder.build(defaultprojectbuilder.java:355) @ org.apache.maven.project.defaultmavenprojectbuilder.buildfromrepository(defaultmavenprojectbuilder.java:236) @ org.apache.maven.project.defaultmavenprojectbuilder.buildfromrepository(defaultmavenprojectbuilder.java:251)
i can see artifact there on maven central
https://repo1.maven.org/maven2/javax/inject/javax.inject/1/
why not resolving ?
assuming proxy set correctly in settings.xml (it if can download other stuff maven central), need remove local version , force download again maven central.
i suggest :
1) delete local copy in home drectory .m2/repo/javax/inject/javax.inject
2) mvn clean install -u force , update.
Comments
Post a Comment