Expand my Community achievements bar.

Who Me Too'd this topic

Avatar

Level 1

Hello,

I am running into an issue trying to build and deploy to an Adobe Managed Services server with the content-package-maven-plugin. The server only has port 443 open for security purposes and will only work with HTTPS rather than an un-secure HTTP connection. I have downloaded and added the SSL certificate from the URL to my Java cacerts file and still the connection gets reset or times out when I try to build and deploy packages to that server through maven. I have also checked our firewall and our ports are open and we allow connection to the AMS server, I can telnet directly to the server with no issues from my local machine.

Regardless, if I use the IP address with the port or the domain attached to the IP address to build to our Author instance it still times out or the connection gets reset.

I also explicitly defined the location of the truststore cacert file in a .mavenrc file, and still no luck.

Here is the .mavenrc file:

MAVEN_OPTS="-Xmx512m  -Djavax.net.ssl.trustStore=/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre/lib/security/cacerts \

                     -Djavax.net.ssl.trustStorePassword=*************"

Here is the plugin configuration for the pom.xml:

<plugin>

    <groupId>com.day.jcr.vault</groupId>

    <artifactId>content-package-maven-plugin</artifactId>

    <version>0.0.24</version>

    <extensions>true</extensions>

    <executions>

          <execution>

               <id>install-package</id>

               <configuration>

                    <failOnError>true</failOnError>

                    <targetURL>https://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>

                    <userId>${sling.user}</userId>

                    <password>${sling.password}</password>

                    <useProxy>false</useProxy>

               </configuration>

          </execution>

     </executions>

</plugin>

Here are the maven commands being used to run the build:

mvn clean install -X -P adobe-public,autoInstallPackage -Daem.host=(IP address or URL) -Daem.port=443

-Dsling.user=******** -Dsling.password=********* -Dvault.user=********** -Dvault.password=**************

Here is a snippet of the logs from the build:

[DEBUG]   (s) skip = false

[DEBUG]   (f) updateReleaseInfo = false

[DEBUG] -- end configuration --

[INFO] Installing /Users/ismailamzovski/git/git2/adobe-experience-manager/common-components/ui.apps/target/common-components.ui.apps-1.0-SNAPSHOT.zip to /Users/ismailamzovski/.m2/repository/tju/common-components.ui.apps/1.0-SNAPSHOT/common-components.ui.apps-1.0-SNAPSHOT.zip

[DEBUG] Writing tracking file /Users/ismailamzovski/.m2/repository/tju/common-components.ui.apps/1.0-SNAPSHOT/_remote.repositories

[INFO] Installing /Users/ismailamzovski/git/git2/adobe-experience-manager/common-components/ui.apps/pom.xml to /Users/ismailamzovski/.m2/repository/tju/common-components.ui.apps/1.0-SNAPSHOT/common-components.ui.apps-1.0-SNAPSHOT.pom

[DEBUG] Writing tracking file /Users/ismailamzovski/.m2/repository/tju/common-components.ui.apps/1.0-SNAPSHOT/_remote.repositories

[DEBUG] Installing tju:common-components.ui.apps:1.0-SNAPSHOT/maven-metadata.xml to /Users/ismailamzovski/.m2/repository/tju/common-components.ui.apps/1.0-SNAPSHOT/maven-metadata-local.xml

[DEBUG] Installing tju:common-components.ui.apps/maven-metadata.xml to /Users/ismailamzovski/.m2/repository/tju/common-components.ui.apps/maven-metadata-local.xml

[INFO]

[INFO] --- content-package-maven-plugin:0.0.24:install (install-package) @ common-components.ui.apps ---

[DEBUG] Configuring mojo com.day.jcr.vault:content-package-maven-plugin:0.0.24:install from plugin realm ClassRealm[extension>com.day.jcr.vault:content-package-maven-plugin:0.0.24, parent: sun.misc.Launcher$AppClassLoader@33909752]

[DEBUG] Configuring mojo 'com.day.jcr.vault:content-package-maven-plugin:0.0.24:install' with basic configurator -->

[DEBUG]   (f) failOnError = true

[DEBUG]   (f) install = true

[DEBUG]   (f) localRepository =       id: local

      url: file:///Users/ismailamzovski/.m2/repository/

   layout: default

snapshots: [enabled => true, update => always]

releases: [enabled => true, update => always]

[DEBUG]   (f) name = common-components.ui.apps

[DEBUG]   (f) packageFile = /Users/ismailamzovski/git/git2/adobe-experience-manager/common-components/ui.apps/target/common-components.ui.apps-1.0-SNAPSHOT.zip

