Skip to content

Commit

Permalink
Move actions.xsd from resources to resources/xsd and install iidm.xsd
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbagu authored and mathbagu committed Oct 21, 2016
1 parent 8902bd5 commit f661a22
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
23 changes: 21 additions & 2 deletions distribution/src/main/resources/assemblies/full.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium)
Copyright (c) 2016, RTE (http://www.rte-france.com)
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
Expand Down Expand Up @@ -47,12 +56,22 @@
</fileSet>

<!-- include further resources -->
<!-- actions.xsd from iidm-actions-contingencies-xml-client module, to be put in etc -->
<!-- copy actions.xsd from iidm-actions-contingencies-xml-client module to etc -->
<fileSet>
<directory>${project.basedir}/../iidm-actions-contingencies-xml-client/src/main/resources</directory>
<outputDirectory>etc</outputDirectory>
<includes>
<include>actions.xsd</include>
<include>xsd/actions.xsd</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>

<!-- copy iidm.xsd from iidm-xml-import-export to etc -->
<fileSet>
<directory>${project.basedir}/../iidm-xml-import-export/src/main/resources</directory>
<outputDirectory>etc</outputDirectory>
<includes>
<include>xsd/iidm.xsd</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>
Expand Down
2 changes: 1 addition & 1 deletion iidm-actions-contingencies-xml-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<packageName>eu.itesla_project.iidm.actions_contingencies.xml.mapping</packageName>
<locale>en_US</locale>
<sources>
<source>src/main/resources/actions.xsd</source>
<source>src/main/resources/xsd/actions.xsd</source>
</sources>
</configuration>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public XmlFileContingenciesAndActionsDatabaseClient(Path file)
Unmarshaller jaxbMarshaller = jaxbContext.createUnmarshaller();

SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
URL res=XmlFileContingenciesAndActionsDatabaseClient.class.getClassLoader().getResource("actions.xsd");
URL res=XmlFileContingenciesAndActionsDatabaseClient.class.getClassLoader().getResource("xsd/actions.xsd");
Schema schema = sf.newSchema(res);
jaxbMarshaller.setSchema(schema);

Expand Down

0 comments on commit f661a22

Please sign in to comment.