[GitHub] [maven-wrapper-plugin] rfscholte commented on a change in pull request #1: [MWRAPPER-14] put all wrapper pieces in one build

2021-11-21 Thread GitBox


rfscholte commented on a change in pull request #1:
URL: https://github.com/apache/maven-wrapper-plugin/pull/1#discussion_r754017815



##
File path: 
maven-wrapper/src/main/java/org/apache/maven/wrapper/MavenWrapperMain.java
##
@@ -0,0 +1,110 @@
+package org.apache.maven.wrapper;
+
+/*
+ * 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.
+ */
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Properties;
+
+/**
+ * Main entry point for the Maven Wrapper, delegating wrapper execution to 
{@link WrapperExecutor}.
+ *
+ * @author Hans Dockter
+ */
+public class MavenWrapperMain
+{
+private static final String POM_PROPERTIES =
+
"/META-INF/maven/org.apache.maven.wrapper/maven-wrapper/pom.properties";
+
+public static final String DEFAULT_MAVEN_USER_HOME = System.getProperty( 
"user.home" ) + "/.m2";
+
+public static final String MVNW_VERBOSE = "MVNW_VERBOSE";
+
+public static final String MVNW_USERNAME = "MVNW_USERNAME";
+
+public static final String MVNW_PASSWORD = "MVNW_PASSWORD";
+
+public static final String MVNW_REPOURL = "MVNW_REPOURL";
+
+public static final String MVN_VERSION = "3.8.3";

Review comment:
   Right, so there are a couple of things that have been solved by moving 
it from takari to maven-core: 
   - no additional releases required.
   - identical scripts are in sync.
   We shouldn't loose these improvements.
   




-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] [maven-wrapper-plugin] rfscholte commented on a change in pull request #1: [MWRAPPER-14] put all wrapper pieces in one build

2021-11-21 Thread GitBox


rfscholte commented on a change in pull request #1:
URL: https://github.com/apache/maven-wrapper-plugin/pull/1#discussion_r753767354



