[OWASP-ESAPI] Help needed building OWASP ESAPI from source using Eclipse

Jeff Ichnowski jeff.ichnowski at owasp.org
Fri Nov 6 21:20:41 EST 2009


Why do we want to "skip tests"?

Thanks,
-Jeff


On Fri, Nov 6, 2009 at 2:31 PM, Neil <neil at owasp.org> wrote:

> Thanks!  I'll run through the steps on a clean machine!
>
> ---
> Neil
>
> On Nov 6, 2009, at 12:05 PM, Pawan Singh <pawan.singh at owasp.org> wrote:
>
> Hi Kevin,
>
> I was working on ESAPI Java Install Guide with Patrick recently and even I
> found that these instructions are niether available on ESAPI wiki nor on the
> Install Guide.
>
> I have recently done a clean build of ESAPI from scratch both with Maven
> and Eclipse (Galileo) for testing and documenting the Install Guide.
>
> Here are the steps involved in building ESAPI using Eclipse IDE:
> Note: I copied most of the instructions written by Kevin Fealey on OWASP
> Wiki for ESAPI building previously.
>
> Prerequisites:
>
>    - *JDK 1.5 or above installed* (Required for Maven Eclipse plugin to
>    work properly)
>    - *Eclipse IDE 3.3.x or above* (Can be downloaded from: <http://www.eclipse.org/downloads/>
>    http://www.eclipse.org/downloads/)
>    - *Maven M2Eclipse plugin for Eclipse* (You can install the latest
>    version from within maven using the following update site from within
>    Eclipse:  <http://m2eclipse.sonatype.org/update/>
>    http://m2eclipse.sonatype.org/update/)
>    - *SVN Subclipse Plugin Eclipse* (Instructions on installing Subclipse
>    plugin can be found here: <http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA>
>    http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA)
>
> *Configuration:*
>
>    - Create an Eclipse shortcut
>    - Right-Click your Eclipse shortcut and select *Properties*
>    - *At the end of the line that says Target, add -vm "x" where x is the
>    location of a JDK (e.g., "C:\Program Files\Java\jdk1.6.0_13\bin"). This step
>    is necessary for the Maven plugin to work*
>    - *Restart Eclipse using the edited shortcut.*
>
> *Importing the ESAPI Source from Google SVN:*
>
> If you choose to use the ESAPI SVN code, follow the instructions here<http://code.google.com/p/owasp-esapi-java/source/checkout>.
> Unless you have been added to the ESAPI project as a contributor, please use
> the bottom SVN checkout link on the Google Code page (non-SSL).
>
> If you are using subclipse, as recommended, open Eclipse and:
>
>    - Click *File* -> *New* -> *Other....*.
>    - From the *SVN Folder* select '"Checkout Projects from SVN* (this
>    option will only be available if you have a SVN plugin installed) and hit
>    *Next >*.*
>    - Click the *Create a new repository location* radio button.
>    - If you are not listed as a project contributor, insert *<http://owasp-esapi-java.googlecode.com/svn/trunk/>
>    http://owasp-esapi-java.googlecode.com/svn/trunk/* as the URL. If you
>    are listed as a project contributor, check the Google Code page for the URL
>    to use. (Note: if you are a contributor, when prompted for your SVN
>    password, use your Google generated password, available from the Google Code
>    Source page.)
>    - Once the directory structure appears in the window, click the URL at
>    the top to download everything. Then hit *Next >*
>    - Select your desired project options. For most people, the default
>    options should be fine. When finished, click *Next >*.
>    - Select your desired workspace options, then click *Finish*. The
>    latest ESAPI source files will then be downloaded to your workspace. This
>    may take a few minutes.
>
> Building
>
> Building ESAPI should be easy with the new Maven integration.
>
> Once your environment is set up, as specified above:
>
>    1. Right-Click your ESAPI project root folder
>    2. Select *Run As...*
>    3. Select *Run Configurations*
>    4. Double Click "Maven Build" from the options on the left to create a
>    new configuration.
>    5. Name your configuration at the top. This will be for building ESAPI
>    without running JUnit tests.
>    6. The "Base directory" should point to the root of your project
>    7. The "Goals" field type "package"
>    8. >From the checkboxes below, check "Skip Tests"
>    9. Any options not mentioned should be left as their default
>    10. Click "Apply" to save your build configuration
>    11. Click "Run" to run your configuration
>
> NOTE: Jars created through building are located in the directory called
> "target".
>
> *
> *
>
> *Cheers,*
>
> *Pawan Singh*
> P.S: I use Subclipse too :)
>
> FYI:
> >>
>
> ---------- Forwarded message ----------
> From: Pawan Singh < <pawan.singh at owasp.org>pawan.singh at owasp.org>
> Date: Wed, Nov 4, 2009 at 12:54 PM
> Subject: Re: [OWASP-ESAPI] esapi install guide -- current status? current
> status of requests?
> To: Patrick Thomas < <psthomas at gmail.com>psthomas at gmail.com>
>
>
> Hi Patrick,
>
> The Java Install Guide looks great!
>
> Please find attached ESAPI Java Install Guide with my comments/feedback in
> red balloon and updates in red text. I am sorry about the delay, I got stuck
> with some work so I didn't get much time to work on it. This is an initial
> revision from me, I will send you more revisions as I get more time to work
> on it.
>
> I checked out code from Google SVN and did a clean build from scratch both
> with Maven and Eclipse (Gallileo). I followed the instructions from the
> Guide and it worked great for me. However, I found that we do not have
> instructions on building ESAPI using an IDE at <http://www.owasp.org/index.php/ESAPI-Building>
> http://www.owasp.org/index.php/ESAPI-Building. Please let me know if you
> want me to add those instructions in the Install Guide or at the
> ESAPI-Building wiki page.
>
> Also, I was wondering if it will be a good idea to include more
> instructions on configuring ESAPI for Java Web Apps such as,
>
> 1. Setting up the ESAPI filter
> 2. Setting Current User:
>
> public void doPost(ServletRequest request, ServletResponse response) {
>  try {
>  User user = ESAPI.authenticator().login(request, response);
>  // continue with authenticated user
>  } catch (AuthenticationException e) {
>  // handle failed authentication (it's already been logged)
>  }
>
> 3.Setting ESAPI.authenticator().setCurrentHTTP(request, response) for DefaultHTTPUtilities to work properly.
>
> If you think these instructions won't be out of scope of the Install Guide then I would like to work on adding such instructions to the Guide.
>
> Also, Are you planning to put this Guide on Google SVN where all the contributors can commit their changes and get feedback from the ESAPI list?
>
>
> *
>
> Thanks,
> Pawan Singh
> *
>
> On Fri, Nov 6, 2009 at 10:04 AM, Kevin W. Wall < <kevin.w.wall at gmail.com>
> kevin.w.wall at gmail.com> wrote:
>
>> I am reposting this post from 10/29 (slightly modified) at suggestion
>> of Jim Manico since I did not get a satisfactory answer the first time.
>>
>> Thought someone could give me the steps to create an Eclipse project for
>> OWASP ESAPI so I can build it's source from scratch. (If someone can
>> provide the basic steps, I'll promise to clean it up and send it to
>> Mike B. so it can be added into the ESAPI Installation Guide somewhere
>> under section 3.3.)
>>
>> I managed to somehow muddle my way through this process once before when
>> I starting working on the 2.0_quality branch back in July/August. At the
>> time, I just somehow just serendipitously stumbled upon the right way to
>> do this, but unfortunately I didn't have the common sense at the time to
>> write anything down even though it probably took me at least an hour to
>> come across the right magical incantation of steps.
>>
>> What I want to do is to create an Eclipse project for the OWASP ESAPI Java
>> 2.0 project using the SVN 'trunk' so that I can continue to work on ESAPI
>> via Eclipse. (Yes, this old dinosaur has finally given up the command line
>> and vim and stepped into the modern world. But remember, most dinosaurs
>> had
>> the brain of a walnut [or in my case, a Wall-nut] so it's hard to teach
>> them
>> new tricks even when their young. ;-) In addition to being able to just
>> edit and build ESAPI, I also want to be able to do commits and checkouts
>> against the main SVN trunk from Eclipse like I was doing with the
>> 2.0_quality
>> branch.
>>
>> If it matters, I'm using Eclipse 3.4.2 on OpenSuSE 11.0 with plugins
>>                Maven Integration for Eclipse (from provider Sonatype,
>> Inc.;
>>                        aka, m2eclipse or m2e)
>> and various     Subversive SVN plugins  (provider Eclipse.org)
>> and             SVNKit 1.3.0 Implementation, vers 2.2.1 (provider
>> Polarion)
>>
>> Anyway, what do I do first, second, third, etc.? Should I download the
>> ESAPI Java trunk manually first using
>>
>>        svn checkout  <http://owasp-esapi-java.googlecode.com/svn/trunk>
>> http://owasp-esapi-java.googlecode.com/svn/trunk
>>
>> and then try to create some sort of Maven project from that (if so, which
>> one)
>> or what?
>>
>> I can't look at my existing ESAPI 2.0_qualify branch because ever since I
>> did that last series of commits there, that particular Eclipse project has
>> been totally fubar. (Won't even compile any longer; can't find java.lang
>> classes even! But other vanilla Java projects work fine.)
>>
>> I know I can't be the *ONLY* one this list who is building ESAPI from
>> source
>> from it's Google Code SVN repository using Eclipse, but if I'm going to
>> be productive on ESAPI (vs. simply rambling on with long-winded emails)
>> I need to get this figured out. 'Cuz if I can't get this working I'll have
>> a lot more time for those rambling emails and you'll all have to suffer.
>> :)
>>
>> TIA for your help,
>> -kevin
>> --
>> Kevin W. Wall
>> "The most likely way for the world to be destroyed, most experts agree,
>> is by accident. That's where we come in; we're computer professionals.
>> We cause accidents."        -- Nathaniel Borenstein, co-creator of MIME
>> _______________________________________________
>> OWASP-ESAPI mailing list
>> <OWASP-ESAPI at lists.owasp.org>OWASP-ESAPI at lists.owasp.org
>>  <https://lists.owasp.org/mailman/listinfo/owasp-esapi>
>> https://lists.owasp.org/mailman/listinfo/owasp-esapi
>>
>
>
>
> --
> Thanks,
>
> Pawan Singh
> Software Development Support
> <pawan.singh at owasp.org>pawan.singh at owasp.org
> <http://www.owasp.org>www.owasp.org
>
> _______________________________________________
> OWASP-ESAPI mailing list
> OWASP-ESAPI at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/owasp-esapi
>
>
> _______________________________________________
> OWASP-ESAPI mailing list
> OWASP-ESAPI at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/owasp-esapi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/owasp-esapi/attachments/20091106/e305741d/attachment-0001.html 


More information about the OWASP-ESAPI mailing list