[forge-users] Please fix MavenCoreFacetImpl getPom()

Max Schwaab max.schwaab at akquinet.de
Fri Jan 13 04:35:10 EST 2012


Hey Lincoln,

I found this while I'm looking for the reason for the warning

***WARNING*** Could not resolve dependency [some-jar:jar::${some.version}]

It appears in the installing process for my plugin from a local project after a successful build.
To avoid this warning the mentioned method should be changed, because forge is using it internally.

Best regards

Max

P.S.

I don't get mails from the list, thats why I repeat with a new email..


You can use properties. Have you tried the getEffectiveDependency() and
getDirectDependency() methods in DependencyFacet?

Chances are that you should *not* be using MavenCoreFacet. It should be
your last resort.

Does this help?
~Lincoln

On Tue, Jan 10, 2012 at 6:43 AM, Max Schwaab<max.schwaab at akquinet.de  <https://lists.jboss.org/mailman/listinfo/forge-users>>wrote:

>/  Hey there,
/>/
/>/  would be cool if you fix the getPom() method in the MavenCroreFacteImpl
/>/  class.
/>/
/>/  I'm develping a plugin for forge and its not good that you can't use
/>/  properties for dependency versions in your plugin pom.
/>/
/>/  Im talking about this mehtod:
/>/
/>/  @Override
/>/     public Model getPOM()
/>/     {
/>/        try
/>/        {
/>/           Model result = new Model();
/>/
/>/           // FIXME this should/can-not use the Maven Native file writer
/>/  if we are going to abstract file APIs
/>/           MavenXpp3Reader reader = new MavenXpp3Reader();
/>/           FileInputStream stream = new
/>/  FileInputStream(getPOMFile().getUnderlyingResourceObject());
/>/           if (stream.available()>  0)
/>/           {
/>/              result = reader.read(stream);
/>/           }
/>/           stream.close();
/>/
/>/           result.setPomFile(getPOMFile().getUnderlyingResourceObject());
/>/           return result;
/>/        }
/>/        catch (IOException e)
/>/        {
/>/           throw new ProjectModelException("Could not open POM file: " +
/>/  getPOMFile(), e);
/>/        }
/>/        catch (XmlPullParserException e)
/>/        {
/>/           throw new ProjectModelException("Could not parse POM file: " +
/>/  getPOMFile(), e);
/>/        }
/>/     }
/>/
/>/  Cheers
/>/
/>/  Max
/>/  _______________________________________________
/>/  forge-users mailing list
/>/  forge-users at lists.jboss.org  <https://lists.jboss.org/mailman/listinfo/forge-users>
/>/  https://lists.jboss.org/mailman/listinfo/forge-users
/>/
/


-- 
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"
-------------- next part --------------
An HTML attachment was scrubbed...
URL:http://lists.jboss.org/pipermail/forge-users/attachments/20120110/3aa33a5b/attachment.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-users/attachments/20120113/a3433104/attachment.html 


More information about the forge-users mailing list