Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How set variable version_app from pom.xml? #1137

Open
jarekpc opened this issue Mar 11, 2024 · 0 comments
Open

How set variable version_app from pom.xml? #1137

jarekpc opened this issue Mar 11, 2024 · 0 comments

Comments

@jarekpc
Copy link

jarekpc commented Mar 11, 2024

Yes

Do you want to request a feature or report a bug?

What is the current behavior?
How set variable version_app and build timestamp in frontend app
export const environment = {
production: false,
version_app: '%VERSION%',
build_date: '%BUILD_TIMESTAMP%',
};
from pom.xml (e.g ${project.version} and ${maven.build.timestamp}) using https://github.com/eirslett/frontend-maven-plugin (in old application12 using plugin) and replace variable from pom to angular app
<plugin> <groupId>com.google.code.maven-replacer-plugin</groupId> <artifactId>replacer</artifactId> <version>1.5.3</version> <executions> <execution> <phase>prepare-package</phase> <goals> <goal>replace</goal> </goals> </execution> </executions> <configuration> <filesToInclude>${basedir}/src/main/angular/dist/main-*.js</filesToInclude> <replacements> <replacement> <token>%VERSION%</token> <value>${project.version}</value> </replacement> <replacement> <token>%BUILD_TIMESTAMP%</token> <value>${maven.build.timestamp}</value> </replacement> </replacements> </configuration> </plugin>

 and this worked 
  but when update application to angular 16 i don't see main file with variable version_app and build timestamp.
  How resolve this problem?

If the current behavior is a bug, please provide the steps to reproduce.
mvn clean package

What is the expected behavior?
I want to repleace version_app and build timestamp in angular application from java application(pom.xml)

Please mention your frontend-maven-plugin and operating system version.
Java 17, spring boot 2.7.8, angular 16, windows 10

@jarekpc jarekpc changed the title set variable version_app in from pom.xml? How set variable version_app from pom.xml? Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant