[Jenkins] How to setup

There are a few ways to setup jenkins in your machine
1. Download jenkins exectable file to install it as a service in Window/Linux: https://jenkins.io/download/
After installing, run it by browse the address: localhost:8080
Note: you can install expected plugin of jenkins to your machine, then copy to other.
2. Download jenkins.war file to run it via console:
java -jar jenkins.war –httpPort=8081
After running via console, browse the address: localhost:8081
Note: you can install expected plugin of jenkins to your machine, then copy the .war file to other machine to run – But please copy the {$user}/.jenkin folder also to make sure everything work well

Advertisements

Eclipse: How to make “Dynamic Web Project” available in wizard?

http://download.eclipse.org/releases/kepler“(If you have Eclipse Kepler)

http://download.eclipse.org/releases/luna“(If you have Eclipse Luna)

Based on your eclipse choose above link and copy it for step2 below:

  1. Help>Install New Software
  2. paste the link into “Work with:” field, hit “Enter” then wait for eclipse to fetch completely.
  3. Install the following plugin:
    • Eclipse Java EE Developer Tools
    • Eclipse Java Web Developer Tools
    • Eclipse Web Developer Tools
    • Eclipse XML Editors and Tools
  4. After restart eclipse, you will have your Dynamic Web Project option in wizard.

How to deploy .war file to Tomcat?

When you finish developing a web application. Now you want to deploy it into Tomcat.

Here we go:

  1. Update config file:
    • Open file: tomcat-user.xml, update the following:
      • <role rolename=”manager-gui”/>
      • <role rolename=”manager-script”/>
      • <role rolename=”manager-jmx”/>
      • <role rolename=”manager-status”/>
      • <user username=”yourname” password=”123” roles=”manager-gui,manager-status”/>
  2. Export your application to war file
  3. browse the link to your tomcat server: ex: http://localhost:8080
  4. Select “Manager App”
  5. Follow the instructions to finish deploying your .war file.

Happy deploying !

Tomcat-Error HTTP Status 404

Here is the case you can bump into this error:

  1. You create a dynamic web project
  2. Config tomcat as required
  3. You start the tomcat server inside eclipse
  4. To check if the server run well or not you browse: http://localhost:8080/

Now you may got the following error:

tomcat_error_report

How to fix this error ?

  1. Open the views “Servers“, right click into the server you created, select Properties
  2. Click “Switch Location“, then press “OK
  3. Double click into the server to open config area (including 2 tabs: Overview and Modules)
  4. Select “Modules” tab, delete all existing module. save it.
  5. select “Overview ” tab, select “Use Tomcat installation”, save it.
  6. Browse the link http://localhost:8080/ again

Now the error has gone away.

Happy Tomcating !

How to create a eclipse plug-in

  1. Create an eclipse plug-in
  2. Create a new feature that regarding to your plug-in
    • File > New > Other… > Plug-in Development > Feature Project
    • Try to follow the instructions to complete your setup.
  3. Create an update site
    • New -> Plug-in Development -> Update Site Project
    • Select the feature in the step 2
    • Click “Build All”

Now, your finish creating an eclipse plug-in with update site of manual install.

You can go :

  • Help -> Install New Software…;
  • click “Add…”, select the folder of update site
  • select plug-in that you want to install and so on.

All instructions are here:

https://wiki.eclipse.org/FAQ_How_do_I_create_an_update_site_%28site.xml%29%3F