Source Code Cross Referenced for InstallationDependency.java in  » Portal » Pluto » org » apache » pluto » maven » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Pluto » org.apache.pluto.maven 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.pluto.maven;
018:
019:        import java.io.IOException;
020:        import java.util.ArrayList;
021:        import java.util.Collection;
022:        import java.util.Collections;
023:        import java.util.List;
024:        import java.util.Properties;
025:
026:        /**
027:         *
028:         */
029:        class InstallationDependency {
030:
031:            private static final Properties VERSION_PROPERTIES = new Properties();
032:            private static final String PROPERTIES_FILE = "/versions.properties";
033:            static {
034:                try {
035:                    VERSION_PROPERTIES.load(InstallationDependency.class
036:                            .getResourceAsStream(PROPERTIES_FILE));
037:                } catch (IOException e) {
038:                    throw new RuntimeException("Cannot load " + PROPERTIES_FILE
039:                            + " from the classpath!", e);
040:                }
041:            }
042:
043:            public static final InstallationDependency PORTLET_API = new InstallationDependency(
044:                    "javax.portlet", "portlet-api", VERSION_PROPERTIES
045:                            .getProperty("portlet-api.version"));
046:
047:            public static final InstallationDependency DESCRIPTOR_API = new InstallationDependency(
048:                    "org.apache.pluto", "pluto-descriptor-api",
049:                    VERSION_PROPERTIES.getProperty("pluto.version"));
050:
051:            public static final InstallationDependency DESCRIPTOR_IMPL = new InstallationDependency(
052:                    "org.apache.pluto", "pluto-descriptor-impl",
053:                    VERSION_PROPERTIES.getProperty("pluto.version"));
054:
055:            public static final InstallationDependency CONTAINER = new InstallationDependency(
056:                    "org.apache.pluto", "pluto-container", VERSION_PROPERTIES
057:                            .getProperty("pluto.version"));
058:
059:            public static final InstallationDependency TAGLIB = new InstallationDependency(
060:                    "org.apache.pluto", "pluto-taglib", VERSION_PROPERTIES
061:                            .getProperty("pluto.version"));
062:
063:            public static final InstallationDependency PORTAL = new InstallationDependency(
064:                    "org.apache.pluto", "pluto-portal", VERSION_PROPERTIES
065:                            .getProperty("pluto.version"), "war");
066:
067:            public static final InstallationDependency TESTSUITE = new InstallationDependency(
068:                    "org.apache.pluto", "pluto-testsuite", VERSION_PROPERTIES
069:                            .getProperty("pluto.version"), "war");
070:
071:            public static final InstallationDependency CASTOR = new InstallationDependency(
072:                    "org.codehaus.castor", "castor", VERSION_PROPERTIES
073:                            .getProperty("castor.version"));
074:
075:            public static final InstallationDependency COMMONS_LOGGING_API = new InstallationDependency(
076:                    "commons-logging", "commons-logging-api",
077:                    VERSION_PROPERTIES.getProperty("commons-logging.version"));
078:
079:            public static final InstallationDependency XERCES = new InstallationDependency(
080:                    "xerces", "xercesImpl", VERSION_PROPERTIES
081:                            .getProperty("xercesImpl.version"));
082:
083:            public static final InstallationDependency XML_PARSER_APIS = new InstallationDependency(
084:                    "xerces", "xmlParserAPIs", VERSION_PROPERTIES
085:                            .getProperty("xmlParserAPIs.version"));
086:
087:            private static final List ENDORSED = new ArrayList();
088:            private static final List SHARED = new ArrayList();
089:
090:            static {
091:                ENDORSED.add(XERCES);
092:                ENDORSED.add(XML_PARSER_APIS);
093:
094:                SHARED.add(PORTLET_API);
095:                SHARED.add(DESCRIPTOR_API);
096:                SHARED.add(DESCRIPTOR_IMPL);
097:                SHARED.add(CONTAINER);
098:                SHARED.add(TAGLIB);
099:                SHARED.add(CASTOR);
100:                SHARED.add(COMMONS_LOGGING_API);
101:            }
102:
103:            public static Collection getEndorsedDependencies() {
104:                return Collections.unmodifiableCollection(ENDORSED);
105:            }
106:
107:            public static Collection getSharedDependencies() {
108:                return Collections.unmodifiableCollection(SHARED);
109:            }
110:
111:            private String groupId;
112:            private String artifactId;
113:            private String version;
114:            private String type;
115:
116:            public InstallationDependency(String groupId, String artifactId,
117:                    String version) {
118:                this (groupId, artifactId, version, "jar");
119:            }
120:
121:            public InstallationDependency(String groupId, String artifactId,
122:                    String version, String type) {
123:                if (version == null || version.trim().equalsIgnoreCase("")) {
124:                    throw new RuntimeException(
125:                            "Missing or invalid property for artifact "
126:                                    + artifactId + " in " + PROPERTIES_FILE
127:                                    + "!");
128:                }
129:
130:                this .groupId = groupId;
131:                this .artifactId = artifactId;
132:                this .version = version;
133:                this .type = type;
134:            }
135:
136:            public String getGroupId() {
137:                return groupId;
138:            }
139:
140:            public void setGroupId(String groupId) {
141:                this .groupId = groupId;
142:            }
143:
144:            public String getArtifactId() {
145:                return artifactId;
146:            }
147:
148:            public void setArtifactId(String artifactId) {
149:                this .artifactId = artifactId;
150:            }
151:
152:            public String getVersion() {
153:                return version;
154:            }
155:
156:            public void setVersion(String version) {
157:                this .version = version;
158:            }
159:
160:            public String getType() {
161:                return type;
162:            }
163:
164:            public void setType(String type) {
165:                this.type = type;
166:            }
167:
168:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.