I have found that the error was that instead of using UISelectOne I need to
use UIInput since it is the default input type used. But I think that error
message should be improved about incompatible types instead of an error
that it is not really the error it is happening.
WDYT?
On Wed, Jan 25, 2017 at 4:40 PM, Alex Soto Bueno <asotobue(a)redhat.com>
wrote:
Hello,
I have next command:
public class AddAlgeronFolderPublisher extends AbstractProjectCommand
implements UICommand
{
@Inject
private ProjectFactory projectFactory;
@Inject
private FacetFactory facetFactory;
@Inject
@WithAttributes(shortName = 'o', label = "Output Folder", required
=
true)
private UISelectOne<String> outputFolder;
@Inject
@WithAttributes(shortName = 'c', label = "Contracts Folder")
private UISelectOne<String> contractFolder;
@Override
public UICommandMetadata getMetadata(UIContext context)
{
return Metadata.from(super.getMetadata(context), getClass())
.category(Categories.create("Algeron"))
.name("Arquillian Algeron: Add Folder Publisher")
.description("This command registers a Folder Publisher for
Algeron");
}
@Override
public void initializeUI(UIBuilder builder) throws Exception
{
builder.add(outputFolder).add(contractFolder);
contractFolder.setDefaultValue("target/pacts");
}
// ......
}
When in Forge console I run:
arquillian-algeron-add-folder-publisher --output-folder /tmp
I got:
***INFO*** Required inputs not satisfied, entering interactive mode
***ERROR*** Output Folder must be specified.
But you can see that I am setting the attribute in the command so any idea
of why this is failing?