Build with frontend-maven-plugin fails on mac M1: Could not download Node.js - maven

The frontend-maven-plugin tries to download a node file which does not exist.
When I look into https://nodejs.org/dist/v10.15.3 I can only see a file named node-v10.15.3-darwin-x64.tar.gz
[INFO] --- frontend-maven-plugin:1.7.5:install-node-and-npm (install node and npm) # oauth-ui-authorization-code-angular-zuul ---
[INFO] Installing node version v10.15.3
[INFO] Downloading https://nodejs.org/dist/v10.15.3/node-v10.15.3-darwin-arm64.tar.gz to /Users/me/.m2/repository/com/github/eirslett/node/10.15.3/node-10.15.3-darwin-arm64.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] mymodule 2.2.6.RELEASE FAILURE [ 4.536 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.930 s
[INFO] Finished at: 2022-09-28T14:28:09+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.7.5:install-node-and-npm (install node and npm) on project mymodule: Could not download Node.js: Got error code 404 from the server. -> [Help 1]
[ERROR]

This is a bug in the frontend-maven-plugin.
An upgrade to the current version should help:
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.1</version>
...
Thanks to:
https://github.com/apache/druid/issues/10804
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/m1-mac-cant-build-wknd-tutorial-get-quot-could-not-download-node/m-p/399462

Related

Bintray 409 conflict - mvn release plugin uploading jar twice?

I'm struggling to push releases to Bintray in full.
From what I can tell, the issue seems to be caused by the maven release plugin trying to push the sources jar twice -- hence the HTTP 409 conflict response being returned.
So far I've not been able to locate the cause. Help would be appreciated!
I can see the jars on bintray up to the point that it fails, indicating it doesn't seem to be a credentials issue
Appending ;override=1 to the end of the url seemingly allows the release to succeed (I'm still new at this, so not 100% sure what I should be seeing)
Another collaborator is able to release fine - he's using a slightly older version of maven (downgrading from 3.6 to 3.5 is my next step, but it seems unusual/odd/unlikely?)
mvn test/package/install etc are fine - no concerns there
the version number is a full release number, not a snapshot (e.g. 1.2.3, not 1.2.3-SNAPSHOT)
edit: similar results are found using both Windows and Ubuntu (virtualbox guest)
Here's a snippet of what I believe to be the relevant parts of the mvn output, but can post more if needed.
[INFO] [INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) # YYY-core ---
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.jar
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/pom.xml to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.pom
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION-sources.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION-sources.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Installing /home/XXX/YYY/target/checkout/YYY-core/target/YYY-core-VERSION-javadoc.jar to /home/XXX/.m2/repository/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-javadoc.jar
[INFO] [INFO]
[INFO] [INFO] --- maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) # YYY-core ---
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.jar
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.jar (1.2 MB at 112 kB/s)
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.pom
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION.pom (4.9 kB at 824 B/s)
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar (781 kB at 96 kB/s)
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar
[INFO] [INFO] Uploading to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-javadoc.jar
[INFO] [INFO] Uploaded to bintray-YYY-ZZZ: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-javadoc.jar (3.8 MB at 218 kB/s)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Reactor Summary for YYY-parent VERSION:
[INFO] [INFO]
[INFO] [INFO] YYY-parent ...................... SUCCESS [ 18.058 s]
[INFO] [INFO] YYY-core ........................ FAILURE [01:37 min]
[INFO] [INFO] YYY-core-testing ................ SKIPPED
[INFO] [INFO] YYY-B-core ...................... SKIPPED
[INFO] [INFO] YYY-B-testing ................... SKIPPED
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 01:56 min
[INFO] [INFO] Finished at: 2020-03-28T03:33:28Z
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) on project YYY-core: ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact com.github.YYY:YYY-core:jar:sources:VERSION from/to bintray-YYY-ZZZ (https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1): Failed to transfer file: https://api.bintray.com/maven/YYY/ZZZ/YYY/;publish=1/com/github/YYY/YYY-core/VERSION/YYY-core-VERSION-sources.jar. Return code is: 409, ReasonPhrase: Conflict. -> [Help 1]
Since your pom file isn't attached, I am relying on this example.
The 409 conflict is because you are publishing the same file name to the same path twice.
From the attached logs it looks like you are deploying YYY-core-VERSION-sources.jar twice (it has 2 entries of Installing and Uploading in the log). This means that you are trying to publish a jar with the same name and to the same path. This causes the conflict.
I don't know from the input you gave why you have two identical sources files. One solution, as you have mentioned, is to use the override flag ;override=1 as shown in the Upload API example. I would also take a look why you have 2 files while another collaborator has, probably, only one.

