You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "cstamas (via GitHub)" <gi...@apache.org> on 2025/02/10 11:59:51 UTC

[PR] [MNG-8573] OS Service [maven]

cstamas opened a new pull request, #2099:
URL: https://github.com/apache/maven/pull/2099

   And move the OS static helper to util, is not
   profile specific.
   
   ---
   
   https://issues.apache.org/jira/browse/MNG-8573


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


Re: [PR] [MNG-8573] OS Service [maven]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #2099:
URL: https://github.com/apache/maven/pull/2099#issuecomment-2648043778

   Yes, I intentionally left them out, as IMO this service would be most used for things like:
   * print out some OS related stuff (like `mvn -V` does)
   * the "is windows" stuff is hot and will be most used, as I envision
   
   I just wanted to keep this OS stuff small, minimal.


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


Re: [PR] [MNG-8573] OS Service [maven]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #2099:
URL: https://github.com/apache/maven/pull/2099


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


Re: [PR] [MNG-8573] OS Service [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #2099:
URL: https://github.com/apache/maven/pull/2099#issuecomment-2648038849

   I've enhanced the javadoc, but I wonder if it would make more sense to use proper enums, as we don't even define the values.


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


Re: [PR] [MNG-8573] OS Service [maven]

Posted by "pzygielo (via GitHub)" <gi...@apache.org>.
pzygielo commented on code in PR #2099:
URL: https://github.com/apache/maven/pull/2099#discussion_r1948984068


##########
api/maven-api-core/src/main/java/org/apache/maven/api/services/OsService.java:
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+package org.apache.maven.api.services;
+
+import org.apache.maven.api.Service;
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * OS detection service.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+public interface OsService extends Service {
+    /**
+     * Returns the OS full name.
+     */
+    @Nonnull
+    String name();
+
+    /**
+     * Returns the OS architecture.
+     */
+    @Nonnull
+    String arch();
+
+    /**
+     * Returns the OS version.
+     */
+    @Nonnull
+    String version();
+
+    /**
+     * Returns the OS family.
+     */
+    @Nonnull
+    String family();
+
+    /**
+     * Returns {@code true} if you need to make extra hoops and loops.

Review Comment:
   I hope this javadoc could be reworded.



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


Re: [PR] [MNG-8573] OS Service [maven]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #2099:
URL: https://github.com/apache/maven/pull/2099#discussion_r1948987020


##########
api/maven-api-core/src/main/java/org/apache/maven/api/services/OsService.java:
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+package org.apache.maven.api.services;
+
+import org.apache.maven.api.Service;
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Nonnull;
+
+/**
+ * OS detection service.
+ *
+ * @since 4.0.0
+ */
+@Experimental
+public interface OsService extends Service {
+    /**
+     * Returns the OS full name.
+     */
+    @Nonnull
+    String name();
+
+    /**
+     * Returns the OS architecture.
+     */
+    @Nonnull
+    String arch();
+
+    /**
+     * Returns the OS version.
+     */
+    @Nonnull
+    String version();
+
+    /**
+     * Returns the OS family.
+     */
+    @Nonnull
+    String family();
+
+    /**
+     * Returns {@code true} if you need to make extra hoops and loops.

Review Comment:
   sure, am just testing our reviewers "eagle eye"



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


Re: [PR] [MNG-8573] OS Service [maven]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #2099:
URL: https://github.com/apache/maven/pull/2099#issuecomment-2647912701

   The goal is simple:
   * the API is meant for plugins and extensions, while Maven "inner stuff" do have the static helper class
   * having Service (instead of static class/methods) we are in greater control and are future proof
   * for example (unsure how feasible this would be), we could test plugins on "spoofed OS"es?


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