Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts

Friday, January 7, 2011

deploy weblogic using maven2

I tried to deploy my app into weblogic app server using maven2. Yes, there are a few ways. You can use cargo and weblogic maven plugin. I just tried to use the simple 1 which is the cargo plugin. It seems that this plugin has a problem on the repo. I got so many problem of redirection problem (as the maven2 has a problem on doing redirection once the repository is moved to another server). This gave me a problem of the metadata in my local repository. It seems to many things to do and I just gave up on dealing with this plugin.

Having such problem on the cargo plugin. I try to use weblogic plugin as in the following:
http://mojo.codehaus.org/weblogic-maven-plugin

The following are the steps that I go through to get my app deployed onto my weblogic.
1. Insert the following piece of xml code onto the settings.xml. Insert the following configuration:

weblogic
https://nexus.codehaus.org/content/repositories/releases



weblogic
https://nexus.codehaus.org/content/repositories/releases


2. Insert the following piece of xml code into


org.apache.maven.plugins
maven-war-plugin
2.0.2


org.codehaus.mojo
weblogic-maven-plugin
2.9.1


deploy

deploy
start




mpl-web
${wls.adminServerHostName}
${wls.adminServerPort}
t3
${wls.userId}
${wls.password}
true
true
false
false
${wls.targetname}
true



weblogic
wlfullclient
${weblogic.version}


weblogic
com.bea.core.descriptor.wl
1.1.0.0




3. As you might see on the above configuration that the plugin needs 2 weblogic's plugins. Those are wlfullclient and com.bea.core.descriptor.wl. I just need to install the manually. You can find artifact com.bea.core.descriptor.wl in the directory of /modules. While the other artifact is a merged of all the jar files which located in the /wlserver_10.3/server/lib. So that, you can get the files simply do the following steps:
a. go to the mentioned directory.
b. execute the following command to merge all jars:

java -jar ../../../modules/com.bea.core.jarbuilder_X.X.X.X.jar
java -jar wlfullclient.jar

4. Create the war package of your app by executing the following command: mvn package
I use maven-war-plugin version 2.0.2 to package my application as the default version seems to have a problem.

5. Deploy the app to a running weblogic (Ensure that the weblogic server is running). Take a note that I am using a remote deployment instead of local one even the app server is on my local.
Execute the following command the get it deployed.
mvn weblogic:deploy

Monday, November 16, 2009

Building and Running shindig source on eclipse

Well, running or debugging any java sources managed by maven inside eclipse is as easy as running any simple application in eclipse. The only thing that you need is maven integration plugin. This is a super power plugin when your application deal a lot with maven. I just started to fall in love with eclipse instead of his competitor, Intellije IDEA, which always falls on the error of classpath. I need to delete the current working space and then rebuild it again. Its very annoying.

Yeps, maybe better to tell you a bit story of using this IDEA, a very lame tool to develop your application. The slogan should not be "Develop with pleasure", but it should be "Develop with pressure" instead. Many people agree with this slogan. Perhaps, we really need to tell them this new slogan. I have been using this IDEA to develop and learn about Confluence and JIRA source. However, everyday, I restart my computer, it always fall on the classpath error. It says that it cannot find xxx class while yesterday i build it without any problem. Then, the only thing that I can do is to build it again. It takes a lot of time indeed. Thus, I recommend you for not using IDEA to develop your application. It will only give you pressure because you spend a lot of time to rebuild your source.

Anyway, back to eclipse. I am using this tool to build, running and debugging the source of shindig. Yeps, it is pretty much easy. You just need to install the plugin on this url:
http://m2eclipse.sonatype.org/update/

well, you should get the list of plugins need to be installed. Just pick the core and then installed and restart your eclipse after finishing the installation. After that, you can simply open debug configuration and then create a maven command to run your source. You can use any maven plugin, I have used jetty and tomcat for the tries.

Saturday, October 31, 2009

Unable to resolve JRE

Have you experienced this message on your eclipse after building your application using maven 2? I experience this problem after building mule source and the following are the things that I did to fix the problem:
# Check your JAVA_HOME to point to jdk instead of jre
# Check your pom.xml to point to the right jre. The following is the figure of my pom.xml which procudes the message above on the pom.xml


This is after the change:

The change that I did is only changing the name of your jre as my jre directory is jre1.5.0_07 and it is located at C:\Java\jre1.5.0_07.

Thursday, October 29, 2009

How to change maven repository

Well, yes... I experience the problem of not enough space on my drive C.... I believe many people experience the same thing as me. One of the causes is my maven repository is getting bigger and bigger. Yes.. it is the problem when you need to build the source and downloading the dependencies.

To get it changed, what I was thinking is where the configuration of maven located. Then, I was thinking about the installation directory (my maven installation directory is in F:\software\apache-maven-2.0.9). I was suspecting there should be some sort of configuration about this. Just go to the installation directory of maven, and then I found settings.xml inside the conf directory on my maven directory. Open it up and then I found about local repository configuration. The following is a figure of it.