Problem to mirror vaadin add-ons in nexus

Hi,

we are facing problem to mirror the vaadin add-ons tru our own nexus.

We created a proxy repository with url to vaadin add-ons and added it to the public repositories group.
You can browse remote index but the local index is always empty.
settings.xml contains:


  <mirrors>
    <mirror>
      <id>nexus</id>
      <mirrorOf>*</mirrorOf>
      <url>http://our.nexus/content/groups/public</url>
    </mirror>
  </mirrors>

In this situation we cannot download any artifacts.
If we execute “update index” on the created add-on proxy-repository the processing is unusual fast and logs(e.g.): Updating repository index “vaadin-addons” from path / and below. : Process started on Wed Jan 30 16:34:09 CET 2013, finished successfully on Wed Jan 30 16:34:09 CET 2013

Ideas how to solve this problem ?

We face the same problem.

Denis, you got any solution yet?

Same problem here.
Has anyone found a solution?

Sorry, the Vaadin Directory Maven support is not a full-blown Maven repository implementation, and does not support browsing. As far as I know, each add-on can only be downloaded with its direct URL including the version number. What you see when trying to browse the remote repository index is probably only the add-ons you have accessed in the past.

Note that many of the add-ons in the Directory are not Maven projects and do not have much metadata, so what the Directory does at the moment is to expose the JARs and very simplified POMs in those cases. Even for Maven projects, the Directory does not get the deployment of the Maven artifacts directly but only a JAR or a ZIP file. If the project was uploaded as a ZIP package including “-sources” and “-javadoc” JARs, those are also made available, and the POM is taken from the main JAR if available there.

I’m afraid these limitations mean that while you can proxy access to the Directory and cache whatever is downloaded from there, there is no practical way to mirror the whole Directory. As far as I know, there are no plans at the moment to make changes to this.

Had the exact same problem and finally figured out how to solve it.
On your Nexus, select the Vaadin addons repository and select the routing tab.

Deselect
the Discovery check and save the repository settings.

Retry and force your Maven to check your Nexus.
Watch the file being downloaded!

Hello, Johan.
Facing the same problem. But I don’t see routing tab when I select the repository. The version of Nexus we are using is 2.0.6.

Hello Kantoro,

We are using Nexus 2.4.0 but sadly enough we found out the fix i found didn’t do the job either. (it seems to help a bit but not fix the problem.)
Our Nexus downloads the POM but doesn’t download the JAR.
After a few days the JAR magically appears.
To by pass the problem I add the Vaadin Addon repository to my local Maven config and download the file’s directly instead of using the Nexus as a proxy.

Hi Guys, I faced exactly the same problem but the hint from Johan Smolders seems to fix the problem in my environment. Thanks

Hello everybody…

I’ve solved this problem by downloading the addons directly from vaadin repository, escaping nexus. And copied the folder with addons to the nexus working folder (sonatype-work/nexus/storage/{repo-name})

The following nexus proxy repository settings fixed the problem for us: “Download Remote Indexes: False” and “Include in Search: False”. Since addons are discovered by browsing the vaadin addon website and not by browsing nexus, it is ok that the search in nexus does not work.

We have the same problem. Is there any solution to it? I’ve tried the ones suggested above, but it didn’t work.

We have the same problem. :wink:

A Solution for suporting Nexus would be great!

We have the following setup in our Nexus (2.11.3-01) and it seems to work fine:


The following worked for us:

In nexus create new proxy repository called “vaadin.add-ons” as described above by “Grégory Joseph”

Then I took the suggestion of “Kantoro Erkulov” above to move our local maven repository’s vaadin directory structure to the nexus host.

tar up all the vaadin jars in the local repository on my machine:

cd ~/.m2/repository/com
tar cvf vaadin.tar vaadin

Copy this archive to the nexus machine:

scp vaadin.tar {remote_nexus_host}:.

Go to the nexus directory representing the vaadin.add-ons:

cd /opt/tomcat/sonatype-work/nexus/storage/vaadin-add-ons
mkdir com

unpack the archive from earlier:

cd com
tar xvf ~/vaadin.tar

Then in nexus go to the repositories section

  • right click on the vaadin.add-ons and select update-index
  • click on “Public Repositories”
  • highlight “vaadin.add-ons” under “Available Repositories”
  • Click the left arrow button to ‘add’ it to the “Ordered Group Repositories”
  • Click the “Save” button below

Of course the use of this information relies on the existence of a suitable settings.xml in your ~/.m2 directory:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">

<mirrors>
        <mirror>
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://your_nexus_host:8080/nexus/content/groups/public</url>
        </mirror>
</mirrors>

<activeProfiles>
        <activeProfile>nexus</activeProfile>
</activeProfiles>

<profiles>
        <profile>
            <id>nexus</id>
            <properties>
            </properties>
            <!-- Enable snapshots for the built in central repo to direct -->
            <!-- all requests to nexus via the mirror -->
            <repositories>
                <repository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>org.springframework.maven.milestone</id>
                    <name>Spring Maven Milestone Repository</name>
                    <url>http://maven.springframework.org/milestone</url>
                </repository>
            </repositories>

            <pluginRepositories>
                <pluginRepository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>

                <pluginRepository>
                    <id>autoincrement-versions-maven-plugin</id>
                    <name>autoincrement-versions-maven-plugin</name>
                    <url>http://autoincrement-versions-maven-plugin.googlecode.com/svn/repo</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>

            </pluginRepositories>

        </profile>

</profiles>

<servers>
        <server>
            <id>deployment</id>
            <username>deployment</username>
            <password>your_password</password>
            <filePermissions>664</filePermissions>
            <directoryPermissions>775</directoryPermissions>
        </server>
</servers>

<localRepository>/Users/your_username/.m2/repository</localRepository>
<offline>false</offline>

</settings>

Same problem with Nexus 3 and vaadin.add-ons repository.

Has anyone found a solution?

Apparrently there’s a searchable repository, that works
http://vaadin.com/nexus/content/repositories/vaadin-addons/
Thanks Meik Behnfeldt - http://stackoverflow.com/a/31202626/3229831

I can’t find an official Vaadin document regarding proxy repository usage, all the maven docs just reference the standard addon-url.

hhmm it is still not working. Not with Nexus and not with JFrog Artifactory. :frowning:

If you come across this problem in 2021, then check that your pom.xml points to https://… and not http://….