Applying a patch at runtime in Maven

I'm trying to install Giraph 1.1 but ran into an issue. According to this thread I should apply a patch to my installation. Unfortunately, my problem stems from that. I downloaded and copied the .patch file linked in there to the source folder and added the following to the pom.xml:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-patch-plugin</artifactId>
<version>1.2</version>
<configuration>
<patches>
<patch>GIRAPH-1110.02.patch</patch>
</patches>
...
</plugins>
Unfortunately when I run Maven with:
sudo mvn -Phadoop_yarn -Dhadoop.version=2.8.1 clean package -DskipTests
it still fails with the same error as it did before:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /usr/local/giraph/giraph-core/target/munged/main/org/apache/giraph/job/GiraphJob.java:[213,11] setPingInterval(org.apache.hadoop.conf.Configuration,int) is not public in org.apache.hadoop.ipc.Client; cannot be accessed from outside package
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Giraph Parent ............................... SUCCESS [ 6.298 s]
[INFO] Apache Giraph Core ................................. FAILURE [ 9.359 s]
[INFO] Apache Giraph Examples ............................. SKIPPED
[INFO] Apache Giraph Distribution ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.062 s
[INFO] Finished at: 2018-02-06T22:53:00+02:00
[INFO] Final Memory: 51M/640M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project giraph-core: Compilation failure
[ERROR] /usr/local/giraph/giraph-core/target/munged/main/org/apache/giraph/job/GiraphJob.java:[213,11] setPingInterval(org.apache.hadoop.conf.Configuration,int) is not public in org.apache.hadoop.ipc.Client; cannot be accessed from outside package
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
which clearly shows that the issue has not been patched. When I check the file manually, I can confirm that there's no change. If I change the file manually before compilation, the changes get discarded (I'm guessing the file gets redownloaded). Also can't run the installation with offline flag since it depends on downloading some dependencies. I'm at my wits end here.
My Maven version is 3.3.9.

How to debug "The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found"?

This is what I am trying to do. I have installed Maven. Set the path till bin folder of Maven.
C:\Workspace\Eaxample>mvn archetype:generate -DgroupId=com.mkyong -DartifactId=N
umberGenerator
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
eved from repository: central due to an error: Error transferring file: Connecti
on timed out: connect
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exi
st or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21 seconds
[INFO] Finished at: Tue Nov 24 14:04:15 IST 2015
[INFO] Final Memory: 5M/122M
You forget archetypeArtifactId :
Do this :
mvn archetype:generate -DgroupId={project-packaging}
-DartifactId={project-name}
-DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false
http://www.mkyong.com/maven/how-to-create-a-java-project-with-maven/

Fail to copy with Jenkins (MDEP-187)

