[forge-users] Please fix MavenCoreFacetImpl getPom()

Lincoln Baxter, III lincolnbaxter at gmail.com
Tue Jan 10 13:32:24 EST 2012


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>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
>



-- 
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 


More information about the forge-users mailing list