[GitHub] [maven-dependency-plugin] pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add 
mirrors, proxies and authentication for remote repositories.
URL: 
https://github.com/apache/maven-dependency-plugin/pull/19#discussion_r315763348
 
 

 ##
 File path: src/test/resources/unit/get-test/realm.properties
 ##
 @@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# username: password[,rolename ...]
+foo: bar,userrole
 
 Review comment:
   Empty line added!


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [maven-dependency-plugin] pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add 
mirrors, proxies and authentication for remote repositories.
URL: 
https://github.com/apache/maven-dependency-plugin/pull/19#discussion_r315763130
 
 

 ##
 File path: src/test/java/org/apache/maven/plugins/dependency/TestGetMojo.java
 ##
 @@ -48,7 +62,14 @@ protected void setUp()
 assertNotNull( mojo );
 
 LegacySupport legacySupport = lookup( LegacySupport.class );
-legacySupport.setSession( newMavenSession( new MavenProjectStub() ) );
+MavenSession session = newMavenSession(new MavenProjectStub());
+Settings settings = session.getSettings();
+Server server = new Server();
+server.setId( "myserver" );
+server.setUsername( "foo" );
+server.setPassword( "bar" );
+settings.addServer(server);
 
 Review comment:
   Done.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [maven-dependency-plugin] pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add 
mirrors, proxies and authentication for remote repositories.
URL: 
https://github.com/apache/maven-dependency-plugin/pull/19#discussion_r315762920
 
 

 ##
 File path: src/test/java/org/apache/maven/plugins/dependency/TestGetMojo.java
 ##
 @@ -96,6 +117,27 @@ public void testRemoteRepositories()
 mojo.execute();
 }
 
+/**
+ * Test remote repositories parameter with basic authentication
+ *
+ * @throws Exception in case of errors
+ */
+public void testRemoteRepositoriesAuthentication()
+throws Exception
+{
+org.eclipse.jetty.server.Server server = createServer( 8000 );
 
 Review comment:
   I start the server now with a random port, and use server.getURI() to 
generate the remoteRepositories parameter.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [maven-dependency-plugin] pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add 
mirrors, proxies and authentication for remote repositories.
URL: 
https://github.com/apache/maven-dependency-plugin/pull/19#discussion_r315763022
 
 

 ##
 File path: 
src/test/resources/unit/get-test/repository/test/test/1.0/test-1.0.pom
 ##
 @@ -0,0 +1,41 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+  4.0.0
+
+  test
+  test
+  1.0
+
+  
+
+  
+maven-compiler-plugin
 
 Review comment:
   Done. Thanks!


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [maven-dependency-plugin] pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
pmoerenhout commented on a change in pull request #19: [MDEP-579] - Add 
mirrors, proxies and authentication for remote repositories.
URL: 
https://github.com/apache/maven-dependency-plugin/pull/19#discussion_r315761851
 
 

 ##
 File path: src/test/java/org/apache/maven/plugins/dependency/TestGetMojo.java
 ##
 @@ -96,6 +117,27 @@ public void testRemoteRepositories()
 mojo.execute();
 }
 
+/**
+ * Test remote repositories parameter with basic authentication
+ *
+ * @throws Exception in case of errors
+ */
+public void testRemoteRepositoriesAuthentication()
+throws Exception
+{
+org.eclipse.jetty.server.Server server = createServer( 8000 );
+server.start();
+
+setVariableValueToObject( mojo, "remoteRepositories", 
"myserver::default::http://localhost:8000/maven; );
+mojo.setGroupId( "test" );
+mojo.setArtifactId( "test" );
+mojo.setVersion( "1.0" );
+
+mojo.execute();
+
+server.stop();
 
 Review comment:
   I've added the server.stop() to a finally block.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services