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

2019-08-20 Thread GitBox
Tibor17 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_r315697595
 
 

 ##
 File path: src/test/java/org/apache/maven/plugins/dependency/TestGetMojo.java
 ##
 @@ -150,4 +192,47 @@ public void testParseRepository()
 // expected
 }
 }
+
+private ContextHandler createContextHandler() {
 
 Review comment:
   The same here (spaces).
   Bracket should be on a new line:
   ```
   private ContextHandler createContextHandler()
   {
   ```


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] Tibor17 commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
Tibor17 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_r315697889
 
 

 ##
 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:
   add an emty line.


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] Tibor17 commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
Tibor17 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_r315697110
 
 

 ##
 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:
   add spaces like his: `settings.addServer( server )`


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] Tibor17 commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
Tibor17 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_r315696215
 
 

 ##
 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:
   We don't need to have a plugin for this. This is enough:
   ```
 
   1.7
   1.7
 
   ```


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] Tibor17 commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
Tibor17 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_r315694310
 
 

 ##
 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:
   A concrete prort cannot be. We use the wildcard port `0.0.0.0` and the 
client connects to the server's local port.


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] Tibor17 commented on a change in pull request #19: [MDEP-579] - Add mirrors, proxies and authentication for remote repositories.

2019-08-20 Thread GitBox
Tibor17 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_r315693715
 
 

 ##
 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:
   Pls call it within the `finally` block. This is a typical problem of 
integration tests that they failed and the server is never stopped.


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