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
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ protected void executeInternal()
throws MojoExecutionException, MojoFailureException {
long start = System.nanoTime();

if (!BuildFrontendUtil.getTokenFile(this).exists()) {
// if not prepare-frontend token file exists propagate build info
// to token file
File tokenFile = BuildFrontendUtil.propagateBuildInfo(this);
}

Options options = new Options(null, getClassFinder(), npmFolder())
.withFrontendDirectory(frontendDirectory())
.withFrontendGeneratedFolder(generatedTsFolder());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public void setup() throws Exception {
"flow_resources");

defaultJavaSource = new File(".", "src/test/java");
File defaultJavaResource = new File(".", "src/test/resources");
openApiJsonFile = new File(npmFolder,
"target/classes/com/vaadin/hilla/openapi.json");
generatedTsFolder = new File(npmFolder, "src/main/frontend/generated");
Expand Down Expand Up @@ -185,6 +186,8 @@ public void setup() throws Exception {
"src/main/resources/application.properties"));
ReflectionUtils.setVariableValueInObject(mojo, "javaSourceFolder",
defaultJavaSource);
ReflectionUtils.setVariableValueInObject(mojo, "javaResourceFolder",
defaultJavaResource);
ReflectionUtils.setVariableValueInObject(mojo, "generatedTsFolder",
generatedTsFolder);
ReflectionUtils.setVariableValueInObject(mojo, "nodeVersion",
Expand Down Expand Up @@ -671,11 +674,11 @@ public void commercialComponent_noLicenseKey_commercialBannerNotEnabled_buildFai
}

@Test
public void noTokenFile_noTokenFileShouldBeCreated()
public void noTokenFile_tokenFileShouldBeCreated()
throws MojoExecutionException, MojoFailureException {
mojo.execute();

Assert.assertFalse(tokenFile.exists());
Assert.assertTrue(tokenFile.exists());
}

@Test
Expand Down
Loading