What is Nexus?

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Monday, April 30, 2012 1:38 PM
To: Ruckman, Maurice (HAL)
Cc: Thompson, Sonya (HAL); Fillman, Eric (HAL)
Subject: Re: Nexus

Nexus is the shared Maven artifact repository. It's basically a cache for jars so that if your maven downloads apache-common-1.3.jar, Eric's maven won't have to go on the web to download the same jar. All developer VMs and Hudson are configured to get jars (called artifacts in maven terms) from Nexus by default.

The url for our Nexus instance is http://halsvn01:8081/nexus

The website for nexus can be found here : http://www.sonatype.org/nexus/

Tip: Have VM run same EAR as produciton

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Monday, April 30, 2012 5:42 PM
To: Thompson, Sonya (HAL); Ruckman, Maurice (HAL); Phatak, Sheetal (HAL); Bojja, Sridhar (HAL Contractor); Fillman, Eric (HAL)
Cc: Augustine, Anila (HAL)
Subject: New JBoss config for developer vms

The /home/jboss1/HAL folder contains all the static content needed to run the application on developer vms. Its equivalent on infrastructure servers is /wbi/haldata/webxxx (where xxx can be tst, res, ...). Apache for example has its document root set to /home/jboss1/HAL/halwebsite on developer vms, and to the equivalent /wbi/haldata/webtst/halwebsite on webtest.

You can use symbolic links to simulate the production environment on your developer vm: have your HAL folder be a link to /wbi/haldata/webprd_cluster1 and your apache will serve the same static content as the production website:

1) ln -s /wbi/haldata/webprd_cluster1 /home/jboss1/HAL

2) Download the production ear from hudson and drop it into your JBoss deploy folder and you are running the same ear as the production environment as well.

Installing Maven Inside Eclipse (Subversion Eclipse Plug-in)

Initial install of plug-in

1. Create a Maven Workspace "/home/jboss1/workspace-your-space"
2. File, New, Other, "Checkout Maven Projects from SCM"
3. Next
4: Click on "Find more SCM connectors in the m2e" link (Maven to Eclipse)
5. Check "m2e-subclipse"
6. Finish
7. Next
8. Next
9. Next
10. Accept terms and conditions, and "Finish"
11. Click "OK" for "Security Warning" wait for "Installing Software"
12. Allow "Eclipse" to restart

Subsequent Installation of Projects

1. File, New, Other
2. File, New, Other, "Checkout Maven Projects from SCM"
3. Next
4. Choose "SVN" in the SCM URL, left-most drop-down

5. Copy the URL from SVN and remove the trailing slash, such as:
http://halsvn01/svn/hal/branches/RC/yy.ww-RC
Default values: Checkout Head Revision, and Checkout All Projects

6. Next
7. Use default Workspace location, Finish
8. Wait about a minute for it to import and build

Debug on Server

1. Right-click on hal-ear, "Run As", "Debug on Server"
2. Next, Finish

If you have problems debugging because of a gateway timeout error then make sure of the following:
/etc/httpd/conf/workers.properties
set worker.template.reply_timeout=0 (instead of 30000)

Removing errror in JSP's

1. Right-click hal-parent and choose "Import..."
2. General,"File System"
3. Click Next
4. From directory: /home/jboss1/programs/jboss-eap-5.1/jboss-as/server/standard/deploy/jbossweb.sar
5. Click besides jstl.jar and standard.jar to activate the check boxes
6. Into: hal-parent
7. Click "Finish"
8. Right-click hal-web, "Build Path", "Configure Build Path"
9. Click on "Java Build Path"
10. Click Libraries tab
11. Click "Add Jar", click on your hal-parent project, and filter to jstl.jar, press OK

Reference: http://stackoverflow.com/questions/1265309/eclipse-cannot-find-the-tag-library-descriptor

Change your JRE to 1.6 compliance instead of 1.5

1. hal-ejb, Project, Properties, Java Compiler, use "JavaSE-1.6"
2. In your Markers tab there is an error "Java compiler does not match the version of the installed java project facet", right-click, quick fix, Change to Java 1.6, and click Finish

If you encounter an error during build

** This needs further investigation **
1. You may encounter a "Building workspace" error, as such you will need to disable the JavaScript Validator
2. Click OK twice, if error encountered
3. Go to Workbench, Windows, Preferences, Javascript, Validator, Errors/Warning
4. Uncheck the "Enable JavaScript semantic validation"
5. Apply, "Accept Full Build", and OK
6. Right-click on hal-web project, properties
7. Builders, uncheck JavaScript Validator
8. Continue, through side-effect warning
9. OK

Merge into RC (Release Candidate)

scan/replace the following two items:
webss-9999-new-feature
WEBSS-XXX

Checkout new copy of feature to your VM
svn co http://halsvn01/svn/hal/branches/features/webss-9999-new-feature

Merge feature with trunk
svn merge http://halsvn01/svn/hal/trunk

Commit Merge
svn commit -m "Sync feature branch webss-9999-new-feature with trunk. Fix WEBSS-XXX"

Checkout new copy of trunk
svn co http://halsvn01/svn/hal/trunk

Merge Code via Command Line
svn merge --reintegrate http://halsvn01/svn/hal/branches/features/webss-9999-new-feature
svn commit -m "Reintegrate feature branch webss-9999-new-feature into trunk. Fix WEBSS-XXX"

Delete Feature Branch After Successful Merge (why so quick to delete?)
svn delete http://halsvn01/svn/hal/branches/features/webss-9999-new-feature -m "Feature merged to trunk, deleting for cleanup"

Problems Encountered?

