[forge-users] Please fix MavenCoreFacetImpl getPom()

Max Schwaab max.schwaab at akquinet.de
Tue Jan 10 06:43:18 EST 2012


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


More information about the forge-users mailing list