-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SHRINKRES-51][SHRINKRES-60] Refactor the API to clearly delineate se…
…ttings configuration as separate from loading POM metadata. Allow configs to only be applied once. Settings, if applicable, are applied before POM metadata is loaded, always.
- Loading branch information
1 parent
db50abc
commit abdd4b0
Showing
63 changed files
with
1,604 additions
and
603 deletions.
There are no files selected for viewing
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
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
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
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
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
29 changes: 29 additions & 0 deletions
29
...c/main/java/org/jboss/shrinkwrap/resolver/api/archive/PomEquippedArchiveResolveStage.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,29 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2012, Red Hat Middleware LLC, and individual contributors | ||
* by the @authors tag. See the copyright.txt in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* Licensed 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.jboss.shrinkwrap.resolver.api.archive; | ||
|
||
import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStageBase; | ||
|
||
/** | ||
* Maven-based ShrinkWrap Archive Resolve Stage which has been loaded with POM metadata | ||
* | ||
* @author <a href="mailto:alr@jboss.org">Andrew Lee Rubinger</a> | ||
*/ | ||
public interface PomEquippedArchiveResolveStage extends | ||
PomEquippedResolveStageBase<PomEquippedArchiveResolveStage, MavenArchiveStrategyStage, MavenArchiveFormatStage> { | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...e/src/main/java/org/jboss/shrinkwrap/resolver/api/archive/PomlessArchiveResolveStage.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 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2012, Red Hat Middleware LLC, and individual contributors | ||
* by the @authors tag. See the copyright.txt in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* Licensed 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.jboss.shrinkwrap.resolver.api.archive; | ||
|
||
import org.jboss.shrinkwrap.resolver.api.maven.PomlessResolveStageBase; | ||
|
||
/** | ||
* Maven-based ShrinkWrap Archive Resolve Stage which may be loaded with POM metadata | ||
* | ||
* @author <a href="mailto:alr@jboss.org">Andrew Lee Rubinger</a> | ||
*/ | ||
public interface PomlessArchiveResolveStage | ||
extends | ||
PomlessResolveStageBase<PomEquippedArchiveResolveStage, PomlessArchiveResolveStage, MavenArchiveStrategyStage, MavenArchiveFormatStage> { | ||
|
||
} |
51 changes: 51 additions & 0 deletions
51
...ve-prototype/src/main/java/org/jboss/shrinkwrap/resolver/api/archive/ShrinkWrapMaven.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 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2012, Red Hat Middleware LLC, and individual contributors | ||
* by the @authors tag. See the copyright.txt in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* Licensed 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.jboss.shrinkwrap.resolver.api.archive; | ||
|
||
import org.jboss.shrinkwrap.resolver.api.ConfiguredResolverSystemFactory; | ||
import org.jboss.shrinkwrap.resolver.api.Resolvers; | ||
import org.jboss.shrinkwrap.resolver.api.maven.MavenResolverSystem; | ||
|
||
/** | ||
* ShrinkWrap Maven Resolver. Shorthand convenience API where the call {@link ShrinkWrapMaven#resolver()} is analogous to a more | ||
* longhand, formal call to {@link Resolvers#use(Class)}, passing {@link MavenResolverSystem} as the argument. Also | ||
* supports configuration via {@link ShrinkWrapMaven#configureResolver()}. | ||
* | ||
* @author <a href="mailto:alr@jboss.org">Andrew Lee Rubinger</a> | ||
*/ | ||
public class ShrinkWrapMaven { | ||
|
||
/** | ||
* Creates and returns a new {@link MavenShrinkWrapResolverSystem} instance | ||
* | ||
* @return | ||
*/ | ||
public static MavenShrinkWrapResolverSystem resolver() { | ||
return Resolvers.use(MavenShrinkWrapResolverSystem.class); | ||
} | ||
|
||
/** | ||
* Creates and returns a new {@link ConfiguredResolverSystemFactory} instance which may be used to create new | ||
* {@link MavenShrinkWrapResolverSystem} instances | ||
* | ||
* @return | ||
*/ | ||
public static ConfiguredResolverSystemFactory<MavenShrinkWrapResolverSystem, ConfigurableMavenShrinkWrapResolverSystem> configureResolver() { | ||
return Resolvers.configure(ConfigurableMavenShrinkWrapResolverSystem.class); | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...rc/main/java/org/jboss/shrinkwrap/resolver/api/maven/ConfigurableMavenResolverSystem.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,43 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2012, Red Hat Middleware LLC, and individual contributors | ||
* by the @authors tag. See the copyright.txt in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* Licensed 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.jboss.shrinkwrap.resolver.api.maven; | ||
|
||
import org.jboss.shrinkwrap.resolver.api.ConfigurableResolverSystem; | ||
import org.jboss.shrinkwrap.resolver.api.Resolvers; | ||
|
||
/** | ||
* Entry point of a Maven-based Resolver system which supports configuration. To create a new instance, pass in this | ||
* class reference to {@link Resolvers#use(Class)} or {@link Resolvers#use(Class, ClassLoader)}, or instead call upon | ||
* {@link Maven#configureResolver()} | ||
* | ||
* @author <a href="mailto:alr@jboss.org">Andrew Lee Rubinger</a> | ||
* @author <a href="mailto:kpiwko@redhat.com">Karel Piwko</a> | ||
*/ | ||
public interface ConfigurableMavenResolverSystem extends ConfigurableResolverSystem<MavenResolverSystem>, | ||
MavenResolverSystem { | ||
|
||
/** | ||
* Configures the current session from POM metadata found via the ShrinkWrap Resolver Maven Plugin; retrieves | ||
* information from the currently-running Maven process. | ||
* | ||
* @return | ||
* @throws InvalidEnvironmentException | ||
* If the currently-executing environment is not under the control of the ShrinkWrap Resolver Maven | ||
* Plugin | ||
*/ | ||
PomEquippedResolveStage configureViaPlugin() throws InvalidEnvironmentException; | ||
} |
67 changes: 0 additions & 67 deletions
67
...e/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/ConfigurableResolveStageBase.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.