gnodet commented on code in PR #1411:
URL: https://github.com/apache/maven/pull/1411#discussion_r1560021272


##########
api/maven-api-core/src/main/java/org/apache/maven/api/Lifecycle.java:
##########
@@ -0,0 +1,157 @@
+/*
+ * 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;
+
+import java.util.*;
+import java.util.stream.Stream;
+
+import org.apache.maven.api.annotations.Experimental;
+import org.apache.maven.api.annotations.Immutable;
+import org.apache.maven.api.model.Plugin;
+
+/**
+ * Lifecycle definition
+ *
+ * @since 4.0.0
+ */
+@Experimental
+@Immutable
+public interface Lifecycle extends ExtensibleEnum {
+
+    String CLEAN = "clean";
+
+    String DEFAULT = "default";
+
+    String SITE = "site";
+
+    String WRAPPER = "wrapper";
+
+    String PRE = "pre:";
+    String POST = "post:";
+    String RUN = "run:";
+
+    String READY = "ready";

Review Comment:
   It's not really used anymore in this PR, so  I'll remove those new concepts 
and I'll defer their addition to #1429.
   
   For the record, it's used for the new lifecycle definition supporting 
dynamic phases and a fully concurrent build, see 
https://github.com/apache/maven/pull/1429/files#diff-dbccda410d9433bca88c9821a2ebd7ecb3b759738a2599a85748766c34658547R224-R252
   In this PR, the phases are more fine-grained with inter-phases dependencies 
and more fine-grained inter-project dependencies.  The lifecycle is not a 
simple list anymore, but looks more like a tree.
   So `ready` represents the state of a project which is ready to be used as a 
dependency.  This usually means that resources have been processed and classes 
compiled.  The main point is that the `compile` phase should not have to be 
executed after the `resources` phase, as they both execute on different input 
and output and can be executed in parallel.  So `compile` phase depends on 
`sources` phase, and `ready` depends on `compile` and `resources`, then 
`package` depends on `ready`.
   The benefits (in addition to supporting dynamic phases with pre/post steps) 
is that we can have a `package` phase which does not depend on running tests, 
while `verify` would package and run unit/integration tests.  This also cleanly 
solves problems coming from running `mvn compile` where some post processing 
can be mapped to that `ready` phase.  So the definition of the tree-lifecycle 
above is not well defined yet, especially, the problem is how to bring those 
new features and keep a good level of compatibility.
   
   I'd rather have a clean set of inter-phase and inter-project dependencies 
(for example, `install` and `deploy` do depend on `package`, but should not 
depend on running unit-tests and integration-tests).
   
   Anyway, this can be deferred and discussed in the context of #1429, so I'll 
trim the `Lifecycle` interface to what is currently in Maven 3 (keeping in mind 
it can be extended in the future).



-- 
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-unsubscr...@maven.apache.org

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

Reply via email to