You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/08/01 08:59:38 UTC
[GitHub] [maven-plugin-tools] slawekjaranowski opened a new pull request, #130: [MPLUGIN-400] Add system requirements history section
slawekjaranowski opened a new pull request, #130:
URL: https://github.com/apache/maven-plugin-tools/pull/130
- add new section in report
- move report to separate package
- not use modello for simple case
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-plugin-tools] slawekjaranowski commented on a diff in pull request #130: [MPLUGIN-400] Add system requirements history section
Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #130:
URL: https://github.com/apache/maven-plugin-tools/pull/130#discussion_r945319747
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report/Requirements.java:
##########
@@ -0,0 +1,94 @@
+package org.apache.maven.plugin.plugin.report;
+
+/*
+ * 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.util.Properties;
+
+/**
+ * Plugin requirements.
+ *
+ * @deprecated will be removed in the next major version
+ */
+@Deprecated
+public class Requirements
Review Comment:
Entire class should be deprecated as parameter `requirements` is deprecated.
When we remove parameter `requirements` class will also be removed.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-plugin-tools] slawekjaranowski merged pull request #130: [MPLUGIN-400] Add system requirements history section
Posted by GitBox <gi...@apache.org>.
slawekjaranowski merged PR #130:
URL: https://github.com/apache/maven-plugin-tools/pull/130
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-plugin-tools] michael-o commented on a diff in pull request #130: [MPLUGIN-400] Add system requirements history section
Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #130:
URL: https://github.com/apache/maven-plugin-tools/pull/130#discussion_r945321990
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report/Requirements.java:
##########
@@ -0,0 +1,94 @@
+package org.apache.maven.plugin.plugin.report;
+
+/*
+ * 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.util.Properties;
+
+/**
+ * Plugin requirements.
+ *
+ * @deprecated will be removed in the next major version
+ */
+@Deprecated
+public class Requirements
Review Comment:
Now I understand, the histories replace it altogether.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-plugin-tools] michael-o commented on a diff in pull request #130: [MPLUGIN-400] Add system requirements history section
Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #130:
URL: https://github.com/apache/maven-plugin-tools/pull/130#discussion_r941722773
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java:
##########
@@ -159,12 +159,42 @@
/**
* Set this to "true" to generate the usage section for "plugin-info.html" with
* {@code <extensions>true</extensions>}.
- *
+ *
* @since 3.7.0
*/
@Parameter( defaultValue = "false", property = "maven.plugin.report.hasExtensionsToLoad" )
private boolean hasExtensionsToLoad;
+ /**
+ * The Plugin requirements history list.
+ * <p>
+ * Can be specified as list of string in format:
+ *
+ * <pre>
+ * <requirementsHistories>
+ * <requirementsHistory>
+ * plugin-version requires Maven maven-version and JDK jdk-version
+ * </requirementsHistory>
+ * </requirementsHistories>
+ * </pre>
+ *
+ * or as xml:
+ *
+ * <pre>
+ * <requirementsHistories>
+ * <requirementsHistory>
+ * <version>plugin version</version>
+ * <maven>maven version</maven>
+ * <jdk>jdk version</jdk>
+ * </requirementsHistory>
+ * </requirementsHistories>
Review Comment:
I wouldn't support both, it just causes confusion and inconsistency. I'd go with the second approach.
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report/RequirementsHistory.java:
##########
@@ -0,0 +1,99 @@
+package org.apache.maven.plugin.plugin.report;
+
+/*
+ * 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.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.maven.reporting.MavenReportException;
+
+/**
+ * Plugin requirements history.
+ *
+ * @author Slawomir Jaranowski
+ */
+public class RequirementsHistory
+{
+ private static final Pattern REQUIREMENT_PATTERN =
+ Pattern.compile( "\\s*(.+?)\\s+requires\\s+Maven\\s+(.+?)\\s+and\\s+JDK\\s+(.+?)\\s*" );
Review Comment:
See previous comment.
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report/Requirements.java:
##########
@@ -0,0 +1,91 @@
+package org.apache.maven.plugin.plugin.report;
+
+/*
+ * 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.util.Properties;
+
+/**
+ * Plugin requirements.
+ */
+public class Requirements
+{
+ /**
+ * The minimum version of Maven to run this plugin.
+ */
+ private String maven;
+
+ /**
+ * The minimum version of the JDK to run this plugin.
+ */
+ private String jdk;
+
+ /**
+ * The minimum memory needed to run this plugin.
+ */
+ private String memory;
+
+ /**
+ * The minimum diskSpace needed to run this plugin.
+ */
+ private String diskSpace;
+
+ /**
+ * Field others.
+ */
+ private java.util.Properties others;
+
+ public String getMaven()
+ {
+ return maven;
+ }
+
+ public String getJdk()
+ {
+ return jdk;
+ }
+
+ public String getMemory()
+ {
+ return memory;
+ }
+
+ public String getDiskSpace()
+ {
+ return diskSpace;
+ }
+
+ public Properties getOthers()
+ {
+ return others;
+ }
+
+ @Override
+ public String toString()
+ {
+ final StringBuilder sb = new StringBuilder( "Requirements{" );
+ sb.append( "maven='" ).append( maven ).append( '\'' );
+ sb.append( ", jdk='" ).append( jdk ).append( '\'' );
+ sb.append( ", memory='" ).append( memory ).append( '\'' );
+ sb.append( ", diskSpace='" ).append( diskSpace ).append( '\'' );
+ sb.append( ", others=" ).append( others );
+ sb.append( '}' );
+ return sb.toString();
+ }
+}
Review Comment:
All elements which will go away should be deprecated.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-plugin-tools] michael-o commented on a diff in pull request #130: [MPLUGIN-400] Add system requirements history section
Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #130:
URL: https://github.com/apache/maven-plugin-tools/pull/130#discussion_r945315065
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report/Requirements.java:
##########
@@ -0,0 +1,94 @@
+package org.apache.maven.plugin.plugin.report;
+
+/*
+ * 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.util.Properties;
+
+/**
+ * Plugin requirements.
+ *
+ * @deprecated will be removed in the next major version
+ */
+@Deprecated
+public class Requirements
Review Comment:
Wait a second, not the entire class will go, but only some elements, no?
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [maven-plugin-tools] slawekjaranowski commented on a diff in pull request #130: [MPLUGIN-400] Add system requirements history section
Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #130:
URL: https://github.com/apache/maven-plugin-tools/pull/130#discussion_r945323200
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report/Requirements.java:
##########
@@ -0,0 +1,94 @@
+package org.apache.maven.plugin.plugin.report;
+
+/*
+ * 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.util.Properties;
+
+/**
+ * Plugin requirements.
+ *
+ * @deprecated will be removed in the next major version
+ */
+@Deprecated
+public class Requirements
Review Comment:
histories will be used manually by the users to point historical requirements.
Current requirements should be computed based on current project configuration.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org