JBoss Fuse/ Red Hat JBoss developer Studio, Fuse Integration Project error - maven

I'm getting an error upon running maven install, or maven clean on the following POM file in a graphical Camel Project. I'm using Red Hat JBoss Developer Studio
My pom flie is as follows
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>camel-blueprint</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Camel Blueprint Quickstart</name>
<description>Empty Camel Blueprint Example</description>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<properties>
<camel.version>2.17.3</camel.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>
**<jboss.fuse.bom.version>6.3.0.redhat-187</jboss.fuse.bom.version>**
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.fuse.bom</groupId>
<artifactId>jboss-fuse-parent</artifactId>
<version>${jboss.fuse.bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.17.3</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>2.17.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-blueprint</artifactId>
<version>2.17.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>fuse-public-repository</id>
<name>FuseSource Community Release Repository</name>
**<url>https://repo.fusesource.com/nexus/content/groups/public</url>**
</repository>
<repository>
<id>redhat-ea-repository</id>
<url>https://maven.repository.redhat.com/earlyaccess/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>red-hat-ga-repository</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>fuse-public-repository</id>
<name>FuseSource Community Release Repository</name>
<url>https://repo.fusesource.com/nexus/content/groups/public</url>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>red-hat-ga-repository</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga</url>
</pluginRepository>
</pluginRepositories>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${version.maven-bundle-plugin}</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>cameltry</Bundle-SymbolicName>
<Bundle-Name>Empty Camel Blueprint Example [cameltry]</Bundle-Name></instructions></configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>${camel.version}</version>
<configuration>
<useBlueprint>true</useBlueprint>
</configuration>
</plugin>
</plugins>
</build>
</project>
The error message I get in the console is as follows
Non-resolvable import POM: Failure to find
org.jboss.fuse.bom:jboss-fuse-parent:pom:6.3.0.redhat-187 in
https://(our nexus repository)/content/groups/public was cached in the
local repository, resolution will not be reattempted until the update
interval of (our nexus repository).com has elapsed or updates are
forced # line 29, column 19 -> [Help 2] [ERROR]
Any and all help will end my long search in order to solve the issue, and thus attain my eternal gratitude.
P.S. I have already gone through the maven configuration in order to get the required dependancy profiles set up as advised on the Redhat Documentation Website
2nd Version POM based on recommendations as of 28.12.16 1500 hours CET.
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>camel-blueprint</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Camel Blueprint Quickstart</name>
<description>Empty Camel Blueprint Example</description>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<properties>
<camel.version>2.17.3</camel.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>
**<jboss.fuse.bom.version>6.3.0.redhat-189</jboss.fuse.bom.version>**
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.fuse.bom</groupId>
<artifactId>jboss-fuse-parent</artifactId>
<version>${jboss.fuse.bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.17.3</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>2.17.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-blueprint</artifactId>
<version>2.17.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>fuse-public-repository</id>
<name>FuseSource Community Release Repository</name>
**<url>https://repository.jboss.org/nexus/content/groups/ea/org/jboss/fuse/bom/jboss-fuse-parent/</url>**
</repository>
<!--<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>6.3.0 jboss parent</id>
<name>jbp</name>
<url>https://repository.jboss.org/nexus/content/groups/ea/org/jboss/fuse/bom/jboss-fuse-parent/ /</url>
</repository> -->
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>Jboss Fuse snapshots repo</id>
<name>JFSR</name>
<url>https://repo.fusesource.com/nexus/content/groups/public-snapshots/</url>
</repository>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>red-hat-ga-repository</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>fuse-public-repository</id>
<name>FuseSource Community Release Repository</name>
<url>https://repo.fusesource.com/nexus/content/groups/public</url>
</pluginRepository>
<pluginRepository>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>red-hat-ga-repository</id>
<name>Red Hat GA Repository</name>
<url>https://maven.repository.redhat.com/ga</url>
</pluginRepository>
</pluginRepositories>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${version.maven-bundle-plugin}</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>cameltry</Bundle-SymbolicName>
<Bundle-Name>Empty Camel Blueprint Example [cameltry]</Bundle-Name></instructions></configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>${camel.version}</version>
<configuration>
<useBlueprint>true</useBlueprint>
</configuration>
</plugin>
</plugins>
</build>
</project>

The issue was resolved. The problem was that maven was being directed by my settings.xml to look for the files in our repo instead of the jboss repos. This was because the configuration for settings.xml which told maven that these repos were not mirrored in our nexus was missing. Hence adding '!jbossRepo(X)' in the mirrorOf section of my settings.xml told maven that these were not mirrored in our nexus and the following profiles should be searched for these files.
The said profiles can be configuered in your settings.xml by following the instructions on this link.
So if you're trying to run jBoss Red hat developer Studio from behind a plethora of proxies like me, simply,
Configure maven for the studio with the above link.
Add the '!jbossRepos(x)' in the mirrors block, in front of 'mirrorsOf' in the settings.xml file.
Done!
Thanks to RobE, for pointing me in the right direction. I'm indebted.

Check with your browser if the dependency org.jboss.fuse.bom:jboss-fuse-parent:pom:6.3.0.redhat-187 exists in any of the repositories you are using.
Does your nexus repo contain (exactly!) this artifact?
If yes:
The reason can be failed authentication or connectivity. Ensure your credentials for this repo are configured correctly and the repo grants your account permission to the artifact. (also consider potential proxy issues)
Running the build with parameter -X may help to get more info.
If no:
(The repo in your pom does not contain version 187: https://repo.fusesource.com/nexus/content/groups/public/org/jboss/fuse/bom/jboss-fuse-parent/ )
Add a repo which contains the missing artefact or (if acceptable) change the artefact to a version which exists in your repo.
https://repository.jboss.org/nexus/content/groups/ea/org/jboss/fuse/bom/jboss-fuse-parent/
is a candidate but it does not contain the exact version 187.
Is a change to version 6.3.0.redhat-187-05 acceptable?

Related

Vaadin-addons Maven POM File Configuration

I can't get a Vaadin + Spring project built due to vaadin-addons while someone can get it built. The pom file already has the addons repository. The following is the structure of the pom.xml. What is missing? Is the addons repository in a wrong place?
<dependencies>
…
<!-- Vaadin dependencies -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>vaadin-combobox-multiselect</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>vaadin-grid-util</artifactId>
<version>2.1.1</version>
</dependency>
…
</dependencies>
...
<profiles>
<profile>
<!-- Vaadin pre-release repositories -->
<id>vaadin-prerelease</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
...
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
Update:
I solve this probule by adding the following in the pom file
<repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>vaadin-addons</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>sonatype vaadin</id>
<url>https://oss.sonatype.org/content/repositories/vaadin/</url>
</repository>
<repository>
<id>vaadin-prereleases</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2/</url>
</pluginRepository>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
</pluginRepositories>
You have defined a profile with the id <id>vaadin-prerelease</id> and the repositories are defined only under that profile. I think this is not what you want; instead, you should define the <repositories> on the same level as <dependencies>. Repositories for a specific profile are only used if you're building with that profile enabled.

error pom.xml error resolving version and error packaging

I found the error in my pom.xml. the error below:
Multiple annotations found at this line:
- Error resolving version for plugin 'org.apache.maven.plugins:maven-site-plugin' from the repositories
[local (C:\Users\c76266.m2\repository), release.fusesource.org
(http://repo.fusesource.com/nexus/content/repositories/releases),
ea.fusesource.org
(http://repo.fusesource.com/nexus/content/groups/ea), central
(https:// repo.maven.apache.org/maven2)]: Plugin not found in any
plugin repository
- Project build error: Unresolveable build extension: Plugin org.apache.felix:maven-bundle-plugin:2.3.7 or one of its dependencies
could not be resolved: The following artifacts could not be
resolved: org.apache.maven:maven-core:jar:2.0.7,
org.apache.maven:maven-settings:jar:2.0.7,
org.apache.maven:maven-plugin-parameter-documenter:jar:
2.0.7, org.apache.maven:maven-profile:jar:2.0.7, org.apache.maven:maven-model:jar:2.0.7,
org.apache.maven:maven-artifact:jar:2.0.7,
org.codehaus.plexus:plexus-container-
default:jar:1.0-alpha-9-stable-1,
org.apache.maven:maven-repository-metadata:jar:2.0.7,
org.apache.maven:maven-error-diagnostics:jar:2.0.7,
org.apache.maven:maven- project:jar:2.0.7,
org.apache.maven:maven-plugin-registry:jar:2.0.7,
org.apache.maven:maven-plugin-api:jar:2.0.7,
org.apache.maven:maven-plugin-descriptor:jar:2.0.7,
org.apache.maven:maven-artifact-manager:jar:2.0.7,
org.apache.maven:maven-monitor:jar:2.0.7,
classworlds:classworlds:jar:1.1: Could not transfer artifact
org.apache.maven:maven-core:jar:2.0.7 from/to central
(https://repo.maven.apache.org/maven2): unexpected end of stream on
Connection{repo.maven.apache.org:443, proxy=HTTP #
idnproxy.pru.intranet.asia/10.171.74.5:8080 hostAddress=10.171.74.5
cipherSuite=none protocol=http/1.1} (recycle count=0)
Project build error: Unknown packaging: bundle
How to fix this problem? thanks.
The Maven xml include seems to be fine code wise, so I'd say you have imported/installed something wrong, a different version maybe?
this is my pom.xml:
<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>com.prudential.integration.middleware.common</groupId>
<artifactId>prudential-fuse-common-model</artifactId>
<version>1.0.1</version>
<packaging>bundle</packaging>
<name>Prudential Fuse Common Model</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>release.fusesource.org</id>
<name>FuseSource Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/repositories/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>ea.fusesource.org</id>
<name>FuseSource Community Early Access Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/groups/ea</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>release.fusesource.org</id>
<name>FuseSource Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/repositories/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
<pluginRepository>
<id>ea.fusesource.org</id>
<name>FuseSource Community Early Access Release Repository</name>
<url>http://repo.fusesource.com/nexus/content/groups/ea</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>2.15.1.redhat-620133</version>
<exclusions>
<exclusion>
<artifactId>asm</artifactId>
<groupId>asm</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>3.0.4.redhat-620133</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jaxb</artifactId>
<version>2.15.1.redhat-620133</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-Version>${project.version}</Bundle-Version>
<Import-Package>*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

Spring Boot Admin client status is down

I have a SpringAdminServer(1.5.0), an EurekaServer, and an EurekaClient.
The SpringAdminServer uses #EnableDiscoveryClient way to host. I can see both SpringAdminServer and EurekaClient registering to EurekaServer normally. However, the status of EurekaClient shown on SpringAdminServer is always "DOWN".(SpringAdminServer show 404 error to requesting EurekaClient's /info or /metric path...)
I tried another way of including spring-boot-admin-starter-client into the client's POM, which will make the client's status UP on the SpringAdminServer and thus no errors found to request the /info or /metric path...
Anyone knows what happened? Thanks.
Here are the content of my client's POM:
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>nickeurekaclient</groupId>
<artifactId>nickeurekaclient</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.7.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.7.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.7.4</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Camden.BUILD-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>eurekademo.EurekaApplication</start-class>
<java.version>1.7</java.version>
<docker.image.prefix>springcloud</docker.image.prefix>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.2.3</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- defined in spring-cloud-starter-parent pom (as documentation hint),
but needs to be repeated here -->
<configuration>
<requiresUnpack>
<dependency>
<groupId>com.netflix.eureka</groupId>
<artifactId>eureka-core</artifactId>
</dependency>
</requiresUnpack>
</configuration>
</plugin>
<plugin>
<!--skip deploy (this is just a test module) -->
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
ADD
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
to POM will do the trick.

Maven deployment location vs download location

I have a problem setting up things correctly; my end goal is to pull artifacts from one nexus (I'm going to refer to it as Nexus1) and deploy to another nexus (Nexus2), two are hosted in different locations with different domains.
Here's my settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<distributionManagement>
<repository>
<id>deployment</id>
<name>Internal Releases</name>
<url>http://Nexus2/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>deployment</id>
<name>Internal Releases</name>
<url>http://Nexus2/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<mirrors>
<mirror>
<id>company-central</id>
<name>CompanyCentral</name>
<url>http://Nexus1/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>default-repositories</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>core-releases</id>
<url>http://Nexus1/content/repositories/core-release</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>core-snapshots</id>
<url>http://Nexus1/content/repositories/core-snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</repository>
<repository>
<id>releases</id>
<url>http://Nexus1/content/repositories/releases</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<url>http://Nexus1/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</repository>
</repositories>
</profile>
<profile>
<id>inject-liferay-properties</id>
<properties>
<liferay.auto.deploy.dir.val>/Users/dmadathil/Documents/Portal/workspace/X-Portal-11.0.0/bundles/deploy</liferay.auto.deploy.dir.val>
<liferay.app.server.deploy.dir.val>/Users/dmadathil/Documents/Portal/workspace/X-Portal-11.0.0/bundles</liferay.app.server.deploy.dir.val>
<liferay.app.server.lib.global.dir.val>/Users/dmadathil/Documents/Portal/workspace/X-Portal-11.0.0/bundles/tomcat-7.0.42/lib</liferay.app.server.lib.global.dir.val>
<liferay.app.server.portal.dir.val>/Users/dmadathil/Documents/Portal/workspace/X-Portal-11.0.0/bundles/tomcat-7.0.42/webapps/ROOT</liferay.app.server.portal.dir.val>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>inject-liferay-properties</activeProfile>
</activeProfiles>
</settings>
And here's my pom.xml:
<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>
<parent>
<groupId>com.company</groupId>
<artifactId>super-pom</artifactId>
<version>1.1.0</version>
</parent>
<artifactId>covlogs</artifactId>
<version>0.0.2-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>com.company.platform.group.client</groupId>
<artifactId>group-client</artifactId>
</dependency>
<dependency>
<groupId>com.company.platform.user.client</groupId>
<artifactId>user-client</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>com.company.core</groupId>
<artifactId>slf4j-bom</artifactId>
<version>1.7.12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.company.platform.group.client</groupId>
<artifactId>group-client</artifactId>
<version>1.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.company.platform.user.client</groupId>
<artifactId>user-client</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20141113</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.4.201502262128</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
<!--<repository>
<id>core-releases</id>
<url>http://Nexus1/content/repositories/core-release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>core-snapshots</id>
<url>http://Nexus1/content/repositories/core-snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>releases</id>
<url>http://Nexus1/content/repositories/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<url>http://Nexus1/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>-->
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
The problem that I'm facing is that every time I build the project it still tries to upload to Nexus1 instead of Nexus2!!
EDIT: Here's a sample error message from Jenkins' output console:
ERROR: Failed to deploy artifacts: Could not transfer artifact com.company:covlogs:jar:0.0.2-20150928.201829-1 from/to snapshots (http://Nexus1/content/repositories/core-snapshot/): Failed to transfer file: http://Nexus1/content/repositories/core-snapshot/com/company/covlogs/0.0.2-SNAPSHOT/covlogs-0.0.2-20150928.201829-1.jar. Return code is: 401, ReasonPhrase: Unauthorized.
I'm still new to maven, and I'm not sure what's going wrong. I've been banging my head for a couple of days now on this.
Any help would be greatly appreciated!
EDIT2: Steps I've taken, I've added the <distributionManagement> block hoping it would fix the issue, but that didn't work.
I've also added maven-deploy-plugin to pom.xml, but that didn't do anything either.
EDIT3: For Jenkins I'm using Maven Release plug-in to setup where I want the artifacts to be deployed to:

Execution default of goal com.mysema.maven:apt-maven-plugin:1.0.8:process failed

Once I added the com.mysema.querydsl into the pom.xml. I got the following error
Please advise.
Execution default of goal com.mysema.maven:apt-maven-plugin:1.0.8:process failed: Plugin com.mysema.maven:apt-maven-plugin:1.0.8 or one of its dependencies could not be resolved: Failed to collect dependencies for com.mysema.maven:apt-maven-plugin:jar:1.0.8 () (com.mysema.maven:apt-maven-plugin:1.0.8:process:default:generate-sources)
Here is 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>spring-boot-test</groupId>
<artifactId>spring-boot-mvc-test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring4</artifactId>
</dependency>
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>2.9.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0.8</version>
<dependencies>
<dependency>
<groupId>com.mysema.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>${querydsl.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://maven.springframework.org/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://maven.springframework.org/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://maven.springframework.org/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://maven.springframework.org/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

Resources