Dear maven user and developers, 

Attached is pom.xml of Flume. I have some questions as follow, really appreciate your help or guide, thanks !!

1. Why profile id = hadoop-1.0 is the default profile ?
    If not specifying -Pxxxxx for mvn command, I found hadoop-1.0 is the default one to use. why is it the default one ? is it because <name>!hadoop.profile</name> is specified in its activation and hadoop.profile is not specified in properties ? Seems not... I tried with adding <hadoop.profile>2</hadoop.profile> into properties, but hadoop-1.0 is still used. This can be proven by the version of dependencies downloaded into .m2 repository

2. hadoop-test-xxxx is needed for profile id = hadoop-2 ?
    when I issued "mvn xxxx -Phadoop-2", the following errors came out:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.1:process (default) on project flume-hdfs-sink: Failed to resolve dependencies for one or more projects in the reactor. Reason: Missing:
[ERROR] ----------
[ERROR] 1) org.apache.hadoop:hadoop-test:jar:2.4.0
[ERROR] Try downloading the file manually from the project website.
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.apache.hadoop -DartifactId=hadoop-test -Dversion=2.4.0 -Dpackaging=jar -Dfile=/path/to/file
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.apache.hadoop -DartifactId=hadoop-test -Dversion=2.4.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] Path to dependency:
[ERROR] 1) org.apache.flume.flume-ng-sinks:flume-hdfs-sink:jar:
[ERROR] 2) org.apache.hadoop:hadoop-test:jar:2.4.0
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR] for artifact:
[ERROR] org.apache.flume.flume-ng-sinks:flume-hdfs-sink:jar:
[ERROR] from the specified remote repositories:
[ERROR] (, releases=true, snapshots=false),
[ERROR] (, releases=true, snapshots=false),
[ERROR] apache.snapshots (, releases=false, snapshots=true),
[ERROR] central (, releases=true, snapshots=false)
[ERROR] -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]

I just wonder and be confused why org.apache.hadoop:hadoop-test:jar:2.4.0 is requested. Because the following statements only appear in profile id = hadoop-1.0

The pom.xml for flume-hdfs-sink is also attached as pom-1.xml. Thanks !



手机 cellphone :+86-1368-113-8972