Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-21160

Unable to build from sources when localRepository declared in settings.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 38.0.0.Final
    • Build System
    • None
    • ---
    • ---

      When trying to use settings.xml which declares <localRepository>/my/path</localRepository> element, the build will fail with:

      $ mvn --settings my-settings.xml clean install -DskipTests -e
      
      ...
      
      [INFO] --- wildfly:5.1.0.Final:provision (server-provisioning) @ wildfly-ee-build ---
      [INFO] Provisioning server in /tmp/wildfly/ee-build/target/wildfly-39.0.0.Beta1-SNAPSHOT
      [INFO] Resolving feature-packs
      [INFO] Installing packages
      [INFO] Resolving artifacts
      [INFO] Generating configurations
      [INFO] Delayed generation, waiting...
      SLF4J(W): No SLF4J providers were found.
      SLF4J(W): Defaulting to no-operation (NOP) logger implementation
      SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
      Forked embedded process has failed with the following error:
      org.wildfly.galleon.plugin.server.ConfigGeneratorException: Failed to generate standalone.xml on {
          "operation" => "composite",
          "address" => [],
          "rollback-on-runtime-failure" => true,
         ...
      }: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-3" => "WFLYCTL0158: Operation handler failed: java.lang.RuntimeException: WFLYCTL0311: Failed to load Extension module org.jboss.as.naming"}}
      	at org.wildfly.galleon.plugin.config.generator.BaseConfigGenerator.doHandle(BaseConfigGenerator.java:147)
      	at org.wildfly.galleon.plugin.config.generator.BaseConfigGenerator.endBatch(BaseConfigGenerator.java:166)
      	at org.wildfly.galleon.plugin.config.generator.ForkedConfigGenerator.executeScript(ForkedConfigGenerator.java:64)
      	at org.wildfly.galleon.plugin.config.generator.ForkedConfigGenerator.forkedForEmbedded(ForkedConfigGenerator.java:46)
      	at org.wildfly.galleon.plugin.server.ForkedProcessRunner.main(ForkedProcessRunner.java:56)
      [INFO] Overall Galleon provisioning took 14.472 seconds
      

      So something with jboss-modules and thin server (modules loaded from maven repo)

      There is a workaround, whenever settings.xml has a <localRepository>, the same path need to be provided also to mvn command via -Dmaven.repo.local:

      $ cat my-settings.xml | head -5
      <?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 http://maven.apache.org/xsd/settings-1.0.0.xsd">
        <localRepository>/tmp/localrepo</localRepository>
      
      $ mvn --settings my-settings.xml clean install -DskipTests -e -Dmaven.repo.local=/tmp/localrepo
      

      But this feels like a bug, galleon / jboss-modules should be able to work with standard maven feature like localRepository defined in settings.xml

              Unassigned Unassigned
              jbliznak@redhat.com Jan Blizňák
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: