Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-929

Improper SLF4J dependency

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      Currently, velocity-engine-core defines a transitive dependency of "slf4j-api" as a compile time dependency, rather than a non-transitive compile time dependency as seen by snippet below

          <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.30</version>
            <scope>compile</scope>
          </dependency>
      

      Instead, the dependency's scope should be provided. This prevents classpath races and leaves it up to the user/developer to pull in the necessary slf4j API dependency for their project.

      Currently I use the following workaround to exclude the slf4j dependency

              <dependency>
                  <groupId>org.apache.velocity</groupId>
                  <artifactId>velocity-engine-core</artifactId>
                  <version>2.2</version>
                  <exclusions>
                      <exclusion>
                          <groupId>org.slf4j</groupId>
                          <artifactId>slf4j-api</artifactId>
                      </exclusion>
                  </exclusions>
              </dependency>
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Dragas Mantas Gridinas
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: