Find the intersection of two arrays in java
Example Output
Example Output
Example Output
Example Output
Example Output
Dictionary meaning of cloning. Cloning: make an identical copy of. Object cloning: refers to creation of exact copy of an object. Object class clone() method is used to clone an object in java. Clone() method: Creates and returns a copy of this object. protected Object clone() throws CloneNotSupportedException Note: The class whose object have to … Read more
We can exclude dependency in maven by using the exclusion element. <project> … <dependencies> <dependency> <groupId>test.ProjectTest1</groupId> <artifactId>Project-Test1</artifactId> <version>1.0</version> <scope>compile</scope> <exclusions> //Declare the exclusion here <exclusion> <groupId>test.ProjectTest2</groupId> <artifactId>Project-Test2</artifactId> </exclusion> </exclusions> </dependency> </dependencies> </project><project> … <dependencies> <dependency> <groupId>test.ProjectTest1</groupId> <artifactId>Project-Test1</artifactId> <version>1.0</version> <scope>compile</scope> <exclusions> //Declare the exclusion here <exclusion> <groupId>test.ProjectTest2</groupId> <artifactId>Project-Test2</artifactId> </exclusion> </exclusions> </dependency> </dependencies> </project>
Steps to build maven project offline. Open the the project that you want to build offline. Run the following command: mvn dependency: go -offline See the output. Run the following command: mvn -o clean package Build is successfully completed offline.
Maven build profiles provides the facility to build project using different configurations. We can just specify a profile with the different build configuration and build the project with this build profile when needed. Profiles are specified using a subset of the elements available in the POM itself.