forked from arquillian/arquillian-core
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(arquillian#159): Creates SPI to resolve placeholders in configur…
…ation files
- Loading branch information
1 parent
ddb52fa
commit 0464ffb
Showing
15 changed files
with
574 additions
and
127 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
20 changes: 20 additions & 0 deletions
20
...org/jboss/arquillian/config/impl/extension/ClasspathConfigurationPlaceholderResolver.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,20 @@ | ||
package org.jboss.arquillian.config.impl.extension; | ||
|
||
import org.jboss.arquillian.config.descriptor.api.ArquillianDescriptor; | ||
import org.jboss.arquillian.config.spi.ConfigurationPlaceholderResolver; | ||
import org.jboss.shrinkwrap.descriptor.api.Descriptors; | ||
|
||
class ClasspathConfigurationPlaceholderResolver implements ConfigurationPlaceholderResolver { | ||
|
||
public ArquillianDescriptor resolve(ArquillianDescriptor descriptor) { | ||
|
||
final String descriptorAsString = descriptor.exportAsString(); | ||
return Descriptors.importAs(ArquillianDescriptor.class) | ||
.fromString(StringPropertyReplacer.replaceClasspath(descriptorAsString)); | ||
|
||
} | ||
|
||
public int precedence() { | ||
return 0; | ||
} | ||
} |
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
Oops, something went wrong.