-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MNG-8084] Move ModelBuilder and resolver provider to v4 api
- Loading branch information
Showing
141 changed files
with
17,274 additions
and
722 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* 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 java.util.List; | ||
|
||
import org.apache.maven.api.Service; | ||
|
||
public interface ModelBuilder extends Service { | ||
|
||
List<String> VALID_MODEL_VERSIONS = List.of("4.0.0", "4.1.0"); | ||
|
||
ModelBuilderResult build(ModelBuilderRequest request) throws ModelBuilderException; | ||
} |
51 changes: 51 additions & 0 deletions
51
api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelBuilderException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* 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.annotations.Experimental; | ||
|
||
/** | ||
* The Exception class throw by the {@link ProjectBuilder} service. | ||
* | ||
* @since 4.0.0 | ||
*/ | ||
@Experimental | ||
public class ModelBuilderException extends MavenException { | ||
|
||
private final ModelBuilderResult result; | ||
|
||
/** | ||
* Creates a new exception from the specified interim result and its associated problems. | ||
* | ||
* @param result The interim result, may be {@code null}. | ||
*/ | ||
public ModelBuilderException(ModelBuilderResult result) { | ||
super(result.toString()); | ||
this.result = result; | ||
} | ||
|
||
/** | ||
* Gets the interim result of the model building up to the point where it failed. | ||
* | ||
* @return The interim model building result or {@code null} if not available. | ||
*/ | ||
public ModelBuilderResult getResult() { | ||
return result; | ||
} | ||
} |
Oops, something went wrong.