Posts

How to upgrade ANT in Eclipse ?

To upgrade the ANT into the Eclipse, First you need to download the latest version of ANT anywhere on you machine. Once you are done with the download then go to Eclipse → Windows → Preferences → Ant → Runtime → Ant Home and Select the downloaded folder. Now your Eclipse will use the latest version of ANT :)

How to exclude properties file from the Jar file

Problem Statement : Suppose your are working on Java Project which uses Maven structure where your source code is under “ /src/main/java” and all your configuration files like .properties file or xml file are under “ /src/main/resources” and as a final build your final package is a jar but you want without few files from your classpath. Be default Maven plugin adds all the file which comes under resources in jar file. Solution : You can achieve the above task by using maven-jar-plugin as follows : < plugin >     < groupId > org.apache.maven.plugins </ groupId >     < artifactId > maven-jar-plugin </ artifactId >     < version > 2.3 </ version >     < configuration >         < excludes >             < exclude > **/otp.properties </ exclude >         </ excludes >   ...

maven-dependency-plugin (goals “copy-dependencies”, “unpack”) is not supported by m2e

Recently While importing one Maven project into Eclipse(Juno, m2e plug-ins is already installed in Eclipse). I was getting one error in project : maven-dependency-plugin (goals “copy-dependencies”, “unpack”) is not supported by m2e Reason: Eclipse m2e does not support execution, by copying the below code in the build tag resolve the issue. Example: <build> <COPY_CODE_HERE> </build> Code : < pluginManagement > < plugins > <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> < plugin > < groupId > org.eclipse.m2e </ groupId > < artifactId > lifecycle-mapping </ artifactId > < version > 1.0.0 </ version > < configuration > < lifecycleMappingMetadata > < pluginExecutions > < pluginExecution > <...