Thursday, July 26, 2012

How to overcome jQuery conflict

 The below code is used to overcome the jQuery conflict

   <script src='jquery-1.3.2.js' > </script>

   
<script>    var jq132 = jQuery.noConflict();     </script>

    
<script src='jquery-1.4.2.js'> </script>

  
<script>var jq142 = jQuery.noConflict();   </script> 

Thursday, July 12, 2012

To Store External JAR file into a local Repository of Maven

To store External JAR into your Local Repository of Maven .

1. First you need to modify the " settings.xml " which is present with in the " conf  " folder of maven installed folder .

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" >
localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository


  < localRepository>  /opt/apache-maven-3.0.4/repositoryfolder </localRepository> 


You need to create " repositoryfolder " inside the maven installed folder .

NOTE : if you are creating a folder in Linux OS then you need to change the permissions to that folder , you need to change the ownership to the current user .

        ex :  chown username : username repositoryfolder                                      

If the first step is already done then you can continue from the second step.

2. To use the External JAR's ,the External JAR's must be placed in the local repository in the correct place in order for it to be correctly picked up by Maven. To make this easier, and less error prone, we have provide a goal in the install plug-in which should make this relatively painless. 

To install a External JAR in the local repository use the following command :

 ex  :  mvn install:install-file -Dfile=d:\myfolder\myjar.jar 
 -DgroupId=com.mygroup -DartifactId=myjar -Dversion=1.0.0  
-Dpackaging=jar

After doing this it will be use to download the External JAR file into your local Repository .

3. Modify the pom.xml file 
    
After doing the above steps you need to modify the " pom.xml " file like this

ex :
<dependency>
  <groupId>com.mygroup</groupId>
 <artifactId>myjar</artifactId>
 <version>1.0.0</version>
  </dependency

Liferay DXP JNDI Data Source Cofiguration

 This Blog will help us to learn about the JNDI Data Source Configuration in Liferay DXP. We have tested this with Liferay 7.3 with Tomcat. ...