This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 297490 - Facets of dependent projects are not considered
Summary: Facets of dependent projects are not considered
Status: CLOSED WONTFIX
Alias: None
Product: Tigerstripe (Archived)
Classification: Technology
Component: Headless (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.5M0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-10 10:13 EST by Yoram CLA
Modified: 2012-02-21 10:20 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yoram CLA 2009-12-10 10:13:19 EST
Say I have two projects, P1 and P2. Let's further say that P2 depends on P1 -- that is: P2's dependencies in TS.xml explicitly list P1.

P1's facet (used in my P1 build) excludes parts of the artifacts in the projects by listing those artifacts in the exclude box. I now build P1 and create a jar file.

Now, P2 is built but it doesn't know that P1 was build with exclusions in the P1's facet. Because of its listed dependencies it generates code that contains import statements for artifacts (packages) that were excluded in P1's build.

If I now compile my generated code for P2 I fail because import statements can't be satisfied -- the P1 jar does not include the required artifacts.

Example: 

In P1 is have a class C1 and another class C2. I also have an association C1toC2 that is directed from C1 to C2. In P1's facet I exclude C2 and build. The jar created contains only C1.

In P2 I have a class C3 that extends P1.C1. When I generate code for P2 the file for C3 (C3.java) contains an import statement P1.C2! This results (eventually) in a compile error.

Enjoy,
*Yoram
Comment 1 Navid Mehregani CLA 2012-02-21 10:20:12 EST
Facets are only associated with projects where generation is being triggered from.  If you want to exclude artifacts in P1, you have to explicitly specify P1's facet in P2's tigerstripe.xml file.