Class inheritance and maven parameters
Dear All I have a base class such as public class CommonAceImporter extends AbstractMojo { This then contains a number of basic Parameters e.g. /** * Location of the data directory to read from. * * @parameter * @required */ public File srcDir; /** * Location of the ace data directory to write to. * * @parameter * @required */ public File aceDir; If I then extend this class and the CommonAceImporter class is in the same jar everything is OK. If I refactor and move the CommonAceImporter class into a different package a separate jar then add that jar as a dependency then the parameters are set but are then reported as being null. i.e. if I comment out the parameters I get the error saying these params must be set. If I have them set then if in execute I have: getLog().info(CommonAceImporter srcDir = + srcDir); getLog().info(ACE dir: + aceDir); getLog().info(path: + path); getLog().info(Effective Date: + effectiveDate); Then then above logging reports the parameters as null aceDir.mkdirs(); naturally fails as aceDir is null. So If I have a class which extends AbstractMojo in one package and jar, and I add it to the dependencies then I extend thathow come the parameters are being set but then appear to be null? Again...the exact same class in the same jar (but still in it's own package)works fine. TIA Adam This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSI recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere For more information and to find out how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Controller POM - central version registry
Dear All, We have a project which is an assembly of other projects. At present the versions of these projects is set in individual POM files which means (A) Someone can set one part to use one version of a sub-project while another uses a different one (B) If you want to upgrade a version number you have to run a script which goes through all pom.xml looking for a string/pattern settign it to the new version etc. I was wondering if it is possible to create a controller pom which contains a list of all projects which are used by other projects and their version numbers. This would then be used by the compile process for those subprojects to generate the relevantly versioned jar files then by the projects which depend on the subfiles to use that version. In Ant we used to have a central properties file which simply consisted of project=version which was included by all. i.e. imagine a set of Projects called A, B, C and D In the properties file we would have A=1.38 B=2.30 C=1.99 D=2.50 This could then be used to swap between development release by including/rmoving the -SNAPSHOT e.g. Development could look like: A=1.38-SNAPSHOT B=2.30-SNAPSHOT C=1.99-SNAPSHOT D=2.50-SNAPSHOT This is used in the compilation/packaging of A in A-1.38-SNAPSHOT.jar then if B depends on A then it includes A-1.38-SNAPSHOT.jar in it's path. etc. TIA Adam This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Thank you for your co-operation. NHSmail is the secure email and directory service available for all NHS staff in England and Scotland NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSI recipients NHSmail provides an email address for your career in the NHS and can be accessed anywhere For more information and to find out how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org