Uploaded image for project: 'Maven JAR Plugin'
  1. Maven JAR Plugin
  2. MJAR-55

possibility to add arbitrary elements to the manifest classpath

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      I want to add '.' (the current directory) to the classpath.

      The main reason for this is to be able to access files like
      log4j.properties
      hibernate.cfg.xml
      ...
      outside the jar, so I don't have to rebuild my jar if, e.g., I want to increase the log4j level for a particular class.
      Or ask my client over the phone to increase the level and send me the log file.

      The only thing I came up with was this possible improvement:
      current config of the manifest:
      <configuration>
      <archive>
      <manifest>
      <addClasspath>true</addClasspath>
      <mainClass>be.brail.b38c.loadtester.AppLoadTester</mainClass>
      </manifest>
      </archive>
      </configuration>

      possible extension of manifest config
      <configuration>
      <archive>
      <manifest>
      <addClasspath>true</addClasspath>
      <additionalClasspathEntries>
      <classpathEntry>./</classpathEntry>
      <classpathEntry>help/</classpathEntry>
      <classpathEntry>resources/</classpathEntry>
      </additionalClasspathEntries>
      <mainClass>be.brail.b38c.loadtester.AppLoadTester</mainClass>
      </manifest>
      </archive>
      </configuration>

      By adding
      public List org.apache.maven.archiver.ManifestConfiguration.getAdditionalClasspathEntries()
      people could be allowed to add not only the dependent jars to the classpath but also any arbitrary directory.

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              mverbist Michel Verbist
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: