You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't implement my use case with the plugin right now. My use case =>
I want to install my WebApp on multiple environnements, let say : dev, test, prod.
In test there are 2 Tomcat instances, prod 3 isntance, and just one in dev.
So I want my build to auto adjust the number of times I invoke the tomcat plugin to install my WAR file. My idea was to declare some properties in profiles.
So for 1 instance I want to set a property tomcatUrl
For 2 instances : tomcatUrl, tomcatUrl2
For n instances : tomcatUrl, tomcatUrl2, ... tomcatUrlN
I'm trying to use the plugin to iterate over a list, calculated at runtime by another Mojo that check how many properties starting with tomcatUrl are set.
Then I create a content with ,2,...N, and configure tomcat install mojo with ${tomcatUrl@item@}
It works great !
BUT, if only the first one is set, my content looks like so the plugin invoke nothing.
That's because, in AbstractIteratorMojo the getItems() methods check with isContentSet() there is a non empty value.
And in my case, I don't want to rename my first var as tomcatUrl1 ....
So i'd like
Prop 1) a new property to allow empty item ==> no trim() in isContentSet().
Prop 2) change the getItems() to not check if the content is set
protected List<String> getItems() throws MojoExecutionException {
List<String> result = new ArrayList<String>();
if (isItemsSet()) {
result = items;
} else {
result = getContentAsList();
}
return result;
}
The text was updated successfully, but these errors were encountered:
Hi,
I can't implement my use case with the plugin right now. My use case =>
I want to install my WebApp on multiple environnements, let say : dev, test, prod.
In test there are 2 Tomcat instances, prod 3 isntance, and just one in dev.
So I want my build to auto adjust the number of times I invoke the tomcat plugin to install my WAR file. My idea was to declare some properties in profiles.
So for 1 instance I want to set a property tomcatUrl
For 2 instances : tomcatUrl, tomcatUrl2
For n instances : tomcatUrl, tomcatUrl2, ... tomcatUrlN
I'm trying to use the plugin to iterate over a list, calculated at runtime by another Mojo that check how many properties starting with tomcatUrl are set.
Then I create a content with ,2,...N, and configure tomcat install mojo with ${tomcatUrl@item@}
It works great !
BUT, if only the first one is set, my content looks like so the plugin invoke nothing.
That's because, in AbstractIteratorMojo the getItems() methods check with isContentSet() there is a non empty value.
And in my case, I don't want to rename my first var as tomcatUrl1 ....
So i'd like
Prop 1) a new property to allow empty item ==> no trim() in isContentSet().
Prop 2) change the getItems() to not check if the content is set
The text was updated successfully, but these errors were encountered: