forked from eclipse-tycho/tycho
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TargetDefinition.java
184 lines (138 loc) · 4.63 KB
/
TargetDefinition.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/*******************************************************************************
* Copyright (c) 2011, 2021 SAP AG and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* SAP AG - initial API and implementation
* Christoph Läubrich - [Bug 538144] - support other target locations (Directory, Feature, Installations)
* [Bug 568729] - Support new "Maven" Target location
* [Bug 569481] - Support for maven target location includeSource="true" attribute
* [Issue 189] - Support multiple maven-dependencies for one target location
*******************************************************************************/
package org.eclipse.tycho.p2.target.facade;
import java.net.URI;
import java.util.Collection;
import java.util.List;
import java.util.Properties;
// TODO javadoc
public interface TargetDefinition {
public List<? extends Location> getLocations();
/**
* Returns <code>true</code> if the target definition specifies an explicit list of bundles to
* include (i.e. an <tt><includeBundles></tt> in target definition files).
*/
boolean hasIncludedBundles();
/**
* Returns the origin of the target definition, e.g. a file path. Used for debugging only.
*/
String getOrigin();
/**
* Returns the value of the targetJRE in *.target file if it's a known EE name.
* <code>null</code> will be returned otherwise.
*/
String getTargetEE();
@Override
public boolean equals(Object obj);
@Override
public int hashCode();
public interface Location {
/**
* Returns a description of the underlying location implementation.
*/
String getTypeDescription();
}
public interface InstallableUnitLocation extends Location {
public List<? extends Repository> getRepositories();
public List<? extends Unit> getUnits();
public IncludeMode getIncludeMode();
public boolean includeAllEnvironments();
public boolean includeSource();
}
public interface MavenGAVLocation extends Location {
enum MissingManifestStrategy {
IGNORE, ERROR, GENERATE;
}
String getIncludeDependencyScope();
MissingManifestStrategy getMissingManifestStrategy();
Collection<BNDInstructions> getInstructions();
Collection<MavenDependency> getRoots();
boolean includeSource();
}
/**
* Represents the "Directory" location that either contains bundles directly or has
* plugins/features/binaries folders that contains the data
*
* @author Christoph Läubrich
*
*/
public interface DirectoryLocation extends PathLocation {
}
/**
* Represents the "Profile" location that contains an eclipse-sdk or exploded eclipse product
*
* @author Christoph Läubrich
*
*/
public interface ProfileLocation extends PathLocation {
}
/**
* represents the "Feature" location that contains a feature to include from a given
* installation
*
* @author Christoph Läubrich
*
*/
public interface FeaturesLocation extends PathLocation {
/**
*
* @return the id of the feature to use
*/
String getId();
/**
*
* @return the version of the feature to use
*/
String getVersion();
}
/**
* Base interface for all Locations that are path based, the path might contains variables that
* need to be resolved before used as a real directory path
*
* @author Christoph Läubrich
*
*/
public interface PathLocation extends Location {
/**
*
* @return the plain path as supplied by the target file
*/
public String getPath();
}
public enum IncludeMode {
SLICER, PLANNER
}
public interface Repository {
URI getLocation();
String getId();
}
public interface Unit {
public String getId();
public String getVersion();
}
public interface BNDInstructions {
public String getReference();
public Properties getInstructions();
}
public interface MavenDependency {
String getGroupId();
String getArtifactId();
String getVersion();
String getArtifactType();
String getClassifier();
}
}