Sure, here is the translation:
The management platform of Camunda 7 is showing a 404 status for /camunda/api/cockpit/plugin/cockpitPlugins/static/app/plugin.css. After investigation, it might be due to the separation of the JAR and lib during the Maven build process.
Currently, our project directory is as follows:
config/application.yml
lib/
test.jar
Is there any way to ensure that the external lib can be accessed normally?
Feel free to ask if you need further assistance!
maven:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.example.test_demo.TestDemoApplication</mainClass>
</manifest>
<manifestEntries>
<Class-Path>config/</Class-Path>
</manifestEntries>
</archive>
<outputDirectory>target/${project.name}/</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>target/${project.name}/lib/</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>target/classes/</directory>
<includes>
<include>*.**</include>
</includes>
</resource>
</resources>
<outputDirectory>target/${project.name}/config</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!--maven check-->
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>5.2.4</version>
<configuration>
<format>ALL</format>
</configuration>
</plugin>
</plugins>
</build>