~kaaloo/+junk/wagon-debian

« back to all changes in this revision

Viewing changes to src/main/java/org/apache/maven/wagon/providers/debian/DebianPackageRepository.java

  • Committer: luis
  • Date: 2008-08-19 18:15:45 UTC
  • Revision ID: luis-20080819181545-qev4bna4hljoii21
Updated components.xml to reflect correct settings instead of existing settings copied from wagon-file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
public class DebianPackageRepository {
29
29
 
 
30
        private static final String BUILD_DEPENDS_INDEP = "Build-Depends-Indep:";
 
31
 
30
32
        String getProcessOuput(Process process) throws IOException {
31
33
                StringWriter writer = new StringWriter();
32
34
                BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
54
56
                BufferedReader reader = new BufferedReader(new StringReader(aptCacheShowSource(packageName)));
55
57
                String line;
56
58
                while ((line = reader.readLine()) != null) {
57
 
                        if (line.startsWith("Build-Depends-Indep:")) {
58
 
                                return line.substring(line.indexOf(':') + 1).trim().split("\\s*,\\s*");
 
59
                        if (line.startsWith(BUILD_DEPENDS_INDEP)) {
 
60
                                return line.substring(BUILD_DEPENDS_INDEP.length()).trim().split("\\s*,\\s*");
59
61
                        }
60
62
                }
61
63
                return new String [0];