jxlgzwh commented on issue #206:
URL: https://github.com/apache/bifromq/issues/206#issuecomment-3660748739
> Please follow the steps below. I've tried them here, and they work
perfectly
>
> **1. Please update/change the plugin in the bifromq-auth-plugin/pom.xml
file.**
>
> ```
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <executions>
> <execution>
> <id>process-manifest</id>
> <phase>process-resources</phase>
> <goals>
> <goal>copy-resources</goal>
> </goals>
> <configuration>
>
<outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
> <resources>
> <resource>
> <directory>assembly</directory>
> <filtering>true</filtering>
> <includes>
> <include>MANIFEST.MF</include>
> </includes>
> </resource>
> </resources>
> </configuration>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-assembly-plugin</artifactId>
> <configuration>
> <descriptors>
> <descriptor>assembly/assembly.xml</descriptor>
> </descriptors>
> <appendAssemblyId>false</appendAssemblyId>
>
<outputDirectory>${project.build.outputDirectory}/../plugin</outputDirectory>
> </configuration>
> <executions>
> <execution>
> <id>make-assembly</id>
> <phase>package</phase>
> <goals>
> <goal>single</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> ```
>
> **2. add the file bifromq-auth-plugin/assembly/assembly.xml**
>
> ```
> <assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3
http://maven.apache.org/xsd/assembly-1.1.3.xsd">
> <id>all</id>
> <formats>
> <format>zip</format>
> </formats>
> <includeBaseDirectory>false</includeBaseDirectory>
> <!-- Include project classes -->
> <fileSets>
> <fileSet>
> <directory>${project.build.outputDirectory}</directory>
> <outputDirectory>classes</outputDirectory>
> <includes>
> <include>**/*</include>
> </includes>
> </fileSet>
> <fileSet>
> <lineEnding>unix</lineEnding>
> <directory>conf</directory>
> <outputDirectory>conf</outputDirectory>
> <includes>
> <include>**/*</include>
> </includes>
> </fileSet>
> </fileSets>
> <dependencySets>
> <dependencySet>
> <outputDirectory>lib</outputDirectory>
> <useProjectArtifact>false</useProjectArtifact>
> <unpack>false</unpack>
> <scope>runtime</scope>
> </dependencySet>
> </dependencySets>
> </assembly>
> ```
>
> **3 add the file bifromq-auth-plugin/assembly/MANIFEST.MF**
>
> Plugin-Class: ${plugin.class} Plugin-Id: ${plugin.id} Plugin-Version:
${project.parent.version}
>
> **4. rebuild the project** mvn -U clean package -DskipTests
>
> **5. copy bifromq-auth-plugin/target/plugin/bifromq-auth-plugin-1.0.0.zip
into bifromq-3.3.5\plugins**
>
> Here is my startup log
>
> ```
> 14:02:37.876 [main] INFO org.pf4j.DefaultPluginManager - PF4J version
3.12.0 in 'deployment' mode
> 14:02:37.885 [main] INFO org.pf4j.AbstractPluginManager - Plugin
'[email protected]' resolved
> 14:02:37.885 [main] INFO org.pf4j.AbstractPluginManager - Start plugin
'[email protected]'
> 14:02:37.887 [main] INFO c.b.b.starter.StandaloneStarter - Loaded plugin:
[email protected]
> 14:02:37.933 [main] INFO org.reflections.Reflections - Reflections took
28 ms to scan 2 urls, producing 12 keys and 95 values
> 14:02:37.982 [main] WARN plugin.manager - No resource throttler plugin
available, use DEV ONLY one instead
> 14:02:37.984 [main] WARN plugin.manager - No setting provider plugin
available, use DEV ONLY one instead
> 14:02:40.590 [main] INFO plugin.manager - Auth provider plugin type:
bifromq.auth.plugin.AuthProvider
> ```
2025-12-16 22:08:57.116 ERROR [org.pf4j.AbstractPluginManager] Cannot load
plugin
'D:\workspace\xxxxxxcloud\bifromq\bifromq-3.3.5\plugins\bifromq-auth-plugin-1.0.0'
org.pf4j.InvalidPluginDescriptorException: Field 'version' cannot be empty
at
org.pf4j.AbstractPluginManager.validatePluginDescriptor(AbstractPluginManager.java:993)
at
org.pf4j.AbstractPluginManager.loadPluginFromPath(AbstractPluginManager.java:895)
at
org.pf4j.DefaultPluginManager.loadPluginFromPath(DefaultPluginManager.java:139)
at
org.pf4j.AbstractPluginManager.loadPlugins(AbstractPluginManager.java:246)
at
com.baidu.bifromq.starter.StandaloneStarter.init(StandaloneStarter.java:142)
at
com.baidu.bifromq.starter.StandaloneStarter.init(StandaloneStarter.java:93)
at com.baidu.bifromq.starter.StarterRunner.run(StarterRunner.java:47)
at
com.baidu.bifromq.starter.StandaloneStarter.main(StandaloneStarter.java:700)
2025-12-16 22:08:57.413 INFO [plugin.manager] Event collector loaded:
com.baidu.demo.plugin.EventLogger
2025-12-16 22:08:57.416 WARN [plugin.manager] Resource throttler type class
are not specified, use DEV ONLY one instead
2025-12-16 22:08:57.420 WARN [plugin.manager] Setting provider plugin type
are not specified, use DEV ONLY one instead
2025-12-16 22:08:57.429 WARN [plugin.manager] Auth provider plugin type
'org.apache.bifromq.demo.plugin.DemoAuthProvider' not found, use DEV ONLY one
instead
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]