Changeset 07fbac9b5b453c0bcbce8ab4722a04c3afa56b78
- Timestamp:
- 08/18/07 15:52:10
(1 year ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1187445130 +0200
- git-parent:
[cb92c060511c66472e9f839dfa6879afa914f0dc]
- git-author:
- Christopher Jung <bktheg@web.de> 1187445130 +0200
- Message:
install-check: Bestehende Tests gefixt sowie zwei neue Tests ergaenzt
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r70d49ee |
r07fbac9 |
|
| 29 | 29 | import net.driftingsouls.ds2.server.install.checks.ConfigXmlValidXmlCheck; |
|---|
| 30 | 30 | import net.driftingsouls.ds2.server.install.checks.DatabaseConnectionCheck; |
|---|
| | 31 | import net.driftingsouls.ds2.server.install.checks.LoxPathCheck; |
|---|
| | 32 | import net.driftingsouls.ds2.server.install.checks.WebXmlConfigDirCheck; |
|---|
| 31 | 33 | import net.driftingsouls.ds2.server.install.checks.WebXmlExistsCheck; |
|---|
| 32 | 34 | import net.driftingsouls.ds2.server.install.checks.WebXmlValidXmlCheck; |
|---|
| … | … | |
| 45 | 47 | checks.add(new WebXmlExistsCheck()); |
|---|
| 46 | 48 | checks.add(new WebXmlValidXmlCheck()); |
|---|
| | 49 | checks.add(new WebXmlConfigDirCheck()); |
|---|
| 47 | 50 | checks.add(new ConfigXmlValidCheck()); |
|---|
| 48 | 51 | |
|---|
| … | … | |
| 50 | 53 | checks.add(new DatabaseConnectionCheck()); |
|---|
| 51 | 54 | checks.add(new AbsolutePathCheck()); |
|---|
| | 55 | checks.add(new LoxPathCheck()); |
|---|
| 52 | 56 | } |
|---|
| 53 | 57 | |
|---|
| r70d49ee |
r07fbac9 |
|
| 50 | 50 | |
|---|
| 51 | 51 | public String getDescription() { |
|---|
| 52 | | return "config:ABSOLUTE_PATH pruefen"; |
|---|
| | 52 | return "config.xml:ABSOLUTE_PATH pruefen"; |
|---|
| 53 | 53 | } |
|---|
| 54 | 54 | |
|---|
| r70d49ee |
r07fbac9 |
|
| 18 | 18 | */ |
|---|
| 19 | 19 | package net.driftingsouls.ds2.server.install.checks; |
|---|
| 20 | | |
|---|
| 21 | | import java.io.File; |
|---|
| 22 | 20 | |
|---|
| 23 | 21 | import net.driftingsouls.ds2.server.framework.Configuration; |
|---|
| r70d49ee |
r07fbac9 |
|
| 32 | 32 | |
|---|
| 33 | 33 | public void doCheck() throws CheckFailedException { |
|---|
| 34 | | try { |
|---|
| 35 | | DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); |
|---|
| 36 | | builder.parse(new File("WEB-INF/web.xml")); |
|---|
| 37 | | } |
|---|
| 38 | | catch( Exception e ) { |
|---|
| 39 | | throw new CheckFailedException("WEB-INF/web.xml ist kein xml", e); |
|---|
| | 34 | if( !new File("WEB-INF/web.xml").isFile() ) { |
|---|
| | 35 | throw new CheckFailedException("WEB-INF/web.xml nicht gefunden"); |
|---|
| 40 | 36 | } |
|---|
| 41 | 37 | } |
|---|
| 42 | 38 | |
|---|
| 43 | 39 | public String getDescription() { |
|---|
| 44 | | return "web.xml XML pruefen"; |
|---|
| | 40 | return "web.xml existiert"; |
|---|
| 45 | 41 | } |
|---|
| 46 | | |
|---|
| 47 | 42 | } |
|---|
| r70d49ee |
r07fbac9 |
|
| 34 | 34 | try { |
|---|
| 35 | 35 | DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); |
|---|
| 36 | | builder.parse(new File("WEB-INF/cfg/config.xml")); |
|---|
| | 36 | builder.parse(new File("WEB-INF/web.xml")); |
|---|
| 37 | 37 | } |
|---|
| 38 | 38 | catch( Exception e ) { |
|---|
| 39 | | throw new CheckFailedException("WEB-INF/cfg/config.xml ist kein xml", e); |
|---|
| | 39 | throw new CheckFailedException("WEB-INF/web.xml ist kein xml", e); |
|---|
| 40 | 40 | } |
|---|
| 41 | 41 | } |
|---|
| 42 | 42 | |
|---|
| 43 | 43 | public String getDescription() { |
|---|
| 44 | | return "config.xml XML pruefen"; |
|---|
| | 44 | return "web.xml XML pruefen"; |
|---|
| 45 | 45 | } |
|---|
| 46 | 46 | |
|---|