码迷,mamicode.com
首页 > 编程语言 > 详细

maven添加自定义jar,编译通过,运行抛ClassNotFoundException

时间:2018-01-17 01:18:36      阅读:282      评论:0      收藏:0      [点我收藏+]

标签:addm   des   pos   ons   otf   2.0   div   plugins   dma   


<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>2.3.1</version>
    <configuration>
        <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
            <manifest>
                <mainClass>com.alibaba.dubbo.container.Main</mainClass>
                <useUniqueVersions>false</useUniqueVersions>
                <addClasspath>true</addClasspath>
                <classpathPrefix>lib/</classpathPrefix>
            </manifest>
            <manifestEntries>
              
                <Company>com.baidu</Company>
                <Project>com.baidu.shitu</Project>
                <Support>baidu@qq.com</Support>
                <Built-Time>${maven.build.timestamp}</Built-Time>
                <JAR-Version>1</JAR-Version>
          <!-- 此处添加自定义的jar包 -->
                <Class-Path>lib/alipay-2.0.1.jar</Class-Path>
            </manifestEntries>
        </archive>
    </configuration>
</plugin>

maven添加自定义jar,编译通过,运行抛ClassNotFoundException

标签:addm   des   pos   ons   otf   2.0   div   plugins   dma   

原文地址:https://www.cnblogs.com/cyanfire/p/8297765.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!