lib jar maven

There is an extremely hidden error when building a project using the user library. The dependencies of maven are correct, but there are old ones in the web-info. Since the jar in the web-info lib is used first, the version is always wrong. I built mybatis integration

before . When the general mapper is used, there is an old version of mybatise in the lib (although the version in maven is correct, lib is used first), which causes the plug-in mapper to not be integrated.

Any plug-in application (general mapper, PageHelper (paging)), all rely on a master The version matching

==================================================

lib After bulid, you need to right-click on the project properties and add

maven. After installing it like jdk, you must specify it for use, and specify
a user Library added locally in setting.xml (there are some local packages, which cannot be downloaded from the remote maven warehouse))
An error occurred when the maven clean install command was packaged (it was prompted that the jar could not be found, in fact, the project has it, but it was not found in the maven system, so the maven system was added and removed from the project)
For javax.servlet-api, web server When the middleware is packaged in the project, an error will occur. At this time, you can limit the scope
<scope>provided</scope> horizontal dependencies, resolve conflicts, and vertical dependencies (the first dependency for the same level, and the shortest level for different levels) ,
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency> 
         <groupId>com.alibaba</groupId> 
         <artifactId>dubbo</artifactId> 
         <exclusions>
<exclusion>//Resolve Dependency conflict within jar package
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
</exclusions>
    </dependency> 

mvn install:install-file -Dfile=neuroph-2.6.jar - DgroupId=org.neuroph -DartifactId=neuroph -Dversion=2.6 -Dpackaging=jar
can install the jar package in your own lib to the local repository. When using, remember to replace the corresponding information above

. The jar that maven can't find can be found here, and then execute the local script, which contains the source code
http://www.

Conflicts can also be resolved with execute




Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326569940&siteId=291194637