@@ -0,0 +1,1991 @@
+/*-%0A * Copyright (c) 2013 Red Hat, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.fedoraproject.maven.model.impl;%0A%0Aimport java.io.FileReader;%0Aimport java.io.IOException;%0Aimport java.io.Reader;%0Aimport java.nio.file.Path;%0A%0Aimport org.apache.maven.model.Model;%0Aimport org.apache.maven.model.io.xpp3.MavenXpp3Reader;%0Aimport org.codehaus.plexus.component.annotations.Component;%0Aimport org.codehaus.plexus.util.xml.pull.XmlPullParserException;%0Aimport org.fedoraproject.maven.model.ModelFormatException;%0Aimport org.fedoraproject.maven.model.ModelReader;%0A%0A/**%0A * %3Cstrong%3EWARNING%3C/strong%3E: This class is part of internal implementation of XMvn and it is marked as public only for%0A * technical reasons. This class is not part of XMvn API. Client code using XMvn should %3Cstrong%3Enot%3C/strong%3E reference%0A * it directly.%0A * %0A * @author Mikolaj Izdebski%0A */%0A@Component( role = ModelReader.class, hint = %22maven%22, instantiationStrategy = %22singleton%22 )%0Apublic class MavenModelReader%0A    implements ModelReader%0A%7B%0A    @Override%0A    public Model readModel( Path modelPath )%0A        throws IOException, ModelFormatException%0A    %7B%0A        try (Reader fileReader = new FileReader( modelPath.toFile() ))%0A        %7B%0A            MavenXpp3Reader modelReader = new MavenXpp3Reader();%0A            return modelReader.read( fileReader );%0A        %7D%0A        catch ( XmlPullParserException e )%0A        %7B%0A            throw new ModelFormatException( %22Unparseable Maven POM%22, e );%0A        %7D%0A    %7D%0A%7D%0A

Implement MavenModelReader