fugerit-org / fj-doc

Fugerit Document Generation Framework (fj-doc)Fugerit Doc
https://www.fugerit.org/perm/venus/
Apache License 2.0
13 stars 2 forks source link

[fj-doc-maven-plugin] Could not find goal 'verify' #180

Closed amusarra closed 1 month ago

amusarra commented 1 month ago

When add fj-doc configuration to an existing project by this command:

mvn org.fugerit.java:fj-doc-maven-plugin:add -Dversion=8.6.0

and then I run the command mvn clean package, I get the error:

Could not find goal 'verify' in plugin org.fugerit.java:fj-doc-maven-plugin:8.6.0 among available goals add

From the documentation goal verify is available since version 8.7.0.

Since the maven plugin command specified version 8.6.0 I would have expected the plugin to be configured without the verify goal.

  <build>
    <plugins>
      <plugin>
        <groupId>org.fugerit.java</groupId>
        <artifactId>fj-doc-maven-plugin</artifactId>
        <version>${fj-doc-version}</version>
        <executions>
          <execution>
            <id>freemarker-verify</id>
            <phase>compile</phase>
            <goals>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <templateBasePath>${project.basedir}/src/main/resources/my-app/template</templateBasePath>
          <generateReport>true</generateReport>
          <failOnErrors>true</failOnErrors>
          <reportOutputFolder>${project.build.directory}/freemarker-syntax-verify-report</reportOutputFolder>
        </configuration>
      </plugin>
    </plugins>
  </build>

Here you can see how to replicate the use case.

asciicast


My Environment:

fugerit79 commented 1 month ago

Thanks for trying the plugin @amusarra . Actually here the issue here is using the latest version of the maven plugin (8.7.4 at the moment) targeting a previous version of the libraruy 8.6.0. The code is generated from the current version, but then it's run with the old one.

Even though possible, it is not a recommended (I updated the documentation) :

Thanks again.

fugerit79 commented 1 month ago

Thanks @amusarra , done https://github.com/fugerit-org/fj-doc/releases/tag/v8.7.5