[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tigerstripe-users] Idea on how to have Package artifact rule for only packages with artifacts
|
Title: Idea on how to have Package artifact rule for only packages with artifacts
Hi all,
I am trying to develop a plugin that generates a file for each (non-empty) packages of a project.
I have defined one artifact rule associated with a velocity template.
In this template I verify all project artifacts of interest (datatypes, entities, enums, events) that are part of this (current artifact) package.
The problem is there are many packages with nothing in them. And, I don't want to have a file generated for them.
This is the perfect case for a filter. But, I don't know how I can evaluate if a given package has only packages or artifacts as well below it?
The IPackageArtifact does not seem to have anything that tells me about underlying model artifacts or sub-packages. I tried getReferencedArtifacts() but it is always empty.
I could also brwose thru all artifacts and evaluate if some are the current package. But, I can't find in the API the object that gives access to the project artifacts (like all the $artifacts in velocity).
I am probably missing it or may be there is an easier to doing what I want (global rule but how do I create as many distinct files as I have non-empty packages in the project).
Thanks,
Jerome