Examples of MavenXpp3Reader


Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

   {
      if (currentModel == null)
      {
         try
         {
            MavenXpp3Reader reader = new MavenXpp3Reader();
            FileInputStream stream = new FileInputStream(getUnderlyingResourceObject());
            if (stream.available() > 0)
            {
               currentModel = reader.read(stream);
            }
            stream.close();

            currentModel.setPomFile(getUnderlyingResourceObject());
         }
View Full Code Here

Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

    {
        Map<String, Object> releaseParameters = new HashMap<String, Object>();

        String workingDirectory = buildAgentConfigurationService.getWorkingDirectory( projectId ).getPath();

        MavenXpp3Reader pomReader = new MavenXpp3Reader();
        try
        {
            Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );

            if ( model.getBuild() != null && model.getBuild().getPlugins() != null )
            {
                for ( Plugin plugin : (List<Plugin>) model.getBuild().getPlugins() )
                {
View Full Code Here

Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

    private void processProject( String workingDirectory, String pomFilename, boolean autoVersionSubmodules,
                                 List<Map<String, String>> projects )
        throws Exception
    {
        MavenXpp3Reader pomReader = new MavenXpp3Reader();
        Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );

        if ( model.getGroupId() == null )
        {
            model.setGroupId( model.getParent().getGroupId() );
        }
View Full Code Here

Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

     */
    private void getReleasePluginParameters( String workingDirectory, String pomFilename )
        throws Exception
    {
        //TODO: Use the model reader so we'll can get the plugin configuration from parent too
        MavenXpp3Reader pomReader = new MavenXpp3Reader();
        Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );

        if ( model.getBuild() != null && model.getBuild().getPlugins() != null )
        {
            for ( Plugin plugin : (List<Plugin>) model.getBuild().getPlugins() )
            {
View Full Code Here

Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

    public static final String MAVEN_MODEL_VERSION = "4.0.0";

    public void initialize()
    {
        modelReader = new MavenXpp3Reader();
    }
View Full Code Here

Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

        return orderedServiceUnits;
    }

    private Iterator getReparsedDependencies() throws MojoExecutionException {
        MavenXpp3Reader mavenXpp3Reader = new MavenXpp3Reader();
        try {
            Model model = mavenXpp3Reader.read(new FileReader(new File(project
                    .getBasedir(), "pom.xml")), false);
            return model.getDependencies().iterator();
        } catch (Exception e) {
            throw new MojoExecutionException("Unable to reparse the pom.xml");
        }
View Full Code Here

Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

    {
        Reader reader = null;
        try
        {
            reader = ReaderFactory.newXmlReader( pomFile );
            return new MavenXpp3Reader().read( reader );
        }
        catch ( FileNotFoundException e )
        {
            throw new MojoExecutionException( "POM not found " + pomFile, e );
        }
View Full Code Here

Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

    private void getReleasePluginParameters( String workingDirectory, String pomFilename )
        throws Exception
    {
        //TODO: Use the model reader so we'll can get the plugin configuration from parent too
        MavenXpp3Reader pomReader = new MavenXpp3Reader();
        Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );

        if ( model.getBuild() != null && model.getBuild().getPlugins() != null )
        {
            for ( Plugin plugin : (List<Plugin>) model.getBuild().getPlugins() )
            {
View Full Code Here

Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

    }

    private void processProject( String workingDirectory, String pomFilename )
        throws Exception
    {
        MavenXpp3Reader pomReader = new MavenXpp3Reader();
        Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );

        if ( model.getGroupId() == null )
        {
            model.setGroupId( model.getParent().getGroupId() );
        }
View Full Code Here

Examples of org.apache.maven.model.io.xpp3.MavenXpp3Reader

        ContinuumProjectBuildingResult result = null;
       
        // TODO: remove this part once uploading of an m2 project with modules is supported ( CONTINUUM-1098 )
        if ( !checkProtocol )
        {
            MavenXpp3Reader m2pomReader = new MavenXpp3Reader();

            try
            {
                String filePath = pomUrl;

                if ( !filePath.startsWith( FILE_SCHEME + "/" ) && filePath.startsWith( FILE_SCHEME ) )
                {
                    //Little hack for linux (CONTINUUM-1169)
                    filePath = StringUtils.replace( filePath, FILE_SCHEME, FILE_SCHEME + "/" );
                }

                if ( filePath.startsWith( FILE_SCHEME ) )
                {
                    filePath = filePath.substring( FILE_SCHEME.length() );
                }

                Model model = m2pomReader.read( new FileReader( filePath ) );

                List modules = model.getModules();

                if ( modules != null && modules.size() != 0 )
                {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.