Open aubreyyan opened 4 years ago
I found your project via dzone and it was a good write up but I figured something was wrong when my version of your plugin failed to
mvn clean install
correctly.So after cloning and trying running
mvn clean install
without making any changes$ mvn clean install [INFO] Scanning for projects... [INFO] [INFO] -------------< com.techshard.filezip:filezip-maven-plugin >------------- [INFO] Building filezip-maven-plugin Maven Mojo 1.0-SNAPSHOT [INFO] ----------------------------[ maven-plugin ]---------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ filezip-maven-plugin --- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ filezip-maven-plugin --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ filezip-maven-plugin --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /mnt/c/Users/aubre/Projects/filezip-maven-plugin/target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.057 s [INFO] Finished at: 2020-07-22T17:24:14-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project filezip-maven-plugin: Compilation failure: Compilation failure: [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
something was obviously outdated, so I made some pom updates:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.techshard.filezip</groupId> <artifactId>filezip-maven-plugin</artifactId> <packaging>maven-plugin</packaging> <version>1.0-SNAPSHOT</version> <name>filezip-maven-plugin Maven Mojo</name> <url>http://maven.apache.org</url> <scm> <connection>scm:git:https://github.com/swathisprasad/filezip-maven-plugin.git</connection> <developerConnection>scm:git:https://github.com/swathisprasad/filezip-maven-plugin.git</developerConnection> <url>https://github.com/swathisprasad/filezip-maven-plugin</url> <tag>HEAD</tag> </scm> <licenses> <license> <name>Apache 2.0 License</name> <url>http://www.apache.org/licenses/LICENSE-2.0.html</url> <distribution>repo</distribution> </license> </licenses> <developers> <developer> <id>techshard-team</id> <name>Techshard Team</name> <email>techshard08@gmail.com</email> <organization>Techshard</organization> </developer> </developers> <issueManagement> <system>Github</system> <url>https://github.com/swathisprasad/filezip-maven-plugin/issues</url> </issueManagement> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>11</maven.compiler.source> <maven.compiler.target>11</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>3.6.3</version> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>3.6.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>2.2.1</version> </dependency> </dependencies> <build> <resources> <resource> <directory>${project.basedir}</directory> <includes> <include>NOTICE*</include> <include>LICENSE*</include> </includes> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <id>attach-sources</id> <phase>verify</phase> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>3.2.0</version> <configuration> <encoding>UTF-8</encoding> </configuration> <executions> <execution> <id>attach-javadoc</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
which resulted in the following error
$ mvn clean install [INFO] Scanning for projects... [INFO] [INFO] -------------< com.techshard.filezip:filezip-maven-plugin >------------- [INFO] Building filezip-maven-plugin Maven Mojo 1.0-SNAPSHOT [INFO] ----------------------------[ maven-plugin ]---------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ filezip-maven-plugin --- [INFO] Deleting /mnt/c/Users/aubre/Projects/filezip-maven-plugin/target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ filezip-maven-plugin --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ filezip-maven-plugin --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /mnt/c/Users/aubre/Projects/filezip-maven-plugin/target/classes [INFO] [INFO] --- maven-plugin-plugin:3.2:descriptor (default-descriptor) @ filezip-maven-plugin --- [INFO] Using 'UTF-8' encoding to read mojo metadata. [INFO] Applying mojo extractor for language: java [INFO] Mojo extractor for language: java found 0 mojo descriptors. [INFO] Applying mojo extractor for language: bsh [INFO] Mojo extractor for language: bsh found 0 mojo descriptors. [INFO] Applying mojo extractor for language: java-annotations [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.746 s [INFO] Finished at: 2020-07-22T17:28:51-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor (default-descriptor) on project filezip-maven-plugin: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.2:d escriptor failed: Index 10792 out of bounds for length 196 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
So if you have the time to make the project work again, that would be great - otherwise an update to the article on dzone stating that it's outdated and no longer works would be good as well so no one wastes their time like I did
@aubrey-y, the error from first build failure seems to be complaining about Java version. What java version are you using?
Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.
$ java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)
Ok thanks! I will check and update the project if required.
$ java --version openjdk 11.0.7 2020-04-14 OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1) OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)
I have updated the plugins, it should work fine now.
I found your project via dzone and it was a good write up but I figured something was wrong when my version of your plugin failed to
mvn clean install
correctly.So after cloning and trying running
mvn clean install
without making any changessomething was obviously outdated, so I made some pom updates:
which resulted in the following error
So if you have the time to make the project work again, that would be great - otherwise an update to the article on dzone stating that it's outdated and no longer works would be good as well so no one wastes their time like I did