eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.22k stars 868 forks source link

how to solve Dependency 'com.github.eirslett:frontend-maven-plugin:1.12.0' not found #975

Open Heisenberg0712 opened 3 years ago

Heisenberg0712 commented 3 years ago

I am trying to integrate react frontend and my spring backend. I saw some tutorial for the same but getting this dependency error. " Dependency 'com.github.eirslett:frontend-maven-plugin:1.12.0' not found " This is my pom.xml file <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.5.0</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>Portfoilio</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Portfoilio</name>
<description>Demo project for Spring Boot</description>
<properties>
    <java.version>11</java.version>

</properties>
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.github.eirslett/frontend-maven-plugin -->
    <dependency>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>1.12.0</version>
    </dependency>

</dependencies>

<build>
    <plugins>

        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                    </exclude>
                </excludes>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>frontend-plugins</artifactId>
            <groupId>com.github.eirslett</groupId>
            <version>1.12.0</version>

            <configuration>
                <workingDirectory>01-starting-setup</workingDirectory>
                <installDirectory>target</installDirectory>
            </configuration>
            <executions>
                <execution>
                    <id>install node and npm</id>
                    <goals>
                        <goal>install-node-and-npm</goal>
                    </goals>
                    <configuration>
                        <nodeVersion>v14.16.0</nodeVersion>
                        <npmVersion>6.14.11</npmVersion>
                    </configuration>
                </execution>
                <execution>
                    <id>npm install</id>
                    <goals>
                        <goal>npm</goal>
                    </goals>
                    <configuration>
                        <arguments>install</arguments>
                    </configuration>
                </execution>
                <execution>
                    <id>npm run build</id>
                    <goals>
                        <goal>npm</goal>
                    </goals>
                    <configuration>
                        <arguments>run build</arguments>
                    </configuration>
                </execution>
            </executions>
        </plugin>

    </plugins>
</build>

eirslett commented 3 years ago

Your network connection was probably bad. Try deleting your .m2 folder and then try again?

spaghett1c0de commented 3 years ago

@eirslett I have the same issue. I have no problem with 1.11.3. I tried invalidating cache in IntelliJ and deleted .m2 folder. It still did not work for me 🤔

ghost commented 2 years ago

same issue with all versions of this plugin using intellij idea ultimate

ghost commented 2 years ago

I fixed this by hitting Ctrl + shift + a, then typing in reload and doing the reload all maven projects. This fixed it for me