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
- duplicates
-
MJAR-41 Cannot specify additional classpath entries in jar manifest when using addClasspath
- Closed