Posted in Interview Questions

How do you get sources Jars from Maven Repository?

To get sources Jars and Java docs from Maven Repository you need to execute below Goals: In case you have lot of dependencies, you can…

Continue Reading... How do you get sources Jars from Maven Repository?
Posted in Interview Questions

Java main method

public static void main (String[] args) public public is access specifier which indicates that main() method can be called outside the class. static static methods…

Continue Reading... Java main method
Posted in Interview Questions

What are the elements in POM that a profile can freely modify when specified in the POM?

Profile can modify following elements in POM repositories pluginRepositories dependencies plugins properties, modules reporting dependencyManagement distributionManagement

Continue Reading... What are the elements in POM that a profile can freely modify when specified in the POM?
Posted in Interview Questions

What are the uses of Maven Plugins?

Maven Plugins are used to Create jar file Create war file Compile code files Unit testing of code Create project documentation Create project reports

Continue Reading... What are the uses of Maven Plugins?
Posted in Interview Questions

What is the sequence in which Maven searches for dependency libraries?

Following is the search pattern Search for dependency in the local repository, if not found, move to step 2 else do the further processing Search…

Continue Reading... What is the sequence in which Maven searches for dependency libraries?
Posted in Interview Questions

What would the command mvn clean do?

This command deletes the target directory with all the build data before starting the build process.

Continue Reading... What would the command mvn clean do?
Posted in Interview Questions

Where do you find the class files when you compile a Maven project?

You will find the class files ${basedir}/target/classes/.

Continue Reading... Where do you find the class files when you compile a Maven project?
Posted in Interview Questions

List out what are the build phases in Maven

Following are the phases of Maven build lifecycle validate: validate the project and check if everything is correct and all necessary information is available. compile:…

Continue Reading... List out what are the build phases in Maven
Posted in Interview Questions

Explain how you can exclude dependency?

By using the exclusion element, dependency can be excluded

Continue Reading... Explain how you can exclude dependency?
Posted in Interview Questions

List out the dependency scopes in Maven

The various dependency scopes used in Maven are Compile: It is the default scope, and it indicates what dependency is available in the classpath of…

Continue Reading... List out the dependency scopes in Maven