2

I am creating an eclipse plugin and building it with Maven 3.5.0. During the execution of the mvn -T 8 clean install I get some warnings:

[WARNING] Some attempts to read artifact osgi.bundle,org.eclipse.jdt.debug,3.9.1
.v20160128-1343 failed:

[WARNING]    An error occurred while transferring artifact canonical: 
osgi.bundle,org.eclipse.jdt.debug,3.9.1.v20160128-1343 from repository 
file:/d:/PluginRoot/source/plugs/xsd_sdk:

[WARNING]       Problems downloading artifact: 
osgi.bundle,org.eclipse.jdt.debug,3.9.1.v20160128-1343.:

[WARNING]          File has invalidcontent:C:\Users\Admin\AppData\Local\Temp
\signatureFile2830880020429242663.jar:

[WARNING]             Invalid content:plugin.xml
[WARNING]             Invalid content:about.html
[WARNING]             Invalid content:plugin.properties
[WARNING]             Invalid content:.api_description
[WARNING]             Invalid content:.options`

In the pom.xml from where I am running the clean install I have this tycho configuration:

<build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-maven-plugin</artifactId>
            <version>${tycho-version}</version>
            <extensions>true</extensions>
        </plugin>

        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <version>${tycho-version}</version>
            <configuration>
                <resolver>p2</resolver>
                <environments>
                    <environment>
                        <os>win32</os>
                        <ws>win32</ws>
                        <arch>x86_64</arch>
                    </environment>
                </environments>
                <includePackedArtifacts>true</includePackedArtifacts>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-surefire-plugin</artifactId>
            <version>${tycho-version}</version>
        </plugin>

I don't know if this may be a problem, I am running behind a company proxy, but I already set the proxy setting in the settings.xml file of the maven version used.

Why do I get such warnings and how could I fix them?

Naman
  • 27,789
  • 26
  • 218
  • 353
John Doe
  • 1,058
  • 8
  • 30
  • First are you using maven-tycho? Furthermore your locations like source/plugs look strange to me? – khmarbaise Aug 16 '17 at 16:01
  • @khmarbaise The path may be strange to you because I am using a target file to import the needed plugins from a local repository(`d:/PluginRoot/source/plugs/`) instead of an update site – John Doe Aug 17 '17 at 07:38
  • @khmarbaise Yes, it is maven-tycho! – John Doe Aug 23 '17 at 07:35
  • @khmarbaise Running in debug mode showed up this: `[WARNING] Some attempts to read artifact osgi.bundle,org.eclipse.jdt.debug,3.9.1.v20160128-1343 failed:`. But this also appears for others. – John Doe Aug 23 '17 at 08:28
  • From what I recall, Windows does not allow you to open the same file more than once unless it is specifically opened with the correct flags. I suspect that your multithreaded build is falling afoul of this. You would have to trawl through the Tycho and Maven source code to check if the files have been opened read-only correctly or not. – Steve C Sep 07 '17 at 12:51
  • @SteveC The same behaviour is seen on single threading – John Doe Sep 07 '17 at 13:08
  • @SteveC thanks for the ideas, I went further and found where the "magic"(literally) happens. In the source code I found this comment: `// there is no way to explicitly select a mirror - the repository magically picks one` – John Doe Sep 07 '17 at 13:55
  • @SteveC and then `CODE_RETRY is how the repository signals that it has more mirrors to try, and that we can call the same method with exactly the same parameters (!) again. However we try another format first, so that we don't "spoil" all mirrors by continuing to querying for a pack200 artifact that is actually broken in the master repository (cf. bug 412945).` – John Doe Sep 07 '17 at 13:56
  • @SteveC post an answer in 23 hours so I can award you some reputation. I didn't found a solution, but at least you guided me through the source of the problem. – John Doe Sep 13 '17 at 15:26

0 Answers0