Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/j2ee.weblogic9/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

javac.source=1.8
javac.source=11
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please switch to javac.release. plus: The NB project can use 21 now, assuming tests pass.

feel free to edit the commit and force push

spec.version.base=1.45.0

test.config.stableBTD.includes=**/*Test.class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ public class WLDeploymentFactory implements DeploymentFactory {

public static final Version VERSION_1221 = Version.fromJsr277NotationWithFallback("12.2.1"); // NOI18N

public static final Version VERSION_1411 = Version.fromJsr277NotationWithFallback("14.1.1"); // NOI18N

public static final Version VERSION_1511 = Version.fromJsr277NotationWithFallback("15.1.1"); // NOI18N

private static final Logger LOGGER = Logger.getLogger(WLDeploymentFactory.class.getName());

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public class BaseDescriptorModel {
protected static final Version VERSION_12_1_1 = Version.fromJsr277NotationWithFallback("12.1.1"); // NOI18N

protected static final Version VERSION_12_2_1 = Version.fromJsr277NotationWithFallback("12.2.1"); // NOI18N

protected static final Version VERSION_14_1_1 = Version.fromJsr277NotationWithFallback("14.1.1"); // NOI18N

private final CommonDDBean bean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ public void run() {
ActionType.EXECUTE, CommandType.DISTRIBUTE, StateType.RUNNING,
NbBundle.getMessage(WLDriverDeployer.class, "MSG_DeployingJDBCDrivers", toJar.getPath())));
try (BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(toJar))) {
is.transferTo(os);
byte[] buf = new byte[4096];
int n;
while ((n = is.read(buf)) != -1) {
os.write(buf, 0, n);
}
Comment on lines -117 to +121
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unclear why this was changed. This does not appear to require jdk 8 target.

}
}
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,11 @@ private void createContributionsJar(File jarFile, String classpath) throws IOExc
private void copy(File source, File dest) throws IOException {
try (InputStream is = new BufferedInputStream(new FileInputStream(source));
OutputStream os = new BufferedOutputStream(new FileOutputStream(dest))) {
is.transferTo(os);
byte[] buf = new byte[4096];
int n;
while ((n = is.read(buf)) != -1) {
os.write(buf, 0, n);
}
Comment on lines -400 to +404
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert too

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ public class WLJ2eePlatformFactory extends J2eePlatformFactory {

private static final Version JDK8_SUPPORTED_SERVER_VERSION = Version.fromJsr277NotationWithFallback("12.1.3"); // NOI18N

private static final Version JDK11_SUPPORTED_SERVER_VERSION = Version.fromJsr277NotationWithFallback("14.1.1"); // NOI18N

private static final Version JDK17_SUPPORTED_SERVER_VERSION = Version.fromJsr277NotationWithFallback("15.1.1"); // NOI18N

private static final Version JPA2_SUPPORTED_SERVER_VERSION = Version.fromJsr277NotationWithFallback("12.1.1"); // NOI18N

private static final Version JPA21_SUPPORTED_SERVER_VERSION = Version.fromJsr277NotationWithFallback("12.1.3"); // NOI18N
Expand Down Expand Up @@ -529,6 +533,22 @@ public J2eePlatformImplImpl(WLDeploymentManager dm) {
profiles.add(Profile.JAVA_EE_7_FULL);
profiles.add(Profile.JAVA_EE_7_WEB);
}
if (version.isAboveOrEqual(WLDeploymentFactory.VERSION_1411)) {
profiles.add(Profile.JAVA_EE_8_FULL);
profiles.add(Profile.JAVA_EE_8_WEB);
profiles.add(Profile.JAKARTA_EE_8_FULL);
profiles.add(Profile.JAKARTA_EE_8_WEB);
}
if (version.isAboveOrEqual(WLDeploymentFactory.VERSION_1511)) {
profiles.add(Profile.JAKARTA_EE_9_FULL);
profiles.add(Profile.JAKARTA_EE_9_WEB);
profiles.add(Profile.JAKARTA_EE_9_1_FULL);
profiles.add(Profile.JAKARTA_EE_9_1_WEB);
profiles.add(Profile.JAKARTA_EE_10_FULL);
profiles.add(Profile.JAKARTA_EE_10_WEB);
profiles.add(Profile.JAKARTA_EE_11_FULL);
profiles.add(Profile.JAKARTA_EE_11_WEB);
}
}

domainChangeListener = new DomainChangeListener(this);
Expand Down Expand Up @@ -621,6 +641,12 @@ public Set<Type> getSupportedTypes() {
if (serverVersion.isAboveOrEqual(JDK8_SUPPORTED_SERVER_VERSION)) {
versions.add("1.8"); // NOI18N
}
if (serverVersion.isAboveOrEqual(JDK11_SUPPORTED_SERVER_VERSION)) {
versions.add("11"); // NOI18N
}
if (serverVersion.isAboveOrEqual(JDK17_SUPPORTED_SERVER_VERSION)) {
versions.add("17"); // NOI18N
}
}
return versions;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,10 @@ public static boolean isSupportedLayout(File candidate){
}

/**
* Checks whether the server root contains weblogic.jar of version 9, 10 or 11.
* Checks whether the server root contains weblogic.jar of version 9 or above.
*/
public static boolean isSupportedVersion(Version version) {
return version != null && (Integer.valueOf(9).equals(version.getMajor())
|| Integer.valueOf(10).equals(version.getMajor())
|| Integer.valueOf(11).equals(version.getMajor())
|| Integer.valueOf(12).equals(version.getMajor()));
return version != null && version.isAboveOrEqual(Version.fromDottedNotationWithFallback("9.0.0.0"));
}

@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public void testIsSupportedVersion() throws Exception {
assertTrue(WebLogicLayout.isSupportedVersion(WebLogicLayout.getServerVersion(baseFolder)));
createJar(file, "Implementation-Version: 8.0.0.0");
assertFalse(WebLogicLayout.isSupportedVersion(WebLogicLayout.getServerVersion(baseFolder)));
createJar(file, "Implementation-Version: 14.1.1.0");
assertTrue(WebLogicLayout.isSupportedVersion(WebLogicLayout.getServerVersion(baseFolder)));
createJar(file, "Implementation-Version: 15.0.0.0");
assertTrue(WebLogicLayout.isSupportedVersion(WebLogicLayout.getServerVersion(baseFolder)));
createJar(file, "Missing-Implementation-Version: 10.0.0.0");
assertFalse(WebLogicLayout.isSupportedVersion(WebLogicLayout.getServerVersion(baseFolder)));
}
Expand Down