Hi, I'm new to spring and I'm trying to make an application. When I run the app, I get the following error: - spring

First part
Second part
and this is the configuration that I have in the pom.xml
Frist part
Second part
the final part of pom.xml
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
Project packages

Related

How to correctly setup snapshots deeplearning4j

I tried re-configuring my project for snapshots in intellij, please why is my pom.xml not working according to the documentation
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<releases>..</releases> and <snapshots>..<snapshots/> are outlined in red with a Element 'releases' cannot have character [children], because the type's content type is element-only. error
I took your snippet and tried to build the project locally.
I haven't seen such kind of error, everything in tag looks valid.
The only thing that I have added to build you project is <version>${nd4j.version}</version> tag to
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>${nd4j.backend}</artifactId>
</dependency>
Could you please, make provided above changes and double check your pom.xml file syntax.

why the project pom.xml is showing this Non-Resolvable error

Dont know whats wrong here. I cloned the project form the bitbucket repo. Upon importing the project as a existing maven project this is occuring
I think the problem is that you are using the snapshot version of the spring boot and these dependencies are not available on the maven central so have to add the additional repository address.
Add the following snippets in the <project> component in your pom.xml
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

Where to get gwt-maven-plugin 2.8.0-SNAPSHOT

The gwt-maven-plugin documentation lists 2.8.0-SNAPSHOT as current version, and I'd like to evaluate the upcoming 2.8.0 GWT.
While version 2.7.0 is available directly from the Maven Central repository, I am unable to find the correct repository from which to retrieve the snapshot. Unfortunately I have been unable to find this information on the project's homepage.
Can anybody please provide me with a working <repository/> and <pluginRepository/> configuration to use in my pom.xml?
This worked for me:
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/google-snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>snapshots-repo</id>
<!--<url>https://oss.sonatype.org/content/repositories/google-snapshots</url>-->
<url>https://oss.sonatype.org/content/repositories/public/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

Maven commands failing

I am trying to build a project using maven. I have a properties tag which has the following links in pom.xml-
<properties>
<release_deploy_repo>http://.../releases</release_deploy_repo>
<plugin_repo>http://.../public</plugin_repo>
<central_repo>http://.../public</central_repo>
</properties>
and then under repositories, i have
<repositories>
<repository>
<id>central</id>
<name>Central Repo</name>
<url>${central_repo}</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
when i try mvn clean install, i get this error -
${central_repo} not found. Any idea what i doing wrong?

Difference between repository and pluginrepository

My Android Maven project pom.xml contains the following entries. Now everything works fine. What is the difference between <repositories> entries and the <pluginRepositories> entries.
<repositories>
<repository>
<id>my-repo</id>
<url>http://10.10.10.230:8081/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>my-repo</id>
<name>my-repo</name>
<url>http://10.10.10.230:8081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
As #otakun85 stated, There is no technical difference at all. It's for having different configurations->behavior for plugins in contrary to normal artifacts. See repository vs. pluginRepository for more details.
Also check maven-users mailing list archives, It provides quite good explanation to it.
Maven will resolve plugin dependencies using the configured pluginRepository. Other artifact dependencies (eg. a parent pom) are resolved using repository.
Note: Things available on maven central will be resolved by default so you wouldn't normally need to include repository for those.
For example, if your pom.xml specifies a parent pom and a plugin dependency that both exist in the same repository you must still specify both repository AND pluginRepository. If you only configure one then maven will complain with "Unresolvable X" errors.

Resources