##
File path: maven-wrapper-distribution/src/assembly/script/download
##
@@ -0,0 +1,51 @@
+##
+# Extension to allow automatically downloading the maven-wrapper.jar from 
Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in 
binary data.
+##
+if [ -r "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo "Found .mvn/wrapper/maven-wrapper.jar"
+fi
+else
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+fi
+
+
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar";

Review comment:
   I don't think this ( ${project.version} )  is going to work. At 
Maven-Core it would pick up the version of the distribution. It should not pick 
up the version of the plugin and we shouldn't release the plugin with every new 
release of Maven, which would bring us back to square one.

##
File path: maven-wrapper-distribution/src/assembly/script/download
##
@@ -0,0 +1,51 @@
+##
+# Extension to allow automatically downloading the maven-wrapper.jar from 
Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in 
binary data.
+##
+if [ -r "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo "Found .mvn/wrapper/maven-wrapper.jar"
+fi
+else
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+fi
+
+
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar";

Review comment:
   I don't think this ( ${project.version} )  is going to work. At 
Maven-Core it would pick up the version of the distribution. It should not pick 
up the version of the plugin and we shouldn't release the plugin with every new 
release of Maven, which would bring us back to square one.

##
File path: 
maven-wrapper/src/main/java/org/apache/maven/wrapper/MavenWrapperMain.java
##
@@ -0,0 +1,110 @@
+package org.apache.maven.wrapper;
+
+/*
+ * 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.
+ */
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Properties;
+
+/**
+ * Main entry point for the Maven Wrapper, delegating wrapper execution to 
{@link WrapperExecutor}.
+ *
+ * @author Hans Dockter
+ */
+public class MavenWrapperMain
+{
+private static final String POM_PROPERTIES =
+
"/META-INF/maven/org.apache.maven.wrapper/maven-wrapper/pom.properties";
+
+public static final String DEFAULT_MAVEN_USER_HOME = System.getProperty( 
"user.home" ) + "/.m2";
+
+public static final String MVNW_VERBOSE = "MVNW_VERBOSE";
+
+public static final String MVNW_USERNAME = "MVNW_USERNAME";
+
+public static final String MVNW_PASSWORD = "MVNW_PASSWORD";
+
+public static final String MVNW_REPOURL = "MVNW_REPOURL";
+
+public static final String MVN_VERSION = "3.8.3";

Review comment:
   If this value needs to be in sync with the Maven release, then this 
class (and its artifact) doesn't belong here.




-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.o

[GitHub] [maven-wrapper-plugin] rfscholte commented on a change in pull request #1: [MWRAPPER-14] put all wrapper pieces in one build

2021-11-21 Thread GitBox


rfscholte commented on a change in pull request #1:
URL: https://github.com/apache/maven-wrapper-plugin/pull/1#discussion_r753829576



##
File path: 
maven-wrapper/src/main/java/org/apache/maven/wrapper/MavenWrapperMain.java
##
@@ -0,0 +1,110 @@
+package org.apache.maven.wrapper;
+
+/*
+ * 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.
+ */
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Properties;
+
+/**
+ * Main entry point for the Maven Wrapper, delegating wrapper execution to 
{@link WrapperExecutor}.
+ *
+ * @author Hans Dockter
+ */
+public class MavenWrapperMain
+{
+private static final String POM_PROPERTIES =
+
"/META-INF/maven/org.apache.maven.wrapper/maven-wrapper/pom.properties";
+
+public static final String DEFAULT_MAVEN_USER_HOME = System.getProperty( 
"user.home" ) + "/.m2";
+
+public static final String MVNW_VERBOSE = "MVNW_VERBOSE";
+
+public static final String MVNW_USERNAME = "MVNW_USERNAME";
+
+public static final String MVNW_PASSWORD = "MVNW_PASSWORD";
+
+public static final String MVNW_REPOURL = "MVNW_REPOURL";
+
+public static final String MVN_VERSION = "3.8.3";

Review comment:
   If this value needs to be in sync with the Maven release, then this 
class (and its artifact) doesn't belong here.




-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] [maven-wrapper-plugin] rfscholte commented on a change in pull request #1: [MWRAPPER-14] put all wrapper pieces in one build

2021-11-21 Thread GitBox


rfscholte commented on a change in pull request #1:
URL: https://github.com/apache/maven-wrapper-plugin/pull/1#discussion_r753767354



##
File path: maven-wrapper-distribution/src/assembly/script/download
##
@@ -0,0 +1,51 @@
+##
+# Extension to allow automatically downloading the maven-wrapper.jar from 
Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in 
binary data.
+##
+if [ -r "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo "Found .mvn/wrapper/maven-wrapper.jar"
+fi
+else
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+fi
+
+
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar";

Review comment:
   I don't think this ( ${project.version} )  is going to work. At 
Maven-Core it would pick up the version of the distribution. It should not pick 
up the version of the plugin and we shouldn't release the plugin with every new 
release of Maven, which would bring us back to square one.




-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] [maven-wrapper-plugin] rfscholte commented on a change in pull request #1: [MWRAPPER-14] put all wrapper pieces in one build

2021-11-21 Thread GitBox


rfscholte commented on a change in pull request #1:
URL: https://github.com/apache/maven-wrapper-plugin/pull/1#discussion_r753767354



##
File path: maven-wrapper-distribution/src/assembly/script/download
##
@@ -0,0 +1,51 @@
+##
+# Extension to allow automatically downloading the maven-wrapper.jar from 
Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in 
binary data.
+##
+if [ -r "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo "Found .mvn/wrapper/maven-wrapper.jar"
+fi
+else
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+fi
+
+
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/${project.version}/maven-wrapper-${project.version}.jar";

Review comment:
   I don't think this ( ${project.version} )  is going to work. At 
Maven-Core it would pick up the version of the distribution. It should not pick 
up the version of the plugin and we shouldn't release the plugin with every new 
release of Maven, which would bring us back to square one.




-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org