Deployment to application servers uses deployment profiles which rely on project metadata for the default mappings. Default contributors to the profiles are based on project dependencies, although you can customize the deployment profiles to change them.

The rules governing dependencies are:

  1. If project A depends on the build output of project B, then the build output of project B is merged into project A. If project A is a web application, this means the build outputs of project A and project B are both copied into the WEB-INF/classes of the resulting WAR. 如果Project1依赖于project2的build输出,那么project2的build结果需要merge到project1中去。

    Merging implies that you can only have one copy of any particular URI, because it can only exist once within WEB-INF/classes.

  2. If project A depends on the deployment profile of project B, for example a JAR profile, then the result of that deployment profile is included in the WEB-INF/lib of the resulting WAR. 如果project1依赖于project2的部署profile,那么那个profile的结果也要被包含在project1的lib中去。

  3. All libraries marked Deploy by Default for a web project are deployed as a web application library (in the WEB-INF/lib of the WAR). web应用的所有依赖包都会部署到WEB-INFO/lib.

  4. All libraries marked Deploy by Default for an EJB project are deployed as an application library (in the lib of the EAR). EJB项目默认部署的lib作为application的lib. 

  5. If an EJB Project A depends on the build output of Project B, the build output (e.g. classes directory) of Project B is merged with the build output of Project A and deployed in the root directory of the EJB JAR. 如果EJB project1依赖project2的build结果,那么project2的build结果需要merged到project1的build结果中去,并且部署到EJB Jar的根目录中去。

Application level deployment profiles are:

  • EAR files: Used to deploy the Java EE enterprise archive (EAR) file. The EAR file consists of the application's assembled WAR, EJB JAR and client JAR files.

  • MAR files: Used for deploying metadata archive files for seeded customizations or base metadata in an MDS repository in the application server. For more information about MAR files, refer to the appropriate developer's guide for the Oracle® Fusion Middleware product you are using.

Project level Java EE deployment profiles are:

 

官方原文:

https://docs.oracle.com/cd/E24382_01/user.1112/e17455/deploying_apps.htm#OJDUG667

  • ADF Library JAR file: Used for deploying ADF components as an application JAR file, which can be reused in ADF applications, or it can be used to build other ADF libraries.

  • Business Components archive file: Creates a simple archive file for deploying ADF Business Components.

  • Business Components EJB Session Bean: Creates a profile for deploying ADF Business Components as an EJB session bean.

  • Business Components Service Interface: Creates a profile for deploying ADF Business Components as a service interface.

  • Client JAR files: Used for deploying the standard Java EE client JAR file.

  • EJB JAR files: Used to deploy the Java EE EJB module (EJB JAR). The EJB JAR contains the EJB components and the corresponding deployment descriptors.

  • Extension JAR file: Creates a profile for deploying an extension as a JAR file.

  • JAR file: Creates a simple JAR archive from a project.

  • OSGi bundle: Creates an OSGi bundle that can be deployed to an OSGi container. You use this when you create extensions to JDeveloper.

  • RAR file: Creates a profile for deploying a Java EE connector RAR file.

  • Shared Library JAR file: Creates a profile for deploying a simple archive, which can be a JAR of ZIP file, to the file system or as a shared library to a remote server.

  • Taglib JAR file: Creates a profile for deploying custom tag libraries to a JAR file.

  • WAR files: Used to deploy the JAVA EE web module (WAR). The WAR consists of the web components (JSPs and servlets) and the corresponding deployment descriptors.

  •  

发表评论