[DEBUG]   (f) packaging = zip

[DEBUG]   (f) password = *****************

[DEBUG]   (f) pomRemoteRepositories = [      id: adobe-public-releases

      url: https://repo.adobe.com/nexus/content/groups/public

   layout: default

snapshots: [enabled => false, update => daily]

releases: [enabled => true, update => never]

,       id: central

      url: https://repo.maven.apache.org/maven2

   layout: default

snapshots: [enabled => false, update => daily]

releases: [enabled => true, update => daily]

]

[DEBUG]   (f) project = MavenProject: tju:common-components.ui.apps:1.0-SNAPSHOT @ /Users/ismailamzovski/git/git2/adobe-experience-manager/common-components/ui.apps/pom.xml

[DEBUG]   (f) relaxedSSLCheck = false

[DEBUG]   (f) repositoryId = temp

[DEBUG]   (f) serviceURL = http://localhost:4502/crx/packmgr/service/.json

[DEBUG]   (f) settings = org.apache.maven.execution.SettingsAdapter@18f13756

[DEBUG]   (f) targetURL = http://**.***.***.***:443/crx/packmgr/service.jsp

[DEBUG]   (f) timeout = 5

[DEBUG]   (f) useProxy = true

[DEBUG]   (f) userId = *******************

[DEBUG]   (f) verbose = true

[DEBUG] -- end configuration --

[INFO] Installing common-components.ui.apps (/Users/ismailamzovski/git/git2/adobe-experience-manager/common-components/ui.apps/target/common-components.ui.apps-1.0-SNAPSHOT.zip) to http://**.***.***.***:443/crx/packmgr/service.jsp

[DEBUG] Set parameter http.useragent = Jakarta Commons-HttpClient/3.1

[DEBUG] Set parameter http.protocol.version = HTTP/1.1

[DEBUG] Set parameter http.connection-manager.class = class org.apache.commons.httpclient.SimpleHttpConnectionManager

[DEBUG] Set parameter http.protocol.cookie-policy = default

[DEBUG] Set parameter http.protocol.element-charset = US-ASCII

[DEBUG] Set parameter http.protocol.content-charset = ISO-8859-1

[DEBUG] Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@48144f1a

[DEBUG] Set parameter http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]

[DEBUG] Set parameter http.protocol.expect-continue = true

[DEBUG] Java version: 1.8.0_73

[DEBUG] Java vendor: Oracle Corporation

[DEBUG] Java class path: /usr/local/Cellar/maven/3.3.9/libexec/boot/plexus-classworlds-2.5.2.jar

[DEBUG] Operating system name: Mac OS X

[DEBUG] Operating system architecture: x86_64

[DEBUG] Operating system version: 10.11.6

[DEBUG] SUN 1.8: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS & DKS keystores; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)

[DEBUG] SunRsaSign 1.8: Sun RSA signature provider

[DEBUG] SunEC 1.8: Sun Elliptic Curve provider (EC, ECDSA, ECDH)

[DEBUG] SunJSSE 1.8: Sun JSSE provider(PKCS12, SunX509/PKIX key/trust factories, SSLv3/TLSv1/TLSv1.1/TLSv1.2)

[DEBUG] SunJCE 1.8: SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)

[DEBUG] SunJGSS 1.8: Sun (Kerberos v5, SPNEGO)

[DEBUG] SunSASL 1.8: Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5, NTLM; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5, NTLM)

[DEBUG] XMLDSig 1.8: XMLDSig (DOM XMLSignatureFactory; DOM KeyInfoFactory; C14N 1.0, C14N 1.1, Exclusive C14N, Base64, Enveloped, XPath, XPath2, XSLT TransformServices)

[DEBUG] SunPCSC 1.8: Sun PC/SC provider

[DEBUG] Apple 1.8: Apple Provider

[DEBUG] Set parameter http.authentication.preemptive = true

[DEBUG] Proxying disabled (useProxy=true) or no proxies configured

[DEBUG] Set parameter http.connection.timeout = 5000

[DEBUG] Preemptively sending default basic credentials

[DEBUG] Authenticating with BASIC <any realm>@**.***.***.***:443

[DEBUG] Credential charset not configured, using HTTP element charset

[DEBUG] Open connection to **.***.***.***:443

[DEBUG] >> "POST /crx/packmgr/service.jsp HTTP/1.1[\r][\n]"

[DEBUG] Adding Host request header

[DEBUG] >> "referer: about:blank[\r][\n]"

