Uploaded image for project: 'ShrinkWrap Resolvers'
  1. ShrinkWrap Resolvers
  2. SHRINKRES-240

Configuring from settings.xml fails if there is a Travis ${env.VAR} in <password>

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate Issue
    • None
    • 2.2.2
    • None
    • None

    Description

      aslak@redhat.com and mjobanek this is the issue I told you about in Peagas about two weeks ago

      We have a code like this in {{createDeployment() }}:

       File[] libs = Maven.configureResolver().fromFile(shrinkwrapMavenSettings).loadPomFromFile("pom.xml")
                      .resolve("org.hawkular.commons:hawkular-rest-status", "com.squareup.okhttp:okhttp")
                      .withTransitivity().asFile();
      

      If shrinkwrapMavenSettings points to a settings.xml file that contains something like the following

        <servers>
          <server>
            <id>jboss-snapshots-repository</id>
            <username>${env.NEXUS_DEPLOY_USERNAME}</username>
            <password>${env.NEXUS_DEPLOY_PASSWORD}</password>
          </server>
        </servers>
      

      then the above snippet fails with

      java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.spec.WebArchive org.hawkular.commons.rest.status.itest.StatusEndpointITest.createDeployment()
      	at org.hawkular.commons.rest.status.itest.StatusEndpointITest.createDeployment(StatusEndpointITest.java:52)

      I admit the Exception of the message is not very helpful, but that's what I get from Maven.

      We have a workaround in place https://github.com/hawkular/hawkular-commons/blob/8664a3ebb8920349396949e6cc4f5991b2469524/hawkular-nest/hawkular-nest-itest/pom.xml#L181

      The commit in the following PR deactivates the workaround and shows the issue
      https://github.com/hawkular/hawkular-commons/pull/48

      Attachments

        Activity

          People

            mjobanek Matous Jobanek
            ppalaga Peter Palaga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: