The SolutionGenerator is a .NET plugin, so the correct solution is to add
the following field:

 [FieldAttribute("repository", Expression = "${settings.localRepository}",
Type = "java.lang.String")]
 public String localRepository;

to the SolutionGeneratorMojo (c#) class. Then regenerate the javabindings,
taking care to preserve the  AbstractMojo.preExecute implementaion method.
This field will then always have the correct repository in sync with what
Maven is using.

Regards,
Shane


On 6/14/07, Deacon, Brian <[EMAIL PROTECTED]> wrote:

I'm trying to suss out a solution to the problem of
SettingsGeneratorMojo.cs getting lost if "HOMEPATH" doesn't point it to
the same place as java's user.home property.  (Jira issue 79)

It would seem that SettingsGeneratorMojo.java is a bucket for these
types of values, and would like something like this:

public String getM2UserHome()
{
return System.getProperty("user.home") + File.separator + ".m2";
}

Since it is System.getProperty("user.home") that ultimately dictates
where the .m2 directory is.

I -think-
Environment.GetEnvironmentVariable("USERPROFILE")
is always available and we should use that over
Environment.GetEnvironmentVariable("SystemDrive") +
Environment.GetEnvironmentVariable("HOMEPATH")

But I think bestest would be for the java side to explicitly hand over
the value through something like the getM2UserHome property I propose
above.  But I can't seem to see where SettingsGeneratorMojo.java ever
gets called to pass those values along to the .Net side, if it even
does.  Can anyone point me in the right direction?

Meanwhile still trying to get eclipse to bend to my will...

B

Reply via email to