Maven Dependencies [] - maven-plugin

I am building Jenkins Maven Job. When I run Jenkins Job,I am getting following Dependencies error.
Failed to execute goal on project rabbitmq-build-trigger: Could not resolve dependencies for project org.jenkins-ci.plugins:rabbitmq-build-trigger:hpi:2.3.4: Failed to collect dependencies at **org.jenkins-ci.plugins:xunit:jar:1.90 -> org.jenkins-ci.lib.dtkit:dtkit-metrics-model:jar:2.0.0:** Failed to read artifact descriptor for org.jenkins-ci.lib.dtkit:dtkit-metrics-model:jar:2.0.0: Could not transfer artifact org.jenkins-ci:jenkins:pom:1.34 from/to repo.jenkins-ci.org (http://repo.jenkins-ci.org/public/): Connect to repo.jenkins-ci.org:80 [repo.jenkins-ci.org/*.*.*.*, repo.jenkins-ci.org/*.*.*.*, repo.jenkins-ci.org/*.*.*.*] failed: Connection timed out -> [Help 1]
I have uploaded all required dependencies into our employer specific remote repo. and employer do not want to download any artifact from Central repo. Hence, accessing or calling external URL from slave box is restricted.
I do not know how dependencies work through a POM file. From the above message, "->" is travelling along with dependencies file
Can someone explain me what is wrong and how I supposed to resolve this issue? You answer is really matters to me

Are you sure you successfully uploaded specifically 'org.jenkins-ci:jenkins:pom:1.34' to the remote repository?
Also, ensure the remote repository is added as a repository element in your project's pom, like so:
<project>
...
<repositories>
<repository>
<id>my-internal-site</id>
<url>http://myserver/repo</url>
</repository>
</repositories>
...
</project>
(more information on repositories here: http://maven.apache.org/guides/introduction/introduction-to-repositories.html)
You might see if you can retrieve the artifacts by using each one's URL in a browser. If so, there's something amiss with your maven project repo configuration.

Related

Composer 2.5.1 Symfony Ux-React Failed to Download Webpack Encore Pack

I have a Symfony project that uses composer and react. I am trying to download the symfony/ux-react package with composer following this link: https://symfony.com/bundles/ux-react/current/index.html
However, when I run composer require symfony/ux-react I get the following error:
- Downloading symfony/webpack-encore-pack (v1.0.2)
0/1 [>---------------------------] 0% Failed to download symfony/webpack-encore-pack from dist: The "https://api.github.com/repos/symfony/webpack-encore-pack/zipball/f9f4e91659e5f55de370d6aebe77e64bce35e4d3" file could not be downloaded (HTTP/2 404 ):
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#download-a-repository-archive"}
Now trying to download from source
- Syncing symfony/webpack-encore-pack (v1.0.2) into cache
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
When working with _public_ GitHub repositories only, head to https://github.com/settings/tokens/new?scopes=&description=Composer+on+lex-Blade-15-Mid-2019-Base+2023-01-27+1205 to retrieve a token.
This token will have read-only permission for public information only.
When you need to access _private_ GitHub repositories as well, go to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+lex-Blade-15-Mid-2019-Base+2023-01-27+1205
Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer.
Tokens will be stored in plain text in "/home/lex/.config/composer/auth.json" for future use by Composer.
For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth
Token (hidden):
I then create a token. Upon copy pasting it into the terminal:
Token stored successfully.
1/1 [============================] 100%
In Git.php line 471:
Failed to execute git clone --mirror -- 'https://ghp...PNs:x-oauth-basic#github.com/symfony/webpack-encore-pack.git' '/home/lex/.cache/composer/vcs/https---github.com-symfony-webpack-encore-p
ack.git/'
Cloning into bare repository '/home/lex/.cache/composer/vcs/https---github.com-symfony-webpack-encore-pack.git'...
remote: Repository not found.
fatal: repository 'https://github.com/symfony/webpack-encore-pack.git/' not found
Anyone know a fix for this? It appears that webpack-encore-pack is depreciated.
Spoke too soon. Found this link: https://github.com/symfony/symfony/discussions/42700
By uninstalling webpack encore with composer remove symfony/webpack-encore-pack and then trying composer require symfony/ux-react, no error occurred.

Flink logging - Using Log4j2

We are running a Flink(1.9.1) application on AWS-EMR(5.29) using yarn. We are using a common logging adaptor throughout all the components(including the Flink application) in our project and it uses Log4j2.
From the documentation, I see that there are 3 configuration files.
log4j.properties
log4j-yarn-session.properties
log4j-cli.properties
I understand that I will have to modify log4j.properties for the job manager and task manager logs and log4j-cli.properties for the code not included in the cluster code.
Now given this situation,
How do I pass my log4j2.properties?
Do we replace the logging jars in the lib folder with log4j2 jars?
Not a solid solution but this is a workaround. If the log4j.properties file in the /conf folder is deleted, the log4j2 file within the jar that is within the classpath is referred. But be careful when you have multiple jars in the classpath with the log4j2 properties file.

Building flink from source---error of resolving dependencies

I am trying to build Apache Flink from the source. I am strictly following
the instructions given #github flink page. https://github.com/apache/flink
I am facing the error for resolving the dependencies for project
flink-mapr-fs.
Firstly, I tried using latest maven, and afterward, as per instruction at
the flink github page https://github.com/apache/flink
https://github.com/apache/flink , I also tried via maven 3.1.1, but the
same error.
In addition, I tried for flink 1.8.0 and 1.7.2 as well but the same problem exist. The detail of error is as below:
[ERROR] Failed to execute goal on project flink-mapr-fs: Could not resolve dependencies for project org.apache.flink:flink-mapr-fs:jar:1.7.2: Could not transfer artifact com.mapr.hadoop:maprfs:jar:5.2.1-mapr from/to mapr-releases (http://repository.mapr.com/maven/): GET request of: com/mapr/hadoop/maprfs/5.2.1-mapr/maprfs-5.2.1-mapr.jar from mapr-releases failed: Premature end of Content-Length delimited message body (expected: 49411916; received: 39845888 -> [Help 1]

Gradle with Integrated SQL Security

I'm currently working on converting one of our Maven projects to use Gradle.
Here is the issue I'm currently facing:
This project is using SQL Integrated security. Here is how Maven handles it (this took us a while to figure it out):
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/sqljdbc4.jar</systemPath>
</dependency>
after run gradle init --type pom
this specific dependency has been converted to something like this:
system group: 'com.microsoft.jdbcdriver', name: 'sqljdbc', version:'4.0.1'
which is not right. Gradle can't build. More specifically, the system scope does not even exist in Gradle's API (neither I found it in any third party Gradle plugin).
Any help from whom had any experience with Gradle SQL integrated security would highly appreciated.
It is very easy to emulate scope system with Gradle by adding a configuration.
Create configuration system and set it as the compile classpath. Any dependencies added to system will now be available during compilation (though I doubt you need a specific JDBC driver for compilation), but the dependencies in system will not be added to the published dependencies of the module:
configurations {
system.extendsFrom compile
}
sourceSets {
main {
compileClasspath = configurations.system
}
}
Now you can easily add the JAR of the JDBC driver to the system configuration. This assumes you still want to refer to a local file just like with Maven:
dependencies {
system files('libs/sqljdbc-4.0.1.jar')
}
But if you have the JAR in a (local) repository, it is better to use the repository:
dependencies {
system 'com.microsoft.jdbcdriver:sqljdbc:4.0.1'
}

Unable to deploy profile to JBoss Fuse 6.1 using fabric8:deploy

I am trying to deploy a simple Camel route to my local instance of JBoss Fuse 6.1 (GA release). I am trying to use the fabric8-maven-plugin to do so, but everytime I run fabric8:deploy, I receive the following error
Failed to execute goal io.fabric8:fabric8-maven-plugin:1.0.0.redhat-379:deploy (default-cli) on project filemover: Error executing: IO-Error while contacting the server: org.apache.http.NoHttpResponseException: The target server failed to respond
Here is my current plugin-definition from my pom file
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>1.0.0.redhat-379</version>
<configuration>
<profile>sample-filemover</profile>
<parentProfiles>feature-camel</parentProfiles>
<features>mq-fabric-camel</features>
</configuration>
</plugin>
My ~/.m2/user/settings.xml file contains the following server definition
<server>
<id>fabric8.upload.repo</id>
<username>admin</username>
<password>admin</password>
</server>
And I am executing the following mvn command
mvn fabric8:deploy -Dmaven.test.skip=true
(I realize I am skipping the tests, but I am trying to just deploy a profile at this time)
I can log onto the management console just fine and can see the root container no problem. Have I missed something in the configuration of Fuse to enable this?
I just spend some hours in the same problem.
Just change the version to 1.1.0.CR5 and you can deploy using mvn fabric8:deploy
Best Regards
are you sure you are trying on the correct server? Just put the fabric URL server where you want to deploy. I'm using that plugin version and it works correctly.
I know may be it's too late, but just for let you know, you can deploy in any server with
mvn clean fabric8:deploy -Dfabric8.jolokiaUrl=http://localhost:8181/jolokia
Cheers

Resources