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

Method buildPath not found in jsp #1139

Open
teger opened this issue Mar 20, 2024 · 4 comments
Open

Method buildPath not found in jsp #1139

teger opened this issue Mar 20, 2024 · 4 comments

Comments

@teger
Copy link

teger commented Mar 20, 2024

Hi,

I execute the frontend-maven-plugin on my project.
All is ok and in war, webpack compress all js and css in a separate file.

In my jsp, i have two lignes for js and css

<link rel="stylesheet" href="<%= buildPath(request,"/login.ff4f395c481812f74580.bundle.css")%>" /></head>

<script type="text/javascript" src="<%= buildPath(request,"/login.a80b653a8878d6305920.bundle.js")%>" charset="utf-8"></script>

But in these lines, i have a method buildPath
But this method not found anywhere

Can you help me to import the good classe for this method ?

Thanks by advance

Best regards

@teger teger changed the title Method buildPath not fount in jsp Method buildPath not found in jsp Mar 20, 2024
@eirslett
Copy link
Owner

That buildPath thing is not related to the frontend-maven-plugin, it must be something specific for your application!

Just remove it. Do something like this instead:

<link rel="stylesheet" href="/login.ff4f395c481812f74580.bundle.css" />

and

<script type="text/javascript" src="/login.a80b653a8878d6305920.bundle.js" charset="utf-8"></script>

@teger
Copy link
Author

teger commented Mar 21, 2024

Hi,

Ok but i have no lines link or script in my JSP.
It's the front end maven plugin which generates these 2 lines with this method

" /> <script type="text/javascript" src="<%= buildPath(request,"/login.a80b653a8878d6305920.bundle.js")%>" charset="utf-8"></script>

Why would my application generate this buildPath method?
Is this a configuration in my pom.xml to add somewhere?

Thanks for your help

Best regards

@teger
Copy link
Author

teger commented Mar 21, 2024

It is my pom.xml

com.github.eirslett frontend-maven-plugin 1.15.0 v21.6.1 ${project.build.directory} install node and npm install-node-and-npm generate-resources npm install npm generate-resources install https://nexus.nouveauxterritoires.fr/repository/npm-group/
				<execution>
					<id>npm-test</id>
					<goals>
						<goal>npm</goal>
					</goals>
					<phase>test</phase>
					<configuration>
						<arguments>test</arguments>
					</configuration>
				</execution>

				<execution>
					<id>webpack-build</id>
					<goals><goal>npm</goal></goals>
					<phase>compile</phase>
					<configuration>
						<arguments>run build-dev</arguments>
					</configuration>
				</execution>
			</executions>
		</plugin>

@eirslett
Copy link
Owner

If you look at the source code for this plugin, and do a code search:

https://github.com/search?q=repo%3Aeirslett%2Ffrontend-maven-plugin%20buildPath&type=code

You will see that there is not a single mention of anything called buildPath in frontend-maven-plugin. Nothing.

Probably somebody else, who worked on your application, wrote the buildPath stuff.

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

2 participants