How to get the list of jars downloaded from a specific repository out of many defined in pom.xml - pom.xml

I have the following repositories defined in my pom.xml.
<repositories>
<repository>
<id>spring-maven-release</id>
<name>Spring Maven Release Repository</name>
<url>http://maven.springframework.org/release</url>
</repository>
<repository>
<id>spring-maven-milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
<repository>
<id>spring-roo-repository</id>
<name>Spring Roo Repository</name>
<url>http://spring-roo-repository.springsource.org/release</url>
</repository>
<repository>
<id>xxxx-repo.snapshot</id>
<name>iGV Snapshot Repository</name>
<url>http://mavenrepo.XXXX.com/maven2</url>
</repository>
Is there a way to know the jars that are downloaded from http://mavenrepo.XXXX.com/maven2 in the above pom.xml?

Yes you can check by following steps:
Right click on project explorer folder n click on new.
Click on others,select maven new project.
Click next,choose default work-space.
Now you can see list of archetypes these are nothing but dependencies that comes with maven.

Related

Missing artifact com.epam.reportportal:agent-java-testng:jar:5.0.4

While integrating the report portal with your testng project, we need epam.reportpotal dependencies, On adding the reportportal dependency I am facing the following error in pom.xml dependency :
it says : Missing artifact com.epam.reportportal:agent-java-testng:jar:5.0.4
To resolve this you need to add the following repositories in your pom.xml file as mentioned on github(https://github.com/reportportal/agent-java-testNG)
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-epam-reportportal</id>
<name>bintray</name>
<url>http://dl.bintray.com/epam/reportportal</url>
</repository>
</repositories>

Create local remote repository using Maven

I am using Maven for build and Jenkins for CI/CD. For production, need to keep all my Maven build jars in my remote repository, I am adding my local repository by
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<url>http://10.16.70.55:9001/var/lib/jenkins/.m2/repository</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>snapshots</id>
<name>Archiva Managed Snapshot Repository</name>
<url>http://10.16.70.55:9001/var/lib/jenkins/.m2/repository</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Is this the correct way? Does Jenkins provide remote repository? Is there any other tools which we can use?
Have you looked at using an actual repository manager tool like Nexus OSS or JFrog Artifactory ?

SpatialRepository in Embedded Neo4j

Can someone answer this question. Is it possible to have the spatial repository in a spring boot app in embedded mode?
#Bean
public GraphDatabaseService graphDatabaseService() {
return new GraphDatabaseFactory().newEmbeddedDatabase("neo4j.db");
}
by just adding the
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-spatial</artifactId>
<version>0.9</version>
</dependency>
to your classpath?
I keep getting the error
Caused by: java.lang.IllegalArgumentException: No index provider 'spatial' found. Maybe the intended provider (or one more of its dependencies) aren't on the classpath or it failed to load.
at org.neo4j.kernel.impl.coreapi.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:91)
at org.neo4j.kernel.impl.coreapi.IndexManagerImpl.findIndexConfig(IndexManagerImpl.java:142)
at org.neo4j.kernel.impl.coreapi.IndexManagerImpl.getOrCreateIndexConfig(IndexManagerImpl.java:209)
at org.neo4j.kernel.impl.coreapi.IndexManagerImpl.getOrCreateNodeIndex(IndexManagerImpl.java:314)
at org.neo4j.kernel.impl.coreapi.IndexManagerImpl.forNodes(IndexManagerImpl.java:302)
at org.springframework.data.neo4j.support.DelegatingGraphDatabase.createIndex(DelegatingGraphDatabase.java:163)
at org.springframework.data.neo4j.support.index.IndexProviderImpl.createIndex(IndexProviderImpl.java:91)
at org.springframework.data.neo4j.support.index.IndexProviderImpl.getIndex(IndexProviderImpl.java:68)
at org.springframework.data.neo4j.support.index.IndexProviderImpl.getIndex(IndexProviderImpl.java:108)
at org.springframework.data.neo4j.support.mapping.EntityIndexCreator$2.doWithPersistentProperty(EntityIndexCreator.java:61)
at org.springframework.data.neo4j.support.mapping.EntityIndexCreator$2.doWithPersistentProperty(EntityIndexCreator.java:57)
at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:294)
at org.springframework.data.neo4j.support.mapping.EntityIndexCreator.ensureEntityIndexes(EntityIndexCreator.java:57)
at org.springframework.data.neo4j.support.mapping.Neo4jMappingContext.updateStoredEntityType(Neo4jMappingContext.java:78)
at org.springframework.data.neo4j.support.mapping.Neo4jMappingContext.addPersistentEntity(Neo4jMappingContext.java:71)
at org.springframework.data.neo4j.support.mapping.Neo4jMappingContext.addPersistentEntity(Neo4jMappingContext.java:49)
at org.springframework.data.mapping.context.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:257)
at org.springframework.data.mapping.context.AbstractMappingContext.initialize(AbstractMappingContext.java:373)
at org.springframework.data.neo4j.support.mapping.Neo4jMappingContext.initialize(Neo4jMappingContext.java:111)
at org.springframework.data.mapping.context.AbstractMappingContext.afterPropertiesSet(AbstractMappingContext.java:363)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)
... 62 more
Sure, you can have spring data neo4j + spring boot.
You can find the code I wrote here: https://github.com/inserpio/neo4art
And a short post describing how I did it: https://inserpio.wordpress.com/2014/09/21/neo4art-moves-to-cloud-foundry-at-springone-2gx-2014/
Hope it can help!
Cheers,
Lorenzo
Use this repository in your maven pom
<repository>
<id>neo4j-contrib-releases</id>
<url>https://raw.github.com/neo4j-contrib/m2/master/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>neo4j-contrib-snapshots</id>
<url>https://raw.github.com/neo4j-contrib/m2/master/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
with the dependency
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-spatial</artifactId>
<version>0.13-neo4j-2.1.2</version>
</dependency>

