-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error [URI scheme is not "file"] if some processSourceArtifacts are specified #93
Comments
Hi @borramTAS Keep in mind that when you use Form the log seems to me that the error is originated by sources that You've attached ... |
Hi @bsorrentino I have tried with others 5 different sources JAR, but the result is the same. The directory |
Hi @borramTAS, let me check if there are some problem during processing of source package. Could you provide me an example of what you refers as <processSourceArtifact>it.XXXXXXXX.YYYYYY.ZZZZZZZZZZ:admin:source</processSourceArtifact> thanks in advance |
Hi @bsorrentino, unfortunately I cannot distribute the content of those JARs, but I also did a test with more common jars such as: commons-collections:commons-collections:source, I don't know if it makes sense.
|
Update: I have tried with a new project with a new completely new JAR that include only one @MappedSuperclass, but the result is always the same. |
Hi @borramTAS I've done test using the following configuration <dependencies>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<classifier>sources</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>issue93</id>
<goals><goal>process</goal></goals>
<phase>compile</phase>
<configuration>
<appendSourceArtifacts>true</appendSourceArtifacts>
<processSourceArtifacts>
<processSourceArtifact>commons-collections:commons-collections</processSourceArtifact>
</processSourceArtifacts>
<failOnError>true</failOnError>
<processors>
<processor>org.bsc.maven.plugin.processor.test.TestGenerateSourceProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
and all worked as expected Note:
|
Hi @bsorrentino, it's works because the dependencies is in the classpath:
If you remove:
you get the same result, and processSourceArtifacts is ignored, you can check in the logs. But that's not my goal. I don't want to insert the dependency of the sources, it is the purpose of the processSourceArtifacts. |
Hi @borramTAS The goal of For how it is implemented, the dependency declaration is required (you can also put them as optional) |
Hi @bsorrentino, I did a test with your project (forked), and if I activate the toolchain profile I get the same error as mine, if I deactivate it everything works.
|
This line throw the exception:
|
Hi @borramTAS thanks for your effort. Finally I understood the problem that happen exclusively when use toolchain because the Plexus API, that manages the forked java compiler, has not the ability to read entry directly from jar but requires that them are on the file system I'm going to fix it |
Hi @borramTAS fixed has been released in I'll arrange an official release soon |
I was investigating and had come to the same conclusion. It seemed strange to me that it could work before. I await the updated version Many thanks for the support. |
Hi @borramTAS The reason it (now) clear:
So, for who like me don't use toolchain, it is always worked well |
The problem is now very clear to me too 👍
Unfortunately we always use the toolchain :-( |
don't worry new release is coming .... will be |
fix released in |
Hi @bsorrentino, Thanks so much for the quick intervention, I did a test and now for a single JAR it seems to work, I have an error (
|
Hi @borramTAS Let me know the results of investigantion. I'll do too |
Hi @borramTAS I tested and it worked, did you forget to add related dependency ? |
Hi @bsorrentino I think I have identified the problem, I have two dependencies with the same groupId, the second is always discarded:
At this statement
|
Hi @borramTAS I've tested the following configuration with success (take a look to here) Plugin <processSourceArtifacts>
<processSourceArtifact>commons-collections:commons-collections</processSourceArtifact>
<processSourceArtifact>org.codehaus.plexus:plexus-tools</processSourceArtifact>
<processSourceArtifact>org.apache.commons:commons-text</processSourceArtifact>
<processSourceArtifact>org.apache.commons:commons-lang3</processSourceArtifact>
</processSourceArtifacts>
Dependencies <dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac</artifactId>
<version>2.8.8</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<classifier>sources</classifier>
</dependency>
|
If you remove
|
If you want to use |
At this moment it is not clear to me why one works and [N] does not, but with Many thanks again. |
Problem
We need to process some JPA Metamodel that residing in some external dependencies, this is the plugin configuration:
But when we run a clean compile we receive the following error:
Environment
If I remove the dependency:
<processSourceArtifact>it.XXXXXXXX.YYYYYY.ZZZZZZZZZZ:admin:source</processSourceArtifact>
everything works. I also checked the dependency and it looks like a correct JAR.maven.log
Many thanks for any suggestion
Marino
The text was updated successfully, but these errors were encountered: