Bug 174513 - Validation does not run when the project's (java) build path is changed
Summary: Validation does not run when the project's (java) build path is changed
Status: NEW
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.validation (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: wst.validation CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 235384
  Show dependency tree
 
Reported: 2007-02-16 16:05 EST by Paul Fullbright CLA
Modified: 2010-03-26 19:29 EDT (History)
3 users (show)

See Also:


Attachments
screen shot (20.10 KB, image/gif)
2008-05-28 10:51 EDT, Gary Karasiuk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Fullbright CLA 2007-02-16 16:05:37 EST
To reproduce:
 - Set breakpoint in validator of choice
 - Remove (or add) source folder
 - Validator break point isn't hit, even though project is rebuilt

Our validation is dependent on java project structure, so a validation build is important here.
Comment 1 Chuck Bridgham CLA 2007-09-05 09:30:41 EDT
Moving to 3.0
Comment 2 Gary Karasiuk CLA 2008-04-29 17:20:53 EDT
This works in 30. 
Comment 3 Gary Karasiuk CLA 2008-05-23 14:23:31 EDT
I am in the process of cleaning up the Validation Framework defects. Could you please close this Bugzilla. If I don't hear back within 7 days,
I will assume that everything is OK, and will close it.
Comment 4 Paul Fullbright CLA 2008-05-27 12:11:23 EDT
I still see the incorrect behavior in RC1.  If I add or remove a source folder with my java (or other) artifacts in it, my validator does not run.
Comment 5 Gary Karasiuk CLA 2008-05-28 09:54:21 EDT
1) Is the validation builder registered on the project? 
2) Do you have autobuild turned on? 
3) Is your validator, turned on for build validation?
4) Do any of the other validators run?

This does work for me. 
Comment 6 Paul Fullbright CLA 2008-05-28 10:39:48 EDT
(In reply to comment #5)
> 1) Is the validation builder registered on the project? 
I have both the Validation builder and Faceted Project Validation Builder registered (not sure why both, but that's a different matter ...)

> 2) Do you have autobuild turned on? 
Yes

> 3) Is your validator, turned on for build validation?
Can you go into more detail on this?

> 4) Do any of the other validators run?
Yes, but some only run when adding the source folder.
Comment 7 Paul Fullbright CLA 2008-05-28 10:46:38 EDT
(In reply to comment #6)
> > 3) Is your validator, turned on for build validation?
> Can you go into more detail on this?

Ah, I assume by this you mean the second column on the validation preferences?  If so, yes, our validator is enabled both manually and on build in the workspace preferences.
Comment 8 Gary Karasiuk CLA 2008-05-28 10:51:10 EDT
Created attachment 102399 [details]
screen shot

That the build checkbox is checked for your validator.
Comment 9 Gary Karasiuk CLA 2008-05-28 10:55:03 EDT
(In reply to comment #7)
Then it should be called. Does your validator use version 1 of the framework, or the new one that I added in 3.4?

Can you email me your sample project and your plug-in?

Comment 10 Paul Fullbright CLA 2008-05-28 10:57:38 EDT
I'll work on sending you something.  Although, it's the JPA validator I'm talking about here, so perhaps I wouldn't actually need to send you anything?
Comment 11 Gary Karasiuk CLA 2008-05-28 12:14:04 EDT
(In reply to comment #10)
yes, I do have the JPA validator. Is just a simple Java project sufficient for showing the problem? 

Comment 12 Paul Fullbright CLA 2008-05-28 13:51:02 EDT
A simple JPA project (or a Utility project with the JPA facet) with a breakpoint in the validator should be sufficient.
Comment 13 Paul Fullbright CLA 2008-06-02 10:26:29 EDT
Gary, are you still waiting for me to provide something, or did I correctly take your comments to mean that you didn't require me to provide anything?
Comment 14 Gary Karasiuk CLA 2008-07-21 07:19:44 EDT
Paul, Can you please elaborate a bit more on your scenario.

Here is the test that I tried.

1) I started with a JPA project
2) I verified that adding new Java resource to the existing source folder triggered the JPA validator
3) I added a source folder, but it was a new folder so it was empty
3a) Because this source folder didn't contain anything it did not call the JPA validator. (The JPA validator filters on orm.xml, persistence.xml and *.java)
4) I added a java file to the new source folder
4a) This triggered the JPA validator being called
Comment 15 Paul Fullbright CLA 2008-07-21 10:52:15 EDT
There are two situations that I can come up with.

a) Add or remove a source folder that *does* have java in it to or from the build path.  I'm talking about an existing resource folder, and simply either specify it as a source folder or not, not actually adding it or removing it from the file system.  This is not 100% reproduceable.  I see it about half the time.

b) Add or remove a source folder with xml artifacts in it to the build path.  I believe I ran across this originally by trying to move my xml artifacts to a new folder and experimenting with different user folder structures.  We require that xml artifacts be on the build path for validation.
Comment 16 Gary Karasiuk CLA 2009-08-10 12:35:23 EDT
I am assigning this back to wst.validation-inbox@eclipse.org, as support of the validation framework has been taken over by Wini.