vrealize-developer-tools
vrealize-developer-tools copied to clipboard
Could not find artifact com.vmware.pscoe.build:archetype.keystore:zip:2.0.0 in central
Description
Getting the following when trying to do a 'mvn -U clean install' after / during upgrade to 2.14.14: Could not find artifact com.vmware.pscoe.build:archetype.keystore:zip:2.0.0 in central
Steps to Reproduce
- Install / update workstation config per the fling docs.
- Run 'mvn -U clean install'
Expected behavior: [What you expect to happen] Command should complete successfully.
Actual behavior: [What actually happens] Command fails to build and throws exceptions with the following cause: Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.vmware.pscoe.build:archetype.keystore:zip:2.0.0 in central (https://#######.###.###/repository/vrdt-libs-release)
Reproduces how often: [What percentage of the time does it reproduce?] 100% of the time
Environment
VSCode on Windows 10 talking to Nexus repo.
Client
- vRealize Developer Tools Version: 2.2.1
- vRealize Build Tools Version: 2.14.14
- Visual Studio Code Version: 1.62.3
- OS Version: Windows 10
Server
- vRealize Automation Version: 8.2
- vRealize Orchestrator Version: 8.2
Failure Logs
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.vmware.pscoe.build:archetype.keystore:zip:2.0.0 in central (https://#####.####.###/repository/vrdt-libs-release)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed (ArtifactTransportListener.java:48)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:369)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute (BasicRepositoryConnector.java:644)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:262)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads (DefaultArtifactResolver.java:499)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve (DefaultArtifactResolver.java:401)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts (DefaultArtifactResolver.java:229)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:207)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact (DefaultRepositorySystem.java:262)
at org.apache.maven.shared.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact (Maven31ArtifactResolver.java:108)
at org.apache.maven.shared.artifact.resolve.internal.Maven31ArtifactResolver.resolveArtifact (Maven31ArtifactResolver.java:80)
at org.apache.maven.shared.artifact.resolve.internal.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:73)
at org.apache.maven.shared.artifact.resolve.internal.DefaultArtifactResolver.resolveArtifact (DefaultArtifactResolver.java:73)
at org.apache.maven.plugins.dependency.fromConfiguration.AbstractFromConfigurationMojo.getArtifact (AbstractFromConfigurationMojo.java:249)
at org.apache.maven.plugins.dependency.fromConfiguration.AbstractFromConfigurationMojo.getProcessedArtifactItems (AbstractFromConfigurationMojo.java:169)
at org.apache.maven.plugins.dependency.fromConfiguration.UnpackMojo.getProcessedArtifactItems (UnpackMojo.java:145)
at org.apache.maven.plugins.dependency.fromConfiguration.UnpackMojo.doExecute (UnpackMojo.java:102)
at org.apache.maven.plugins.dependency.AbstractDependencyMojo.execute (AbstractDependencyMojo.java:143)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Related issues and PRs
N/A
Additional Context
This is likely related to this portion of the 2.14.14 settings.xml file configuration – which has zero documentation around it:
<!-- Version >= 2.14 -->
<keystoreGroupId>com.vmware.pscoe.build</keystoreGroupId>
<keystoreArtifactId>archetype.keystore</keystoreArtifactId>
<keystoreVersion>2.0.0</keystoreVersion>
<vroPrivateKeyPem>target/${keystoreArtifactId}-${keystoreVersion}/private_key.pem</vroPrivateKeyPem>
<vroCertificatePem>target/${keystoreArtifactId}-${keystoreVersion}/cert.pem</vroCertificatePem>
<vroKeyPass>########</vroKeyPass>
The 2.14.14 fling does not have any such pem files in it. Could this be a config issue with the above? If so, perhaps a documentation update to the wiki would be in order? https://github.com/vmware/vrealize-developer-tools/wiki/Setup-Developer-Workstation
Could you try to generate a new archetype keystore with the following commands and upload it to your Artifactory solution, replacing the old artifactory keystore.
Creating a keystore
- Running command:
keytool -genkey -v -keystore archetype.keystore -alias dunesrsa_alias -keyalg RSA -keysize 2048 -validity 10000
The required passwords are mapped to the settings.xml variables as follows:
- keystoreArtefactGroupID -> "Enter keystore password" line
- keystorePassword -> "Enter key password for <dunesrsa_alias> (RETURN if same as keystore password)" line
- Running command:
mkdir -p /root/cert/archetype.keystore-2.1.0 cd /root/cert/archetype.keystore-2.1.0
Create the certificates and fill in the required country,state,location,organization detais ...
openssl req -newkey rsa:2048 -new -x509 -days 3650 -keyout private_key.pem -out cert.pem keytool -genkey -v -keystore archetype.keystore -alias dunesrsa_alias -keyalg RSA -keysize 2048 -validity 10000 cd /root/cert zip archetype.keystore-2.1.0.zip -r archetype.keystore-2.1.0
The process will generate the following files:
- archetype.keystore
- cert.pem
- private_key.pem Those need to be put in an archive called "archetype.keystore-2.1.0" (artefact name + version) and deployed on the artefact manager.
Deploying the keystore artefact It should be deployed to any path as long as the settings.xml file points to it. Example:
- artefact group ID: com.clientname.build
- artefact ID: archetype.keystore
- artefact version: 2.1.0
- settings section:
Hi,
We are trying to install the tools for the upgrade to vRA 8 and followed the steps above however getting the following error:
[INFO] info: Using certificate file target/archetype.keystore-2.2.0/private_key.pem
[INFO] info: Using certificate file target/archetype.keystore-2.2.0/cert.pem
[ERROR] \actions\node_modules@vmware-pscoe\vropkg\node_modules\node-forge\lib\x509.js:1280
[ERROR] var error = new Error('Cannot read X.509 certificate. ' +
[ERROR] ^
[ERROR]
[ERROR] Error: Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.
[ERROR] at Object.pki.certificateFromAsn1 (C:.......\git\vro8automation\actions\node_modules@vmware-pscoe\vropkg\node_modules\node-forge\lib\x509.js:1280:17)
[ERROR] at Object.pki.certificateFromPem (C:.....git\vro8automation\actions\node_modules@vmware-pscoe\vropkg\node_modules\node-forge\lib\x509.js:727:14)
[ERROR] at getSubject (C:.....\git\vro8automation\actions\node_modules@vmware-pscoe\vropkg\dist\security.js:73:23)
[ERROR] at C:.....\git\vro8automation\actions\node_modules@vmware-pscoe\vropkg\dist\security.js:20:32
[ERROR] at Array.forEach (
Hi @mcvicthor , I've not seen this error but it seems like something is wrong with the format of the created certificate. Could you try again with the steps from this document -> Section Keystore ? https://github.com/vmware/vrealize-developer-tools/wiki/Setup-Developer-Workstation The steps in there were recently updated so this should help