use*_*026 12 java manifest maven
当使用maven-jar-plugin时, 
 
我想在Manifest.mf中添加条目, 
 
所以它将包含:
 
Class-Path :.
当我将此条目添加到Pom时:
<Class-Path>.</Class-Path> 
它将创建具有所有依赖性的
 Class-Path 
Like:
 
Class-Path :. jar1name.jar jar2name.jar等
 
而不仅仅是 
 
Class-Path :.
有没有办法避免maven将所有jar名称添加到Class-Path?
谢谢
    <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                    </manifest>
                    <manifestEntries>
                        <Built-By>Me</Built-By>
            <Class-Path>.</Class-Path> 
                    </manifestEntries>
                </archive>
            </configuration>
        </plugin>
use*_*026 24
这样就
 
省去了addClasspath并添加了manifestEntries
 
现在,log4j.properties可以驻留在jar之外 - 并且仍然可以找到...
                <manifest>
                    <addClasspath>true</addClasspath>
                </manifest>
这是有效的:
    <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <archive>
                    <manifestEntries>
                        <Built-By>Me</Built-By>
             <Class-Path>.</Class-Path>
                    </manifestEntries>
                </archive>
            </configuration>
        </plugin>
输出:
 Manifest-Version: 1.0
 Archiver-Version: Plexus Archiver
 Created-By: Apache Maven
 Build-Jdk: 1.6.0_45
 Built-By: Me
 Class-Path: .