Bug 247831 - Error when re-creating a previously deleted Project
Summary: Error when re-creating a previously deleted Project
Status: CLOSED FIXED
Alias: None
Product: MTJ (Archived)
Classification: Tools
Component: Project Builder (show other bugs)
Version: 0.9   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.9   Edit
Assignee: Diego Madruga Sandin CLA
QA Contact:
URL:
Whiteboard:
Keywords: core
Depends on:
Blocks:
 
Reported: 2008-09-18 10:53 EDT by Alvaro Cavalcanti CLA
Modified: 2008-10-15 09:24 EDT (History)
3 users (show)

See Also:


Attachments
Screen shot (22.21 KB, image/png)
2008-09-18 10:53 EDT, Alvaro Cavalcanti CLA
no flags Details
Fix getRuntimeJar method (85.82 KB, patch)
2008-09-22 14:16 EDT, Diego Madruga Sandin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alvaro Cavalcanti CLA 2008-09-18 10:53:46 EDT
Created attachment 112902 [details]
Screen shot

1) Create a Midlet Project
2) Add a Midlet to it
3) Build it
4) Delete it (removing from disk!)
5) Create a new Midlet Project using the same name as used on step 1
6) The following error message will be displayed when trying to build the new project:

Errors during build.
  Errors running builder 'Preverification' on project 'Teste'.
  Illegal Manifest Entry Key or Value "C:\Documents and Settings\cwg834\workspace_mtj\Teste\.mtj.tmp\emulation\Teste.jar (The system cannot find the path specified)"
  C:\Documents and Settings\cwg834\workspace_mtj\Teste\.mtj.tmp\emulation\Teste.jar (The system cannot find the path specified)
Comment 1 Diego Madruga Sandin CLA 2008-09-22 14:16:09 EDT
Created attachment 113173 [details]
Fix getRuntimeJar method

The problem was in the methoid: 

public static File getRuntimeJar(IProject project, IProgressMonitor monitor) throws CoreException

from the PreverificationBuilder class.

It didn't check if the jar file existed in the file system and assumed it was already created.

I'm posting a patch to make this checking on the FS.
Comment 2 Gustavo de Paula CLA 2008-09-22 14:55:36 EDT
just tested the patch and it worked ok. +1 to commit.
Comment 3 Diego Madruga Sandin CLA 2008-09-24 12:05:03 EDT
Fixed
Comment 4 Gustavo de Paula CLA 2008-10-15 09:24:06 EDT
all bugs we integrated and release on MTj 0.9