-
1. Re: Simplifying POM Configuration in SwitchYard WAR Applications
mageshbk Apr 20, 2012 1:48 AM (in response to rcernich)As part of RESTEasy gateway research, I too was wondering this. Will get this sorted out as part of my work. Souldn't the configuration file be under WEB-INF for wars?
-
2. Re: Simplifying POM Configuration in SwitchYard WAR Applications
kcbabo Apr 25, 2012 9:05 AM (in response to mageshbk)Seems reasonable to me to support multiple locations for switchyard.xml based on the deployment type. I would expect that the following two would work:
META-INF/switchyard.xml
WEB-INF/switchyard.xml
If the deployer finds a switchyard.xml in both places, we can either reject the deployment or print a WARNING log message indicating which one is being used and which one is being ignored. Personally, I prefer the latter as it's a bit more forgiving, yet still provides the user with information on what's going on in case they included both files by mistake.
-
3. Re: Simplifying POM Configuration in SwitchYard WAR Applications
rcernich Apr 25, 2012 11:17 AM (in response to kcbabo)For consistency across project types, I would propose the following requirements:
Source (default): ${project.build.resources}/META-INF/switchyard.xml
Output (default): ${project.build.outputdirectory}/META-INF/switchyard.xml
That said, using something like ${webappDirectory}/WEB-INF/switchyard.xml for the output would be fine, so long as the SwitchYard configure plugin can resolve that variable.
I agree that the deployer should simply chunk out a warning if it finds more than one switchyard.xml file.
Best,
Rob
-
4. Re: Simplifying POM Configuration in SwitchYard WAR Applications
kcbabo Apr 25, 2012 4:59 PM (in response to rcernich)Consistency is definitely important. I honestly don't think there's an absolute right answer here - we just need to pick something that creates the least amount of confusion.
What do you think of putting switchyard.xml in the root of src/main/resources and then putting it in the target/classes/META-INF or target/classes/WEB-INF directory based on the packaging type? That way, the user and the tooling only worry about looking for it in one place. The deployer will still need to look in both places, but that's not something the user cares about.
-
5. Re: Simplifying POM Configuration in SwitchYard WAR Applications
rcernich Apr 25, 2012 5:06 PM (in response to kcbabo)Sounds good to me.
Satisfies the requirements:
- Default source switchyard.xml file location should be consist across all packaging types.
- The SwitchYard Maven plugin configuration should be consistent across all packaging types.
- Other than specific scanners, no additional plugin configuration should be required.
-
6. Re: Simplifying POM Configuration in SwitchYard WAR Applications
kcbabo Apr 25, 2012 7:28 PM (in response to rcernich)Right on. Would you mind creating a JIRA?
-
7. Re: Simplifying POM Configuration in SwitchYard WAR Applications
kcbabo Apr 25, 2012 8:37 PM (in response to kcbabo)I happened to be in JIRA for another issue, so went ahead and created it: