~ubuntu-branches/ubuntu/utopic/build-helper-maven-plugin/utopic

« back to all changes in this revision

Viewing changes to src/main/java/org/codehaus/mojo/buildhelper/ReserveListenerPortMojo.java

  • Committer: Package Import Robot
  • Author(s): tony mancill, Emmanuel Bourg, tony mancill
  • Date: 2013-06-01 20:19:34 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130601201934-hzv7zmdcgazfyupp
Tags: 1.7-1
[ Emmanuel Bourg ]
* Team upload.
* New upstream release
* Set the compiler source/target to 1.5
* Updated Standards-Version to 3.9.4 (no changes)
* debian/copyright:
  - Updated the Format URI to 1.0
  - Removed the duplicate Copyright fields

[ tony mancill ]
* debian/control:
  - Add libmaven-invoker-plugin-java to build-depends-indep.
  - Wrap long lines.
  - Update Vcs-Git URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
import org.apache.maven.plugin.AbstractMojo;
35
35
import org.apache.maven.plugin.MojoExecutionException;
36
 
import org.apache.maven.plugin.MojoFailureException;
37
36
import org.apache.maven.project.MavenProject;
38
37
import org.codehaus.plexus.util.IOUtil;
39
38
 
78
77
 
79
78
 
80
79
    public void execute()
81
 
        throws MojoExecutionException, MojoFailureException
 
80
        throws MojoExecutionException
82
81
    {
83
82
        Properties properties = project.getProperties();
84
83
        
87
86
            properties = new Properties();
88
87
        }
89
88
        
90
 
        for ( int i = 0 ; i < portNames.length; ++i )
 
89
        for ( String portName : portNames )
91
90
        {
92
91
            String unusedPort = Integer.toString( getNextAvailablePort()  );
93
 
            properties.put( portNames[i], unusedPort );
94
 
            this.getLog().info( "Reserved port " + unusedPort + " for " + portNames[i] );
 
92
            properties.put( portName, unusedPort );
 
93
            this.getLog().info( "Reserved port " + unusedPort + " for " + portName );
95
94
        }
96
95
        
97
96
        if ( outputFile != null )