Maven cannot for life download maven-plugin-descriptor-2.0.6

Basic info:
I use embedded Maven 3.0.4 in Eclipse Juno (with JBoss Tools).
settings.xml (straight from community.jboss.org/wiki/MavenGettingStarted-Users):
<profile>
<id>jboss-public-repository</id>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<activeProfiles>
<activeProfile>jboss-public-repository</activeProfile>
<activeProfile>jboss-deprecated-repository</activeProfile>
</activeProfiles>
Note: I tried also repository.jboss.org/nexus/content/groups/jboss and repository.jboss.org/nexus/content/groups/public/ with same results.
What I did:
I created Maven project from scrath using artifact org.jboss.spec.archetypes jboss-javaee6-webapp. System try to download repos. Everything downloads fine except two POMs:
maven-plugin-descriptor-2.0.6.pom
plexus-2.0.2.pom
I will focus on maven-plugin-descriptor, but plexus behave identically.
Error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project example:
Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved:
Failed to collect dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 ():
Failed to read artifact descriptor for org.apache.maven:maven-plugin-descriptor:jar:2.0.6:
Could not transfer artifact org.apache.maven:maven-plugin-descriptor:pom:2.0.6 from/to central (repo.maven.apache.org/maven2):
No response received after 60000 -> [Help 1]
Requested file is not present at all in repository.jboss.org/nexus/content/groups/public-jboss/org/apache/maven/maven-plugin-descriptor/2.0.6/ (returns 404).
I tried to go to repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-descriptor/2.0.6/ directly in browser. File maven-plugin-descriptor-2.0.6.pom is present, but after click it thinks... thinks... thinks... aaand connection reset. Note that many other POMs was downloaded from repo.maven.apache.org without problems. Only this file for some reason Just Don't Work(TM).
Other:
I am NOT behind proxy. I DID use "delete whatever.lastUpdated" trick. Even deleted entire repo to force downloading everything again. Did not work, of course.
Any ideas? Or maybe I am barking at wrong tree and some other repository must be set in settings.xml? I have impression that maven tries to download too old versions...
Problem was solved. If someone have similiar problem to mine, he have to use mirrors.
In settings.xml:
<settings>
...
<mirrors>
<mirror>
<id>uk.maven.org</id>
<mirrorOf>central</mirrorOf>
<name>UK Central</name>
<url>http://uk.maven.org/maven2</url>
</mirror>
</mirrors>
...
</settings>

Proper adding repositories in Maven 3 pom.xml

Every time i build something with Mavent i muss struggle with the searching a proper repo for the required Maven artifact. As now i am searching the repo for the spring-aop but can not find one. Actual pom.xml follows.
How can i approach assembling pom.xml properly?
Thanks.
<repositories>
<repository>
<id>springsource-milestone</id>
<url>http://maven.springframework.org/milestone</url>
</repository>
<repository>
<id>org.springframework.repository.maven</id>
<name>SpringSource Maven Repository</name>
<url>http://repository.springframework.org/maven/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.aop</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
</dependencies>
The artifact spring-aop is present in maven central repo.
Normally most of the released artifacts are present in maven central which need not be explicitly specified in pom.xml. You can use the search option of the central repo for this.
In the question above, you would need to include the additional spring repos only if you were looking for milestone (alpha/beta) releases.
I would recommend to use a repository manager instead of added repositories to the pom.

Resources