If there is a problem with merge-info where Subversion is saying there are "Missing range errors", then you should check to see if there is merge info on files or folders other than just the parent folder.  See here.

You can resolve conflicts with the switch --accept=working, which takes the working copies version of things.  When we originally started using SVN, the meta data became out of sync due to folks checking in individual files inside Eclipse, instead of checking in their entire feature branch.  Here's an example of usage:

svn resolve --accept=working halwebsite/com

Merge Code via Eclipse

  • In the IDE, go to File >> Import >> Maven >> Import Existing Maven Project & import the RC project
  • Right click the hal-parent (the dir might be named after the RC, so 12.17-RC) and say merge
  • Select the reintegrate radio option
  • Review the changes
  • If okay, commit the changes from command line

How QA2 copies haldata

From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Tuesday, April 24, 2012 10:20 AM
To: Bojja, Sridhar (HAL Contractor); Thompson, Sonya (HAL); Phatak, Sheetal (HAL)
Cc: Ruckman, Maurice (HAL); Fillman, Eric (HAL)
Subject: qa2

I created a new /wbi/haldata/webqa2 folder. The Apache document root for qa2 is now /wbi/haldata/webqa2/halwebsite (it was /wbi/haldata/webtst/halwebsite before). I also added a line in the Hudson job that deploys to qa2 so that it copies ${WORKSPACE}/halwebsite onto /wbi/haldata/webqa2/halwebsite at the end of the job.

Install new version of Eclipse

Still a work in progress but here are the results so far:

The Maven project with our base JBoss install has lots-o-errors, and seems to run slowly.  I’ve installed the newest version of Eclipse.  It still shows many JSP errors but some of them are worth fixing and it seems like it cannot find tag library through our proxy perhaps.  It also seems to run a bit snappier and it does not have that JSF problem that occurs when viewing JSP pages.

Still probably will need to install a few more times, here’s what’s been tried so far.

Eclipse Version
eclipse-jee-indigo-SR2-linux-gtk-x86_64.tar.gz

For Maven Integration with Eclipse
http://download.eclipse.org/technology/m2e/releases/

Subclipse
http://subclipse.tigris.org/update_1.6.x (works)
http://subclipse.tigris.org/update_1.8.x (failed)

From: Fillman, Eric (HAL)
Sent: Sunday, June 16, 2013 9:27 PM
To: Klein, Brian (HAL)
Cc: Ruckman, Maurice (HAL)
Subject: I think I got Eclipse working on the Linux VM

Can you try this on your machine and see if it fixes the problem?

On your Linux VM, go in to where your main eclipse directory is located.

On my VM, it’s in /home/jboss1/programs/eclipse.

Within this directory, there should be a file called eclipse.ini.  It contains a bunch of arguments and parameters that get passed to Eclipse when it starts.

Make a copy of eclipse.ini, and call it eclipse.ini.bak or something like that.

Open eclipse.ini in text editor, and add the following to the bottom of the list of arguments.

-Dorg.eclipse.swt.browser.XULRunnerPath=/home/jboss1/programs/jbdevstudio/studio/plugins/org.mozilla.xulrunner.gtk.linux.x86_64_1.9.1.2a/xulrunner

-Dorg.eclipse.swt.browser.UseWebKitGTK=false

What this does is tells Eclipse to use XULRunner that is part of the JBoss Dev Studio rather than the XULRunner that was patched on Wednesday.  Eclipse needs to run with XULRunner 1.9.2 or earlier.  The patch on Wednesday upgraded the version used by Firefox to version 17 or something like that, and that’s what Eclipse is trying to use.  It don’t work.

JBoss Dev Studio works because it’s using that 1.9.1.2a version of XULRunner.

Save the changes to eclipse.ini, and try to start Eclipse.

Let me know how it goes.

Thanks.

Eric

 

Copying static content to VM’s

First you need to copy static content from here:
cp -R /wbi/haldata/webdev/* /home/jboss1/HAL/

And then supplement it from your workspace:

On developer VM, to copy static content from the checked out halwebsite folder to the apache document root and compile at the same time, you can run the following command from the root of your checked out project:

cp -R halwebsite/* /home/jboss1/HAL/halwebsite/ && mvn install

The && shell operator is a logic AND, it means that the 'mvn install' command only runs if the left part of the commands succeeds.

Deploy static content and deploy in JBoss (using hot deploy):

mvn install && cp hal-ear/target/hal-*.ear /home/jboss1/programs/jboss-eap-5.1/jbossas/server/haldev-vm-template/deploy/ && cp -R halwebsite/* /home/jboss1/HAL/halwebsite/

Adding subversion to LDAP

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Friday, April 27, 2012 12:13 PM
To: Tripp, Donald (HAL)
Cc: Hofsetz, Therron (HAL); Thompson, Sonya (HAL); Fillman, Eric (HAL); Doan, Thomas (HAL Contractor); Phatak, Sheetal (HAL); Bojja, Sridhar (HAL Contractor); Augustine, Anila (HAL); Ruckman, Maurice (HAL); HAL DistList: IS UNIX
Subject: Re: Noticen of Intent: Restart halsvn01

Thanks for taking care of that Don. Also, on the long term it might be a good idea to have the subversion server use LDAP for authentication so that new accounts get automatically created.

The subversion server relies on Apache for authentication (developers access subversion through http:// protocol). So the steps to do so would be the following:

1) Edit the file /etc/httpd/conf.d/svn.conf and replace "AuthUserFile /etc/httpd/conf/.htaccess" with equivalent LDAP authentication section

2) In the /etc/httpd/conf/svn_acl, replace the name of user with their equivalent LDAP login

That should be it...

Guillaume