Delivery Manager Tool - Information - Package Extraction - Creating repositories of jars when not present in project

Purpose

This page describes the process to create repositories of jars if they are not found in the project.

Applicable in CAST Version
Release
Yes/No
8.3.x(tick)
8.2.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS(tick)
Details

If you do not have jars in projects,you can rebuild the project.For the same,you should have the parent pom.xml file and maven plugin.

Maven provides a command line tool. To use this tooling, switch to the command line into a directory which contains a pom.xml.

To run a build with Maven, you just have to point your command line to the folder which includes the pom.xml file and run the command mvn followed by a life cycle phase or goal to execute. .

Maven reads the POM file and tries to resolve the dependencies of the project. Maven validates if required components are available in a local repository, which is placed in the .m2/repository folder of the users home directory. If not Maven tries to download the latest version of the depended artifacts from the central repository into the local repository. Maven executes all life cycle phases until it finishes the "install" phase. This triggers the registered goals, for the jar packaging type this includes compiling the sources, executing the tests and packaging the compiled files in a JAR file. As last step the resulting artifact is saved in the local repository, so it can be used by other projects.

Maven creates the build result in the target folder.

Command to compile, build and install the build result :

maven install 
To ensure that the build target is removed before a new build, add the clean target.

Command to remove previous build results:

maven clean install 
By default, Maven checks online if the dependencies have been changed. If you want to use your local repository, you can use the -o to tell Maven to work offline.

Command to work offline , i.e. use the local maven repository:

maven -o clean install

Also if you have eclipse and Maven plugin installed,you can open the project in Eclipse and rebuild the same.If the dependencies are found in resolvable location,it will rebuild the project with jars.

For more information, please check the following url: Apache Maven

Notes/comments

Ticket  # 3686

Related Pages