Design and implementation of the Mother Circle Forum Maven Management

Source: Internet
Author: User

The project briefly introduces:

Three projects: Mama-util,mama-core,mama-core. The Util project deals primarily with Java tools classes. Mama-core involves business logic processing and database interaction, Mama-front mainly includes the controller class, and the front-end js,css content.

MAVEN management is currently implemented in three projects. Some of these jar packages are not in the MAVEN repository and require local dependency.

Resolve local dependencies with issues encountered in MAVEN management. Refer to the article:

compile (compilation scope)
compile is the default scope, and if a scope is not provided, the scope of the dependency is the compilationIn the surrounding. Compilation scope dependencies are available in all classpath, and they are also packaged.
provided (range provided)
provided dependencies are only used when the JDK or a container has provided the dependency. For example,If you develop a Web application, you may need a servlet that is available in the compilation ClasspathAPI to compile a servlet, but you don't want to include this servlet in a packaged warAPI; This servlet API JAR is provided by your application server or servlet container. has been providedThe dependency of a range is available at compile classpath (not at runtime). They are not transitive and do notbe packaged.
Runtime (Runtime range)
runtime relies on the need to run and test the system, but it is not required at compile time. For example,you may only need the JDBC API JAR when compiling, and only need JDBC when runningDrive implementation.
Test (Testing range)
Test range dependencies are not required for general compilation and run time, they are only tested in the test compilation andThe run phase is available. The test scope depends on the previous??? described in.
System (Systems-wide)
system-wide dependencies are similar to provided, but you must explicitly provide a local systemthe path to the jar file in the. This is done to allow compilation based on local objects, which are systempart of the class library. Such artifacts should always be available, and Maven will not find them in the warehouse .it. If you set a dependency scope to a system scope, you must also provide a Systempath element. Note that the range is deprecated (you should always try to go from a public or custom mavenreference dependencies in the warehouse).

below to introduce MAVEN add local dependencies (these are the jar packages under Jre/lib/ext, Not under Classpath) I put them under the src/lib under the project so it's

<dependency><groupid>dnsns</groupid><artifactid>dnsns</artifactid><version >1.0</version><scope>system</scope><systempath>${project.basedir}/src/lib/dnsns.jar </systemPath></dependency><dependency><groupId>localedata</groupId>< Artifactid>localedata</artifactid><version>1.0</version><scope>system</scope> <systemPath>${project.basedir}/src/lib/localedata.jar</systemPath></dependency>< Dependency><groupid>sunjce_provider</groupid><artifactid>sunjce_provider</artifactid ><version>1.0</version><scope>system</scope><systempath>${project.basedir}/ Src/lib/sunjce_provider.jar</systempath></dependency><dependency><groupid>sunpkcs11 </groupId><artifactId>sunpkcs11</artifactId><version>1.0</version><scope> system</scope><systempath>${project.basedir}/src/lib/sunpkcs11.jar</systempath></dependency> 




Of course we can also specify our own path to implement dependent references

Design and implementation of the Mother Circle Forum Maven Management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.