Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/mip 312 #12

Merged
merged 10 commits into from
Jul 7, 2020
Prev Previous commit
Next Next commit
MIP-344 Fixed TODO, added empty config files under proper directories…
… to fix tests
  • Loading branch information
kkingavio committed Jul 7, 2020
commit dafc9400a3468b898f1dd72bb10b37ffc662f5e4
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ class Application {
}

void loadConfigurationFiles() {
File configurationPath = new File(applicationPath, 'src/main')
File configurationPath = new File(applicationPath, 'src/main/mule')
if (!configurationPath.exists()) {
throw new FileNotFoundException( APPLICATION_DOES_NOT_EXIST + configurationPath.absolutePath)
}
//TODO if i set the path to src/main/mule and there are no sub-directories, it doesn't load anything.

configurationPath.eachFileMatch(~/.*.xml/){ file ->
configurationFiles.add(new ConfigurationFile(file))
}

configurationPath.eachDirRecurse { dir ->
dir.eachFileMatch(~/.*.xml/) { file ->
configurationFiles.add(new ConfigurationFile(file))
Expand Down
5 changes: 5 additions & 0 deletions src/test/resources/BadMuleApp/src/main/mule/a.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd"></mule>
5 changes: 5 additions & 0 deletions src/test/resources/SampleMuleApp/src/main/mule/a.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd"></mule>