[DEBUG] >> "Authorization: Basic YWRtaW46QCtaUXhnRHtRRmJ9MjI=[\r][\n]"

[DEBUG] >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"

[DEBUG] >> "Host: **.***.***.***:443[\r][\n]"

[DEBUG] >> "Expect: 100-continue[\r][\n]"

[DEBUG] >> "Content-Length: 22163848[\r][\n]"

[DEBUG] >> "Content-Type: multipart/form-data; boundary=smpKOUIeCnt3x9GfgLQfDSGy6WmiIvKh_-GbdTfY[\r][\n]"

[DEBUG] >> "[\r][\n]"

[DEBUG] Closing the connection.

[INFO] I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server **.***.***.*** failed to respond

[DEBUG] The server **.***.***.*** failed to respond

org.apache.commons.httpclient.NoHttpResponseException: The server **.***.***.*** failed to respond

at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1976)

at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2082)

at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)

at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)

at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)

at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)

at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)

at com.day.jcr.vault.maven.mgr.AbstractPackageManagerMojo.postRequest(AbstractPackageManagerMojo.java:228)

at com.day.jcr.vault.maven.mgr.PackageInstallMojo.uploadPackage(PackageInstallMojo.java:267)

at com.day.jcr.vault.maven.mgr.PackageInstallMojo.execute(PackageInstallMojo.java:200)

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:497)

at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

[INFO] Retrying request

[DEBUG] Open connection to **.***.***.***:443

[DEBUG] >> "POST /crx/packmgr/service.jsp HTTP/1.1[\r][\n]"

[DEBUG] Adding Host request header

[DEBUG] >> "referer: about:blank[\r][\n]"

[DEBUG] >> "Authorization: Basic YWRtaW46QCtaUXhnRHtRRmJ9MjI=[\r][\n]"

[DEBUG] >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"

[DEBUG] >> "Expect: 100-continue[\r][\n]"

[DEBUG] >> "Content-Length: 22163848[\r][\n]"

[DEBUG] >> "Content-Type: multipart/form-data; boundary=smpKOUIeCnt3x9GfgLQfDSGy6WmiIvKh_-GbdTfY[\r][\n]"

[DEBUG] >> "Host: **.***.***.***:443[\r][\n]"

[DEBUG] >> "[\r][\n]"

[DEBUG] Closing the connection.

[INFO] I/O exception (org.apache.commons.httpclient.NoHttpResponseException) caught when processing request: The server **.***.***.*** failed to respond

[DEBUG] The server **.***.***.*** failed to respond

org.apache.commons.httpclient.NoHttpResponseException: The server **.***.***.*** failed to respond

at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1976)

at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2082)

at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)

at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)

at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)

at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)

at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)

at com.day.jcr.vault.maven.mgr.AbstractPackageManagerMojo.postRequest(AbstractPackageManagerMojo.java:228)

at com.day.jcr.vault.maven.mgr.PackageInstallMojo.uploadPackage(PackageInstallMojo.java:267)

at com.day.jcr.vault.maven.mgr.PackageInstallMojo.execute(PackageInstallMojo.java:200)

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:497)

at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

at

org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

DEBUG] Releasing connection back to connection manager.

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO]

[INFO] common-components .................................. SUCCESS [  0.190 s]

[INFO] common-components - Core ........................... SUCCESS [  2.090 s]

[INFO] common-components - UI apps ........................ FAILURE [  4.315 s]

[INFO] common-components - Integration Tests Bundles ...... SKIPPED

[INFO] common-components - Integration Tests Launcher ..... SKIPPED

[INFO] enterprise ......................................... SKIPPED

[INFO] enterprise - Core .................................. SKIPPED

[INFO] enterprise - UI apps ............................... SKIPPED

[INFO] enterprise - Integration Tests Bundles ............. SKIPPED

[INFO] enterprise - Integration Tests Launcher ............ SKIPPED

I have noticed the targetUrl variable is always set to HTTP even if I explicitly set it to HTTPS in the assignment of it.  And I tried setting the relaxedSSLCheck flag to true but I do not know how to go about doing that, is that set in the pom.xml or elsewhere?

The end goal is to have Jenkins build and deploy our packages to our author server, however I cannot seem to get it to deploy over HTTPS locally with maven or in Jenkins. Is there some other plugin I should be using, or am I configuring this incorrectly? Can you please help?

I was following this documentation and I see no mention on how to deploy over HTTPS, only HTTP: Managing Packages Using Maven

Who Me Too'd this topic