dev-aspectj / aspectj-maven-plugin

AspectJ Maven Plugin
MIT License
48 stars 12 forks source link

Site with minor bug in documentation #146

Open jeffque opened 1 week ago

jeffque commented 1 week ago

I am studying aspectj and was trying this plugin. I noticed that in the /usage.html page there were some maven variables that were not expanded:

  <build>
    <plugins>
      <plugin>
        <groupId>${project.groupId}</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>

What was expected:

  <build>
    <plugins>
      <plugin>
        <groupId>dev.aspectj</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <version>1.14</version>
        <executions>

There were some other substitutions in this HTML that were not made in others plugin usages that was with the same issue.

I have not noted elsewhere, but I have not done thorough investigation

jeffque commented 1 week ago

Here I found it too multimodule/multimodule_strategy.html:

<!-- +========================================= -->
<!-- | Build settings                           -->
<!-- +========================================= -->
<build>
  <plugins>
    <plugin>
      <groupId>${project.groupId}</groupId>
      <artifactId>aspectj-maven-plugin</artifactId>
      <version>${project.version}</version>
      <configuration>
        <complianceLevel>8</complianceLevel>
kriegaex commented 1 week ago

Thanks, I will look into it next time I work on the docs.

jeffque commented 1 week ago

I found an easy fix. It will, however, if I put it as is, solve for example the aspectjVersion variable in the samples.

What currently is rendering like this:

<project>
  <!-- ... -->
  <dependencies>
    <!-- ... -->
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>${aspectjVersion}</version>
    </dependency>
    <!-- ... -->
  </dependencies>
  <!-- ... -->
  <build>
    <plugins>
      <plugin>
        <groupId>${project.groupId}</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <version>${project.version}</version>

will render like this:

<project>
  <!-- ... -->
  <dependencies>
    <!-- ... -->
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>1.9.7</version>
    </dependency>
    <!-- ... -->
  </dependencies>
  <!-- ... -->
  <build>
    <plugins>
      <plugin>
        <groupId>dev.aspectj</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>
        <version>1.15-SNAPSHOT</version>

Want to keep the aspectj as a variable?

jeffque commented 1 week ago

Thanks, I will look into it next time I work on the docs.

Oh, I was just posting what I have found, just before your answer @kriegaex .

I will be able to open a PR in the next few minutes if you find it valuable.