Home  >  Q&A  >  body text

java maven打包jar 方法参数名变var1,var2之类的无意义参数名怎么办

迷茫迷茫2712 days ago1074

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-18 10:47:34

    This is the result of idea decompiling .class. If you want to see the complete source code, you can use maven-source-plugin and configure it in pom.xml:

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-source-plugin</artifactId>
      <executions>
        <execution>
          <id>attach-sources</id>
          <goals>
            <goal>jar</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
    
    

    Then:

    mvn clean package
    

    You will see in the target directory:

    • xx.jar

    • xx-sources.jar

    sources.jar is the readable source code jar

    reply
    0
  • Cancelreply