You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Boué (JIRA)" <ji...@apache.org> on 2016/07/20 09:46:20 UTC

[jira] [Commented] (MPLUGIN-306) %2 in filepath throws Exception with maven-plugin-plugin

    [ https://issues.apache.org/jira/browse/MPLUGIN-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15385616#comment-15385616 ] 

Guillaume Boué commented on MPLUGIN-306:
----------------------------------------

Can you try again with version 3.4 of the plugin instead of 3.3? I can reproduce the error with 3.3 but the build works correctly with 3.4.

> %2 in filepath throws Exception with maven-plugin-plugin
> --------------------------------------------------------
>
>                 Key: MPLUGIN-306
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-306
>             Project: Maven Plugin Tools
>          Issue Type: Bug
>          Components: Plugin Plugin
>    Affects Versions: 3.3
>            Reporter: Stijn Koopal
>
> When the characters %2 are present in the path to a project that contains a maven plugin, the maven-plugin-plugin will fail during compile time.
> The exception is different for local building and for jenkins building:
> Exception on local build:
> {noformat}
> Caused by: java.lang.IllegalArgumentException
>         at sun.net.www.ParseUtil.decode(ParseUtil.java:202)
>         at sun.net.www.protocol.file.Handler.openConnection(Handler.java:82)
>         at sun.net.www.protocol.file.Handler.openConnection(Handler.java:72)
>         at java.net.URL.openConnection(URL.java:979)
> {noformat}
> Exception on jenkins:
> {noformat}
> Caused by: java.lang.RuntimeException: Cannot read file : TestMojo.java
> 	at com.thoughtworks.qdox.JavaDocBuilder$1.visitFile(JavaDocBuilder.java:457)
> 	at com.thoughtworks.qdox.JavaDocBuilder$2.visitFile(JavaDocBuilder.java:476)
> 	at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:43)
> {noformat}
> Test setup (have to do it in ticket, network policy does not allow me to share files):
> {code:java|title=TestMojo.java}
> import org.apache.maven.plugin.AbstractMojo; 
> import org.apache.maven.plugin.MojoExecutionException; 
> import org.apache.maven.plugin.MojoFailureException; 
> import org.apache.maven.plugins.annotations.Mojo;
> @Mojo(name = "test")
> public class TestMojo extends AbstractMojo {
>     @Override
>     public void execute() throws MojoExecutionException, MojoFailureException {
>         
>     }
> }
> {code}
> {code:xml|title=pom.xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <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/xsd/maven-4.0.0.xsd">
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>test.maven.plugins</groupId>
>     <artifactId>test-maven-plugin</artifactId>&#xD;
>     <version>1.0.0-SNAPSHOT</version>
>     <packaging>maven-plugin</packaging>
>     <properties>
>         <maven.version>3.3.9</maven.version>
>         <maven-plugin-annotations.version>3.4</maven-plugin-annotations.version>
>         <maven-plugin-testing-harness.version>3.3.0</maven-plugin-testing-harness.version>
>     </properties>
>     <dependencies>
>         <!-- Maven plugins -->
>         <dependency>
>             <groupId>org.apache.maven</groupId>
>             <artifactId>maven-plugin-api</artifactId>
>             <version>${maven.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.maven</groupId>
>             <artifactId>maven-core</artifactId>
>             <version>${maven.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.maven.plugin-tools</groupId>
>             <artifactId>maven-plugin-annotations</artifactId>
>             <version>${maven-plugin-annotations.version}</version>
>             <scope>provided</scope>
>         </dependency>
>         <!-- Test dependencies -->
>         <dependency>
>             <groupId>org.apache.maven.plugin-testing</groupId>
>             <artifactId>maven-plugin-testing-harness</artifactId>
>             <version>${maven-plugin-testing-harness.version}</version>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.maven</groupId>
>             <artifactId>maven-aether-provider</artifactId>
>             <version>${maven.version}</version>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.maven</groupId>
>             <artifactId>maven-compat</artifactId>
>             <version>${maven.version}</version>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>junit</groupId>
>             <artifactId>junit</artifactId>
>             <version>4.12</version>
>         </dependency>
>     </dependencies>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-plugin-plugin</artifactId>
>                 <version>3.3</version>
>                 <configuration>
>                     <goalPrefix>kjar</goalPrefix>
>                 </configuration>
>                 <executions>
>                     <execution>
>                         <id>default-descriptor</id>
>                         <goals>
>                             <goal>descriptor</goal>
>                         </goals>
>                         <phase>process-classes</phase>
>                     </execution>
>                     <execution>
>                         <id>help-descriptor</id>
>                         <goals>
>                             <goal>helpmojo</goal>
>                         </goals>
>                         <phase>process-classes</phase>
>                     </execution>
>                 </executions>
>             </plugin>
>         </plugins>
>     </build>
> </project>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)