Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
I am trying to configure Maven and start a project, as documented here:
https://www.oxygenxml.com/oxygen_sdk/download.html
I am using:
- Windows 10
- Eclipse Version: 2019-12 (4.14.0)
- Oxygen 21.1
Code: Select all
<?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
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<repositories>
<repository>
<id>oxygenxml</id>
<name>Oxygen XML</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://www.oxygenxml.com/maven</url>
<layout>default</layout>
</repository>
</repositories>
</profile>
</profiles>
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>a.proxy.com</host>
<port>9090</port>
<username></username>
<password></password>
<nonProxyHosts>localhost,127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
</settings>
Code: Select all
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=com.oxygenxml.samples -DarchetypeArtifactId=oxygen-sdk-samples-archetype -DarchetypeVersion=21.1.0.2 -DgroupId=myGroup -DartifactId=mySample -Dversion=1.0-SNAPSHOT -DarchetypeRepository=http://oxygenxml.com/maven/
Code: Select all
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2) -> [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/MojoFailureException
Code: Select all
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- archetypeGroupId: com.oxygenxml.samples
- archetypeArtifactId: oxygen-sdk-samples-archetype
- archetypeVersion: 21.1.0.2
- archetypeRepository: http://oxygenxml.com/maven/
Code: Select all
Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
org.eclipse.core.runtime.CoreException: Could not resolve artifact
I've tried the following suggestions from this site, but either they don't work or they don't apply. Maybe because they are for earlier versions of Eclipse:
Thanks for your help,
Will
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Post by alex_jitianu »
Such exceptions usually happen when maven connects to a repository through HTTPS, but as I see from your snapshots, the URLs to the repository are all with HTTP. I'm not entirely sure why would Maven use https... What version of Maven are you using? Perhaps the proxy is receiving plain HTTP requests from clients and forwarding HTTPS requests to upstream servers transparently?
There is a procedure on stackoverflow describing how to make the certificate known to the maven process. You'll need to get the certificate from https://www.oxygenxml.com/maven/, instead.
Anyway, what to you want to do with the SDK? Customize the Standalone distribution, the Eclipse plugin or the Web Author? Is it a framework-level customization or a plugin one? As a workaround, if you need to create a Workspace Access plugin, there is a startup project available on GitHub which perhaps wont fall into this error.
Best regards,
Alex
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Thank you very much for your response! You gave me some great info to work with.
I am trying to develop a plugin for the standalone version of Oxygen, which will be distributed to a team of internal writers.
The maven version is the one that comes with the current Eclipse install:
Code: Select all
Eclipse.org - m2e Maven Integration for Eclipse 1.14.0.20191209-1925 org.eclipse.m2e.feature
Code: Select all
Description Resource Path Location Type
Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central (https://repo.maven.apache.org/maven2): www-proxy.us.oracle.com pom.xml /bundle-options line 1 Maven Configuration Problem
Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central (https://repo.maven.apache.org/maven2): www-proxy.us.oracle.com pom.xml /oxygen-sample-swing-component line 1 Maven Configuration Problem
Code: Select all
-Xmx512m -Djavax.net.ssl.trustStore=trust.jks -Djavax.net.ssl.trustStorePassword= -Djavax.net.ssl.keyStore=C:\temp\mavenKeystore -Djavax.net.ssl.keyStoreType=pkcs12 -Djavax.net.ssl.keyStorePassword=<password>
I am researching more on MAVEN_OPTS, in case I am configuring it wrong.
I was also able to get the project from GIT hub, but had the same issue:
Code: Select all
Description Resource Path Location Type
Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:3.0.2 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:3.0.2 from/to central (https://repo.maven.apache.org/maven2): www-proxy.us.oracle.com pom.xml /sample-plugin-workspace-access line 1 Maven Configuration Problem
I really appreciate your help.
Will
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Post by alex_jitianu »
From what I've read, m2e doesn't honor MAVEN_OPTS. The first thing that comes to mind is to configure Eclipse to use the external Maven installation, the same you've used to create the project. In the past I had to do that myself to bypass various strange errors. To do that, you need to go to Preferences, on page Installations. Afterwards, Eclipse will invoke the external maven which should take into account the MAVEN_OPTS environment variable.
Best regards,
Alex
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
I just realized – is this your training on youtube (https://youtu.be/23YSwgxyX-c)? It’s a great introduction. Thanks very much for posting it.
I’ve added the external maven install to Windows > Preferences > Maven > Installations.
I’ve tried several variations of MAVEN_OPTS:
Code: Select all
-Xmx512m -Djavax.net.ssl.trustStore=trust.jks -Djavax.net.ssl.trustStorePassword= -Djavax.net.ssl.keyStore=C:\temp\mavenKeystore -Djavax.net.ssl.keyStoreType=pkcs12 -Djavax.net.ssl.keyStorePassword=<password>
Code: Select all
-Djavax.net.ssl.trustStore=C:\temp\mavenKeystore
Code: Select all
-Djavax.net.ssl.trustStore=C:\temp\mavenKeystore -Djavax.net.ssl.trustStorePassword=<password>
But it still won’t resolve:
Code: Select all
[ERROR] Failed to execute goal on project mySample: Could not resolve dependencies for project myGroup:mySample:pom:1.0-SNAPSHOT: Failed to collect dependencies at com.oxygenxml:oxygen-sdk:jar:21.1.0.2: Failed to read artifact descriptor for com.oxygenxml:oxygen-sdk:jar:21.1.0.2: Could not transfer artifact com.oxygenxml:oxygen-sdk:pom:21.1.0.2 from/to oxygenxml (https://oxygenxml.com/maven/): Transfer failed for https://oxygenxml.com/maven/com/oxygenxml/oxygen-sdk/21.1.0.2/oxygen-sdk-21.1.0.2.pom ProxyInfo{host='proxy-server.com', userName='null', port=80, type='http', nonProxyHosts='null'}: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
Also researching other possibilities.
Have you tried setting the options in the .mvn/jvm.config file (https://maven.apache.org/configure.html)? Is that a valid option for Eclipse?
In Eclipse > Windows > Preferences > Maven > Source Lookup, I see “VM Arguments and “.launch file VM arguments”. Would either of those be the JVM running MVN? Would either of those take the trustStore parameters?
Thank you very much for your help, and have a good weekend.
Will
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Post by alex_jitianu »
Thank you for the kind words!
You are right! I've tested myself and the Eclipse m2e plugin doesn't take into account the MAVEN_OPTS system property. I've tested the .mvn/jvm.config file as well and that too is completely ignored.
If I understand it correctly, you are at the point where you have the plugin project, you just need to be able to execute maven commands from within Eclipse. To do that you can configure individual maven commands. For example let's assume that you want to build your project which is normally done by running mvn package. You would do it like this:
- in Eclipse Package Explorer, invoke the contextual menu on the project and choose Run as-> Maven build...
- a configuration dialog appears. In the Goals field enter: package
- select the JRE tab and in the VM arguments text area put all those properties:
Code: Select all
-Xmx512m -Djavax.net.ssl.trustStore=trust.jks -Djavax.net.ssl.trustStorePassword= -Djavax.net.ssl.keyStore=C:\temp\mavenKeystore -Djavax.net.ssl.keyStoreType=pkcs12 -Djavax.net.ssl.keyStorePassword=<password>
- click Run
You can save this configuration as a Favorites to make it more accessible. The Run as... action on the Eclipse toolbar has in its dropdown has a Organize Favorites... action.
Best regards,
Alex
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Thanks very much – I really appreciate the help. Using what you just posted, with one difference, I was able to build. What I did was:
1. In Eclipse Package Explorer, right-click on the project and selected Run as-> Maven build...
2. On the Edit Configuration dialog, Main tab, entered “package” in the Goals field.
3. On the Edit Configuration dialog, JRE tab, entered the following in the VM arguments field:
Code: Select all
-Dmaven.wagon.http.ssl.insecure=true
Because no matter what I tried, I couldn’t get the actual trustStore JVM parameters to work in Eclipse.
But now that it has built, the pom shows two errors:
Code: Select all
Multiple annotations found at this line:
- Failure to transfer com.oxygenxml:oxygen-sdk:jar:21.1.0.2 from https://oxygenxml.com/
maven/ was cached in the local repository, resolution will not be reattempted until the update
interval of oxygenxml has elapsed or updates are forced. Original error: Could not transfer artifact
com.oxygenxml:oxygen-sdk:jar:21.1.0.2 from/to oxygenxml (https://oxygenxml.com/maven/):
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to
requested target org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer
com.oxygenxml:oxygen-sdk:jar:21.1.0.2 from https://oxygenxml.com/maven/ was cached in the
local repository, resolution will not be reattempted until the update interval of oxygenxml has
elapsed or updates are forced. Original error: Could not transfer artifact com.oxygenxml:oxygen-
sdk:jar:21.1.0.2 from/to oxygenxml (https://oxygenxml.com/maven/):
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to
requested target at ....
- Missing artifact com.oxygenxml:oxygen-sdk:jar:21.1.0.2
I found a bunch of files in the following folder:
Code: Select all
C:\Users\<another_folder>\.eclipse\org.eclipse.oomph.p2\cache
Thanks again,
Will
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Post by alex_jitianu »
I'm glad to hear that you made it work!
These errors appear when you open the pom file, right? The custom configuration you created, the one with VM arguments, is not used in this particular case. If these errors are the only nuisance then I suggest to just ignore them.But now that it has built, the pom shows two errors:
Best regards,
Alex
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
I am working through the training video you posted now. Again, it is excellent - thanks very much for that!
I think something is missing from my setup, though.
- I don't get the autocorrect features after deleting everything from the , as you do in the video
Code: Select all
CustomWorkspaceAccessPluginExtension.java
- When I manually type the and
Code: Select all
applicationStarted
methods, then try to view the autocomplete list for theCode: Select all
applicationClosing
object, I get a dialog that says "The compilation unit is not on the build path of a Java project"Code: Select all
pluginWorkspace
Have a good weekend.
Will
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Post by alex_jitianu »
Yes, it sounds like there are still missing jars... If you take a look at the project structure inside Eclipse's Package Explorer view, you should be able to see a Maven Dependencies entry. If you expand it, do you see an entry labeled oxygen-{version}.jar ?
I think I may have found an option to pass those system properties to the JVM used by the .:
1. Go to Preferences on page Installed JREs
2. Edit the default JRE (the one with a selected check box to its left) and click Edit
3. There's a text field named Default VM arguments. Put the
Code: Select all
-Djavax.net.ssl.trustStore=........
Actually, to be sure, if you have multiple JREs defined inside Eclipse's options, you can set those properties to all of them (just in case the Maven build prefers a different one).
Best regards,
Alex
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Thanks very much.
I couldn't find the Maven Dependencies option under Package Explorer for the project created from the command line.
So instead, I created a new Workspace and followed the instructions you sent last round, with a small change:
1. Go to Preferences on page Installed JREs
2. Edit the default JRE (the one with a selected check box to its left) and click Edit
3. There's a text field named Default VM arguments. Put the
Code: Select all
-Dmaven.wagon.http.ssl.insecure=true
And I was able to create a project from the maven archetype. The code autocomplete works, too.
I was able to get through part of your training on youtube. I got as far as modifying the
Code: Select all
CustomWorkspaceAccessPluginExtension.java
Code: Select all
customizeView
Code: Select all
applicationStarted
But, I am getting the following error, in both Eclipse:
Code: Select all
24527 ERROR [ Addons checker ] ro.sync.exml.addons.ExtensionInfo - ro.sync.exml.addons.d: Unable to load add-on "com.oxygenxml.plugin.WorkspaceAccess". The version must have this "MAJOR.MINOR.PATCH" pattern. Current version: 0.0.1-SNAPSHOT.0.
ro.sync.exml.addons.d: Unable to load add-on "com.oxygenxml.plugin.WorkspaceAccess". The version must have this "MAJOR.MINOR.PATCH" pattern. Current version: 0.0.1-SNAPSHOT.0.
at ro.sync.exml.addons.ExtensionInfo.b(Unknown Source)
at ro.sync.exml.addons.ExtensionInfo.e(Unknown Source)
at ro.sync.exml.addons.ExtensionInfo.createExtension(Unknown Source)
at ro.sync.exml.addons.b.h(Unknown Source)
at ro.sync.exml.addons.b.f(Unknown Source)
at ro.sync.exml.addons.ExtensionsManager.<init>(Unknown Source)
at ro.sync.exml.addons.b.b.<init>(Unknown Source)
at ro.sync.exml.addons.b.b.<init>(Unknown Source)
at ro.sync.exml.addons.c.c.lzd(Unknown Source)
at ro.sync.exml.addons.c.c.dxd(Unknown Source)
at ro.sync.ui.application.mb.run(Unknown Source)
Code: Select all
Severity: error
Description: Unable to load add-on "com.oxygenxml.plugin.WorkspaceAccess". The version must have this "MAJOR.MINOR.PATCH" pattern. Current version: 0.0.1-SNAPSHOT.0.
Code: Select all
version="1.1.1"
Still searching online for an answer.
Anyway - thanks a ton for your help!
Will
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Post by alex_jitianu »
That's probably because Eclipse didn't detected the Maven nature of the project. When that happens, you can go to the Project Explorer, show the contextual menu on the project and select Configure->Convert to Maven projectI couldn't find the Maven Dependencies option under Package Explorer for the project created from the command line.
The error you are receiving relates to the extension.xml file. that file is useful for packing the plugin as an add-on. The file contains Maven variables that should be expanded when the project is built:
Code: Select all
<xt:version>${project.parent.version}.0</xt:version>
<xt:oxy_version>${project.parent.version}</xt:oxy_version>
Code: Select all
<file>
<source>extension.xml</source>
<outputDirectory>/</outputDirectory>
<filtered>true</filtered>
</file>
Best regards,
Alex
-
- Posts: 48
- Joined: Sat Jan 04, 2020 1:17 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
For now, I am just going to ignore the version error, because everything else is working.
I was able to make it through your training class on youtube (https://youtu.be/23YSwgxyX-c). It was a great introduction - thank you very much for posting it! Do you have other videos, or other such excellent resources?
Thanks a ton - I really appreciate your help!
Will
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Can't resolve Archetype com.oxygenxml.samples:oxygen-sdk-samples-archetype:21.1.0.2
Post by alex_jitianu »
The SDK landing page is a good starting point to understand what kind of customization you need and to decide in what direction to go. If you give me more details about how you want to extend Oxygen , what extra functionality you need, then perhaps I can point you to more resources.
Best regards,
Alex
Return to “SDK-API, Frameworks - Document Types”
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service