Package org.jboss.forge.project.dependencies.events

Examples of org.jboss.forge.project.dependencies.events.UpdatingDependency


         org.jboss.forge.project.dependencies.Dependency to = DependencyBuilder.create(
                  depFacet.resolveProperties(
                           new MavenDependencyAdapter(dependency)
                           )).setVersion(version);

         UpdatingDependency preEvent = new UpdatingDependency(
                  project, from, to);

         manager.fireEvent(preEvent);
         if (!preEvent.isVetoed())
         {
            if (isExpression(dependency.getVersion()))
            {
               for (Properties properties : propertySets)
               {
                  if (properties.containsKey(propertyName))
                  {
                     properties.put(propertyName, version);
                  }
               }
            }
            else
            {
               dependency.setVersion(version);
            }

            UpdatedDependency event = new UpdatedDependency(project, from, to);
            manager.fireEvent(event);
            return true;
         }
         else
         {
            shell.println("Update attempt vetoed by other Plugin");
            for (String message : preEvent.getMessages())
            {
               shell.println("\t" + message);
            }
            return false;
         }
View Full Code Here

TOP

Related Classes of org.jboss.forge.project.dependencies.events.UpdatingDependency

Copyright © 2018 www.massapicom. 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.