Build offline with maven

Post to Twitter

Sometimes I work at home and sometimes I’ve no VPN connection to my company. Sometimes I sit in a hotel without any internet connection. But I want to compile my projects with maven.

The first step is to set the –offline flag in my NetBeans Maven settings. This works fine with my local .m2 repository. But.

But for few (only in my company hosted) artifacts I get a really bad error message:

The POM for (artifact name) is missing, no dependency information available

This message sucks a lot. The named artifact *is* available in my local repository. After investigating some hours with searching the web, I found this interesting JIRA issue: Improve “missing dependency” error message when _maven.repositories/_remote.repositories contains other repository ids than requested. Ok, improving the error message is a good idea, but a better idea is (for this case) to remove the _maven.repositories file. The file contains a pointer to my company repository (only available via VPN) and maven3 use this pointer to resolve the pom file (and ignores the –offline flag).

After removing this file, anything works fine. I can build my NetBeans platform projects without any internet connection.

Dieser Beitrag wurde unter Maven, NetBeans, NetBeans Plattform abgelegt und mit , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

eMail-Benachrichtigung bei weiteren Kommentaren.
Auch möglich: Abo ohne Kommentar.