I'm using Jenkins to build the Jenkins code in the GitHub repository but I'm having a problem:
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Jenkins war 1.626
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) # jenkins-war ---
[INFO] Deleting C:\Program Files (x86)\Jenkins\workspace\jenkins_scc12_test\war\target
[INFO]
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-maven) # jenkins-war ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0.1:display-info (display-info) # jenkins-war ---
[INFO] Maven Version: 3.3.3
[INFO] JDK Version: 1.7.0_79 normalized as: 1.7.0-79
[INFO] OS Info: Arch: amd64 Family: windows Name: windows 8.1 Version: 6.3
[INFO]
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (default) # jenkins-war ---
[INFO] Adding ignore: org.eclipse.jetty.spdy.*
[INFO]
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-banned-dependencies) # jenkins-war ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:timestamp-property (timestamp-property) # jenkins-war ---
[INFO] Setting property 'now' to '08/30/2015 18:58 GMT'.
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:regex-property (version-property) # jenkins-war ---
[INFO] No match to regex '-SNAPSHOT' found in '1.626'.
[INFO] Setting property 'build.version' to '1.626'.
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-source (add-source) # jenkins-war ---
[INFO] Source directory: C:\Program Files (x86)\Jenkins\workspace\jenkins_scc12_test\war\target\generated-sources\localizer added.
[INFO]
[INFO] --- gmaven-plugin:1.5-jenkins-3:generateStubs (default) # jenkins-war ---
[INFO] No sources found for Java stub generation
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (list-dependencies) # jenkins-war ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:unpack-dependencies (executable-war-header) # jenkins-war ---
[INFO] Unpacking C:\.m2\repository\org\jenkins-ci\executable-war\1.30\executable-war-1.30.jar to C:\Program Files (x86)\Jenkins\workspace\jenkins_scc12_test\war\target\jenkins with includes "**/*.class" and excludes ""
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (resgen) # jenkins-war ---
[INFO] Configured Artifact: org.jenkins-ci.main:remoting:?:jar
[INFO] Configured Artifact: org.jenkins-ci.main:remoting:?:jar
[INFO] Configured Artifact: org.jenkins-ci.main:cli:jar-with-dependencies:?:jar
[INFO] Configured Artifact: org.jenkins-ci:winstone:?:jar
[INFO] Configured Artifact: org.jenkins-ci.main:maven-plugin:?:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:ssh-slaves:1.9:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:credentials:1.18:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:ssh-credentials:1.10:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:subversion:1.54:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:cvs:2.11:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:ant:1.2:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:javadoc:1.1:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:translation:1.10:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:external-monitor-job:1.4:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:ldap:1.11:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:pam-auth:1.1:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:mailer:1.11:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:matrix-auth:1.1:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:windows-slaves:1.0:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:antisamy-markup-formatter:1.1:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:matrix-project:1.4.1:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:script-security:1.13:hpi
[INFO] Configured Artifact: org.jenkins-ci.plugins:junit:1.2-beta-4:hpi
[INFO] Copying remoting-2.52.jar to C:\Program Files (x86)\Jenkins\workspace\jenkins_scc12_test\war\target\jenkins\WEB-INF\remoting.jar
[INFO] Copying remoting-2.52.jar to C:\Program Files (x86)\Jenkins\workspace\jenkins_scc12_test\war\target\jenkins\WEB-INF\slave.jar
[INFO] Copying classes to C:\Program Files (x86)\Jenkins\workspace\jenkins_scc12_test\war\target\jenkins\WEB-INF\jenkins-cli.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Jenkins main module ................................ SUCCESS [ 2.497 s]
[INFO] Jenkins cli ........................................ SUCCESS [ 6.507 s]
[INFO] Jenkins core ....................................... SUCCESS [12:32 min]
[INFO] Jenkins war ........................................ FAILURE [ 10.954 s]
[INFO] Test harness for Jenkins and plugins ............... SKIPPED
[INFO] Jenkins plugin POM ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12:55 min
[INFO] Finished at: 2015-08-31T02:58:30+08:00
[INFO] Final Memory: 179M/740M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (resgen) on project jenkins-war: Artifact has not been packaged yet. When used on reactor artifact, copy should be executed after packaging: see MDEP-187. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :jenkins-war
Build step 'Invoke top-level Maven targets' marked build as failure
Recording test results
Finished: FAILURE
The code I'm using is of the last release: https://github.com/jenkinsci/jenkins/tree/8d8703a781f83be19086592e0c8fa4b4c14da13c
I'm using Maven to build.
I'm very new to this. Please help me to solve this problem.
JDK version: 1.7.0
Maven version: 3.3.3

Unable to find the mojo 'generate-sources'

When I try to install playn, I get that :
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Tests Android
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [enforcer:enforce {execution: enforce-maven}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources': Unable to find the mojo 'generate-sources' (or one of its required components) in the plugin 'com.jayway.maven.plugins.android.generation2:android-maven-plugin'
Component descriptor cannot be found in the component repository: org.sonatype.aether.RepositorySystem.
The error is caused by using Maven 2 when you need to be using Maven 3.

Resources