Author: tchemit Date: 2010-10-29 13:52:51 +0200 (Fri, 29 Oct 2010) New Revision: 134 Url: http://nuiton.org/repositories/revision/diswork/134 Log: fix dependencies + fix a strange exception ? about JDOM ? Modified: trunk/diswork-daemon/pom.xml trunk/diswork-daemon/src/main/java/org/nuiton/diswork/daemon/JobDescription.java trunk/diswork-fs/pom.xml trunk/pom.xml Modified: trunk/diswork-daemon/pom.xml =================================================================== --- trunk/diswork-daemon/pom.xml 2010-10-29 08:30:07 UTC (rev 133) +++ trunk/diswork-daemon/pom.xml 2010-10-29 11:52:51 UTC (rev 134) @@ -1,5 +1,6 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.nuiton</groupId> @@ -18,15 +19,12 @@ <artifactId>diswork-fs</artifactId> <version>${project.version}</version> </dependency> + <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </dependency> <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> </dependency> @@ -53,18 +51,22 @@ <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jsp-2.1-jetty</artifactId> - <version>6.1.24</version> </dependency> + <dependency> + <groupId>jdom</groupId> + <artifactId>jdom</artifactId> + </dependency> <!-- test --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> <scope>test</scope> </dependency> </dependencies> - <build> - </build> - </project> \ No newline at end of file Modified: trunk/diswork-daemon/src/main/java/org/nuiton/diswork/daemon/JobDescription.java =================================================================== --- trunk/diswork-daemon/src/main/java/org/nuiton/diswork/daemon/JobDescription.java 2010-10-29 08:30:07 UTC (rev 133) +++ trunk/diswork-daemon/src/main/java/org/nuiton/diswork/daemon/JobDescription.java 2010-10-29 11:52:51 UTC (rev 134) @@ -265,24 +265,23 @@ public static JobDescription parseJSDL(String jsdl) throws BadJobException { // TODO 20100616 bleny correctly set dependency to JDOM in pom.xml JobDescription result = new JobDescription(); - try { SAXBuilder builder = new SAXBuilder(); Document document = builder.build(IOUtils.toInputStream(jsdl)); Element jobDefinition = document.getRootElement(); - + // namespaces Namespace jsdlNamespace = jobDefinition.getNamespace("jsdl"); Namespace jsdlPosixNamespace = jobDefinition.getNamespace("jsdl-posix"); Namespace disworkNamespace = jobDefinition.getNamespace("diswork"); - + // main element Element jobDescription = jobDefinition.getChild("JobDescription", jsdlNamespace); // job identification Element jobIdentification = jobDescription.getChild - ("JobIdentification", jsdlNamespace); + ("JobIdentification", jsdlNamespace); Element jobName = jobIdentification.getChild("JobName", jsdlNamespace); result.setJobName(jobName.getText()); @@ -294,7 +293,7 @@ jsdlNamespace); if (applicationName != null) { Element applicationVersion = application.getChild - ("ApplicationVersion", jsdlNamespace); + ("ApplicationVersion", jsdlNamespace); result.setApplication(applicationName.getText(), applicationVersion.getText()); } @@ -319,7 +318,7 @@ // staging List<Element> dataStagings = jobDescription.getChildren - ("DataStaging", jsdlNamespace); + ("DataStaging", jsdlNamespace); for (Element dataStaging : dataStagings) { Attribute type = dataStaging.getAttribute("type", disworkNamespace); @@ -339,13 +338,17 @@ result.addOutput(fileName.getText()); } } + } catch (MalformedURLException e) { + log.error("malformed URL", e); + throw new BadJobException("malformed URL", e); + } catch (IOException e) { + log.error("can't read malformed JSDL file", e); + throw new BadJobException("can't read malformed JSDL file", e); } catch (JDOMException e) { log.error("can't read malformed JSDL file", e); - throw new BadJobException("can't read malformed JSDL file", e); - } catch (MalformedURLException e) { - log.error("malformed URL", e); - throw new BadJobException("malformed URL", e); - } + throw new BadJobException("can't read malformed JSDL file", e); + } + return result; } Modified: trunk/diswork-fs/pom.xml =================================================================== --- trunk/diswork-fs/pom.xml 2010-10-29 08:30:07 UTC (rev 133) +++ trunk/diswork-fs/pom.xml 2010-10-29 11:52:51 UTC (rev 134) @@ -20,6 +20,7 @@ <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> + <scope>test</scope> </dependency> <dependency> <groupId>commons-io</groupId> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-10-29 08:30:07 UTC (rev 133) +++ trunk/pom.xml 2010-10-29 11:52:51 UTC (rev 134) @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -23,7 +25,7 @@ <dependencyManagement> <dependencies> - <dependency> + <!--dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> @@ -34,7 +36,7 @@ <artifactId>log4j</artifactId> <version>1.2.16</version> <scope>test</scope> - </dependency> + </dependency--> <!-- <dependency> <groupId>jgroups</groupId> @@ -43,7 +45,7 @@ <scope>compile</scope> </dependency> --> - <dependency> + <!--dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>1.4</version> @@ -52,7 +54,7 @@ <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.5</version> - </dependency> + </dependency--> <dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-utils</artifactId> @@ -95,16 +97,25 @@ <artifactId>jetty</artifactId> <version>6.1.9</version> </dependency> + <dependency> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jsp-2.1-jetty</artifactId> + <version>6.1.24</version> + </dependency> + <dependency> + <groupId>jdom</groupId> + <artifactId>jdom</artifactId> + <version>1.1</version> + </dependency> - <!-- test --> - <dependency> + <!--dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> - </dependency> + </dependency--> </dependencies> </dependencyManagement> <!-- ************************************************************* --> @@ -193,7 +204,7 @@ <dependency> <groupId>org.nuiton.jrst</groupId> <artifactId>doxia-module-jrst</artifactId> - <version>${jrst.version}</version> + <version>${jrstPluginVersion}</version> </dependency> </dependencies> </plugin> @@ -208,7 +219,9 @@ <!-- Source control management. --> <scm> <connection>scm:svn:http://svn.nuiton.org/svn/diswork/trunk</connection> - <developerConnection>scm:svn:http://svn.nuiton.org/svn/diswork/trunk</developerConnection> + <developerConnection> + scm:svn:http://svn.nuiton.org/svn/diswork/trunk + </developerConnection> <url>http://www.nuiton.org/repositories/browse/diswork/trunk</url> </scm>