Compare commits

..

No commits in common. "97c6ba870d51c276681240fb399dc9c22dc750c7" and "08b663fc4a4790e63c7613be0e2adfb781498f06" have entirely different histories.

14 changed files with 25 additions and 66 deletions

View file

@ -1,6 +1,6 @@
<component name="CopyrightManager"> <component name="CopyrightManager">
<copyright> <copyright>
<option name="notice" value="Copyright 2023-Copyright &amp;#36;today.yearamp;#36;today.year the original author or authors.&#10; &#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10;&#10; https://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License." /> <option name="notice" value="Copyright &amp;#36;today.year the original author or authors.&#10; &#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10;&#10; https://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License." />
<option name="myName" value="Apache License" /> <option name="myName" value="Apache License" />
</copyright> </copyright>
</component> </component>

View file

@ -2,12 +2,12 @@
<library name="bld"> <library name="bld">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-1.8.0-SNAPSHOT.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-1.8.0-SNAPSHOT.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
</SOURCES> </SOURCES>
<excluded> <excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -31,7 +31,7 @@ To create a [Spring Boot executable Web Archive](https://docs.spring.io/spring-b
(WAR) from the current project: (WAR) from the current project:
```java ```java
@BuildCommand(summary = "Creates an executable WAR for the project") @BuildCommand(summary = "Create an executable WAR for the project")
public void bootwar() throws Exception { public void bootwar() throws Exception {
new BootWarOperation() new BootWarOperation()
.fromProject(this) .fromProject(this)

View file

@ -1,10 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="EntryPointsManager">
<pattern value="com.example.demo.DemoApplicationBuild" method="bootjar" />
<pattern value="com.example.demo.DemoApplicationBuild" method="bootwar" />
<pattern value="com.example.demo.DemoApplicationBuild" />
</component>
<component name="PDMPlugin"> <component name="PDMPlugin">
<option name="customRuleSets"> <option name="customRuleSets">
<list> <list>
@ -13,7 +7,6 @@
<option value="$PROJECT_DIR$/../../bld-checkstyle/config/pmd.xml" /> <option value="$PROJECT_DIR$/../../bld-checkstyle/config/pmd.xml" />
<option value="$PROJECT_DIR$/../../bld-exec/config/pmd.xml" /> <option value="$PROJECT_DIR$/../../bld-exec/config/pmd.xml" />
<option value="$PROJECT_DIR$/../../bld-testng/config/pmd.xml" /> <option value="$PROJECT_DIR$/../../bld-testng/config/pmd.xml" />
<option value="$PROJECT_DIR$/../../bld-pitest/config/pmd.xml" />
</list> </list>
</option> </option>
<option name="skipTestSources" value="false" /> <option name="skipTestSources" value="false" />

View file

@ -4,4 +4,4 @@ bld.extensions=com.uwyn.rife2:bld-spring-boot:0.9.0-SNAPSHOT
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.downloadLocation= bld.downloadLocation=
bld.sourceDirectories= bld.sourceDirectories=
bld.version=1.8.0-SNAPSHOT bld.version=1.7.5

View file

@ -57,7 +57,7 @@ public class DemoApplicationBuild extends WebProject {
.execute(); .execute();
} }
@BuildCommand(summary = "Creates an executable WAR for the project") @BuildCommand(summary = "Create an executable WAR for the project")
public void bootwar() throws Exception { public void bootwar() throws Exception {
new BootWarOperation() new BootWarOperation()
.fromProject(this) .fromProject(this)

View file

@ -4,4 +4,4 @@ bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.4
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_RELEASES bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_RELEASES
bld.downloadLocation= bld.downloadLocation=
bld.sourceDirectories= bld.sourceDirectories=
bld.version=1.8.0-SNAPSHOT bld.version=1.7.5

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2023-2024 the original author or authors. * Copyright 2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -39,14 +39,14 @@ public class SpringBootBuild extends Project {
downloadSources = true; downloadSources = true;
autoDownloadPurge = true; autoDownloadPurge = true;
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS); repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES);
scope(compile) scope(compile)
.include(dependency("com.uwyn.rife2", "bld", version(1, 8, 0, "SNAPSHOT"))); .include(dependency("com.uwyn.rife2", "bld", version(1, 7, 5)));
scope(test) scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)))
.include(dependency("org.assertj", "assertj-core", version(3, 25, 1))); .include(dependency("org.assertj", "assertj-core", version(3, 24, 2)));
javadocOperation() javadocOperation()
.javadocOptions() .javadocOptions()

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2023-2024 the original author or authors. * Copyright 2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2023-2024 the original author or authors. * Copyright 2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -22,7 +22,6 @@ import rife.tools.FileUtils;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
@ -77,23 +76,6 @@ public class BootJarOperation extends AbstractBootOperation<BootJarOperation> {
/** /**
* Configures the operation from a {@link Project}. * Configures the operation from a {@link Project}.
* <p>
* Sets the following:
* <ul>
* <li>The {@link #destinationFileName(String) destination file name} to
* {@link Project#archiveBaseName() archiveBaseName} and {@link Project#version() version}</li>
* <li>The {@link #infLibs(File...) INF libs} to {@link Project#compileClasspathJars() compileClasspathJars}
* and {@link Project#runtimeClasspathJars() runtimeClasspathJars}</li>
* <li>The {@link #launcherClass(String) launcher class} to {@code JarLauncher}</li>
* <li>The {@link #launcherLibs(Collection) launcher libs} to
* {@link Project#standaloneClasspathJars() standaloneClasspathJars}</li>
* <li>The {@link #mainClass(String) main class} to {@link Project#mainClass() mainClass}</li>
* <li>The {@code Manifest-Version}, {@code Main-Class} and {@code Start-Class}
* {@link #manifestAttributes(Collection) manifest attributes}</li>
* <li>The {@link #sourceDirectories(File...) source directories} to
* {@link Project#buildMainDirectory() buildMainDirectory} and
* {@link Project#srcMainResourcesDirectory() srcMainResourcesDirectory}</li>
* </ul>
* *
* @param project the project * @param project the project
* @return this operation instance * @return this operation instance

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2023-2024 the original author or authors. * Copyright 2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2023-2024 the original author or authors. * Copyright 2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2023-2024 the original author or authors. * Copyright 2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -99,24 +99,6 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
/** /**
* Configures the operation from a {@link Project}. * Configures the operation from a {@link Project}.
* <p>
* Sets the following:
* <ul>
* <li>The {@link #destinationFileName(String) destination file name} to
* {@link Project#archiveBaseName() archiveBaseName} and {@link Project#version() version}</li>
* <li>The {@link #infLibs(File...) INF libs} to {@link Project#compileClasspathJars() compileClasspathJars},
* {@link Project#runtimeClasspathJars() runtimeClasspathJars} and
* {@link Project#buildDistDirectory() buildDistDirectory}</li>
* <li>The {@link #launcherClass(String) launcher class} to {@code WarLauncher}</li>
* <li>The {@link #launcherLibs(Collection) launcher libs} to
* {@link Project#standaloneClasspathJars() standaloneClasspathJars}</li>
* <li>The {@link #mainClass(String) main class} to {@link Project#mainClass() mainClass}</li>
* <li>The {@code Manifest-Version}, {@code Main-Class} and {@code Start-Class}
* {@link #manifestAttributes(Collection) manifest attributes}</li>
* <li>The {@link #sourceDirectories(File...) source directories} to
* {@link Project#buildMainDirectory() buildMainDirectory} and
* {@link Project#srcMainResourcesDirectory() srcMainResourcesDirectory}</li>
* </ul>
* *
* @param project the project * @param project the project
* @return this operation instance * @return this operation instance
@ -136,9 +118,11 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
new BootManifestAttribute("Main-Class", launcherClass()), new BootManifestAttribute("Main-Class", launcherClass()),
new BootManifestAttribute("Start-Class", mainClass()) new BootManifestAttribute("Start-Class", mainClass())
)) ))
.providedLibs(project.providedClasspathJars()) // TODO enable when bld 1.7.6 is available
// .providedLibs(project.providedClasspathJars())
.sourceDirectories(project.buildMainDirectory(), project.srcMainResourcesDirectory()); .sourceDirectories(project.buildMainDirectory(), project.srcMainResourcesDirectory());
} }
/** /**
* Provides libraries that will be used for the WAR creation in {@code /WEB-INF/lib-provided}. * Provides libraries that will be used for the WAR creation in {@code /WEB-INF/lib-provided}.
* *

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2023-2024 the original author or authors. * Copyright 2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode; import static org.assertj.core.api.Assertions.assertThatCode;
class BootJarOperationTest { class BootJarOperationTest {
private static final String BLD = "bld-1.8.0-20240107.042858-1.jar"; private static final String BLD = "bld-1.7.5.jar";
private static final String EXAMPLES_LIB_COMPILE = "examples/lib/compile/"; private static final String EXAMPLES_LIB_COMPILE = "examples/lib/compile/";
private static final String EXAMPLES_LIB_RUNTIME = "examples/lib/runtime/"; private static final String EXAMPLES_LIB_RUNTIME = "examples/lib/runtime/";
private static final String EXAMPLES_LIB_STANDALONE = "examples/lib/standalone/"; private static final String EXAMPLES_LIB_STANDALONE = "examples/lib/standalone/";