1 | |
package org.apache.maven.plugin.eclipse; |
2 | |
|
3 | |
import java.io.File; |
4 | |
import java.net.URL; |
5 | |
|
6 | |
import org.apache.maven.artifact.repository.ArtifactRepository; |
7 | |
import org.apache.maven.plugin.ide.IdeDependency; |
8 | |
|
9 | 2 | public class WorkspaceConfiguration |
10 | |
{ |
11 | |
private File workspaceDirectory; |
12 | |
|
13 | |
private URL codeStylesURL; |
14 | |
|
15 | |
private String activeCodeStyleProfileName; |
16 | |
|
17 | |
private ArtifactRepository localRepository; |
18 | |
|
19 | |
private String defaultClasspathContainer; |
20 | |
|
21 | |
private IdeDependency[] workspaceArtefacts; |
22 | |
|
23 | |
private String defaultDeployServerId; |
24 | |
|
25 | |
private String defaultDeployServerName; |
26 | |
|
27 | |
public File getWorkspaceDirectory() |
28 | |
{ |
29 | 4 | return this.workspaceDirectory; |
30 | |
} |
31 | |
|
32 | |
public void setWorkspaceDirectory( File dir ) |
33 | |
{ |
34 | 2 | this.workspaceDirectory = dir; |
35 | 2 | } |
36 | |
|
37 | |
public URL getCodeStylesURL() |
38 | |
{ |
39 | 0 | return this.codeStylesURL; |
40 | |
} |
41 | |
|
42 | |
public void setCodeStylesURL( URL url ) |
43 | |
{ |
44 | 0 | this.codeStylesURL = url; |
45 | 0 | } |
46 | |
|
47 | |
public String getActiveStyleProfileName() |
48 | |
{ |
49 | 0 | return this.activeCodeStyleProfileName; |
50 | |
} |
51 | |
|
52 | |
public void setActiveStyleProfileName( String name ) |
53 | |
{ |
54 | 0 | this.activeCodeStyleProfileName = name; |
55 | 0 | } |
56 | |
|
57 | |
public ArtifactRepository getLocalRepository() |
58 | |
{ |
59 | 0 | return localRepository; |
60 | |
} |
61 | |
|
62 | |
public void setLocalRepository( ArtifactRepository localRepository ) |
63 | |
{ |
64 | 0 | this.localRepository = localRepository; |
65 | 0 | } |
66 | |
|
67 | |
public String getDefaultClasspathContainer() |
68 | |
{ |
69 | 0 | return defaultClasspathContainer; |
70 | |
} |
71 | |
|
72 | |
public void setDefaultClasspathContainer( String defaultClasspathContainer ) |
73 | |
{ |
74 | 0 | this.defaultClasspathContainer = defaultClasspathContainer; |
75 | 0 | } |
76 | |
|
77 | |
public IdeDependency[] getWorkspaceArtefacts() |
78 | |
{ |
79 | 0 | return workspaceArtefacts; |
80 | |
} |
81 | |
|
82 | |
public void setWorkspaceArtefacts( IdeDependency[] workspaceArtefacts ) |
83 | |
{ |
84 | 0 | this.workspaceArtefacts = workspaceArtefacts; |
85 | 0 | } |
86 | |
|
87 | |
public String getDefaultDeployServerId() |
88 | |
{ |
89 | 0 | return defaultDeployServerId; |
90 | |
} |
91 | |
|
92 | |
public void setDefaultDeployServerId( String defaultDeployServerId ) |
93 | |
{ |
94 | 0 | this.defaultDeployServerId = defaultDeployServerId; |
95 | 0 | } |
96 | |
|
97 | |
public String getDefaultDeployServerName() |
98 | |
{ |
99 | 0 | return defaultDeployServerName; |
100 | |
} |
101 | |
|
102 | |
public void setDefaultDeployServerName( String defaultDeployServerName ) |
103 | |
{ |
104 | 0 | this.defaultDeployServerName = defaultDeployServerName; |
105 | 0 | } |
106 | |
|
107 | |
|
108 | |
|
109 | |
|
110 | |
public String getWebsphereVersion() |
111 | |
{ |
112 | 0 | if ( getDefaultDeployServerId() != null && getDefaultDeployServerId().startsWith( "was." ) ) |
113 | |
{ |
114 | 0 | if ( getDefaultDeployServerId().indexOf( "v61" ) >= 0 ) |
115 | |
{ |
116 | 0 | return "6.1"; |
117 | |
} |
118 | 0 | if ( getDefaultDeployServerId().indexOf( "v6" ) >= 0 ) |
119 | |
{ |
120 | 0 | return "6.0"; |
121 | |
} |
122 | 0 | if ( getDefaultDeployServerId().indexOf( "v51" ) >= 0 ) |
123 | |
{ |
124 | 0 | return "5.1"; |
125 | |
} |
126 | 0 | if ( getDefaultDeployServerId().indexOf( "v5" ) >= 0 ) |
127 | |
{ |
128 | 0 | return "5.0"; |
129 | |
} |
130 | |
} |
131 | 0 | return null; |
132 | |
} |
133 | |
|
134 | |
} |