You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jörg Schaible <jo...@swisspost.com> on 2015/11/13 12:58:51 UTC

Offline builds nearly impossible

Hi folks,

we have a requirement for a source code escrow 
(https://en.wikipedia.org/wiki/Source_code_escrow). Therefore we intended 
provide our source code with a local Maven repository that can be used for 
offline builds. However, all attempts have been failed so far.

What have we done:
1/ Checked out the tagged versions of our software
2/ Build it with M339 (mvn package) using an empty local Maven repo
As result all released artifacts are recreated in the target directories - 
so far so good.

As next step we took a copy of the local repo and of the cleaned sources to 
a new location and created naively a settings.xml containing two entries 
only:
- the location to the copy of the local repo
- offline set to true

We use JDK 1.7 and tried the different M3 versions (3.0.5, 3.1.1, 3.2.5, 
3.3.9):

First try with Maven 3.0.5:
============= %< ================
jos@josoo /tmp/kde-jos/offline $ mvn -s settings.xml -f source/pom.xml clean 
package 
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project ip.users:ip-users-ear:4.4.1 (/tmp/kde-
jos/offline/source/ip.users/ip-users-ear/pom.xml) has 1 error
[ERROR]     Unresolveable build extension: Error resolving version for 
plugin 'org.apache.maven.plugins:maven-eclipse-plugin' from the repositories 
[local (/tmp/kde-jos/offline/local.repo), central 
(http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin 
repository -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] 
http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException
============= %< ================
$ ls -l local.repo/org/apache/maven/plugins/maven-eclipse-plugin/ 
drwxr-xr-x 2 jos jos 4096 Nov 13 09:47 2.10
============= %< ================

For whatever reason, it does not accept the maven-eclipse-plugin in the 
local repo (although it is just declared, but not used in the build itself). 
(And yes, it has no sticky version, the newest might always create the best 
project...)

Try with Maven 3.1.1/3.2.5/3.3.9 (all the same):
============= %< ================
$ mvn -s settings.xml -f source/pom.xml clean package     
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project builder:source:x-SNAPSHOT (/tmp/kde-
jos/offline/source/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Cannot access central 
(http://repo.maven.apache.org/maven2) in offline mode and the artifact 
com.scalaris.buildsystem.maven2:master:pom:274 has not been downloaded from 
it before. and 'parent.relativePath' points at no local POM @ line 6, column 
13 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] 
http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
============= %< ================
$ ls -l local.repo/com/scalaris/buildsystem/maven2/master
drwxr-xr-x 2 jos jos 4096 Nov 13 09:47 274
============= %< ================

The "unresolvable" parent is obviously available in the local repo.

As next step we added an active profile to settings.xml with repository 
definitions using the same ids we had originally, but with a URL pointing to 
nowhere (file:///). This makes no difference for M305, but all versions 
3.1.1 and higher start to accept the artifacts available in the local 
repository ... unless the first project in the build uses the maven-
assembly-artifact:

============= %< ================
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-
plugin:2.4.1:single (create-assemblies) on project fileupload-app: Failed to 
create assembly: Unable to resolve dependencies for assembly 'app': Failed 
to resolve dependencies for assembly: Missing:
[ERROR] ----------
[ERROR] 1) commons-codec:commons-codec:jar:1.6
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=commons-codec -
DartifactId=commons-codec -Dversion=1.6 -Dpackaging=jar -Dfile=/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the 
file there:
[ERROR] mvn deploy:deploy-file -DgroupId=commons-codec -DartifactId=commons-
codec -Dversion=1.6 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -
DrepositoryId=[id]
[ERROR] 
[ERROR] Path to dependency:
[ERROR] 1) com.essencio.components.fileupload:fileupload-app:jar:4.4.0
[ERROR] 2) com.scalaris.commons:scalaris-commons-run:jar:2.2.1
[ERROR] 3) com.scalaris.commons:scalaris-commons-lang:jar:2.6.1
[ERROR] 4) commons-codec:commons-codec:jar:1.6
[...]
============= %< ================

Again, all the "unavailable" artifacts are already in the local repo.

Finally, using the -llr flag, the build with M311/M325 succeeds, but fails 
still with M339, because a 3rd party plugin cannot find its dependencies 
now:

============= %< ================
[ERROR] Failed to execute goal org.primefaces.extensions:resources-
optimizer-maven-plugin:1.0.0:optimize (optimize) on project ip-wwpbase: 
Execution optimize of goal org.primefaces.extensions:resources-optimizer-
maven-plugin:1.0.0:optimize failed: Plugin 
org.primefaces.extensions:resources-optimizer-maven-plugin:1.0.0 or one of 
its dependencies could not be resolved: The following artifacts could not be 
resolved: org.apache.maven:maven-model:jar:3.1.0, org.apache.maven:maven-
artifact:jar:3.1.0, org.apache.maven:maven-settings:jar:3.1.0, 
org.apache.maven:maven-settings-builder:jar:3.1.0, org.apache.maven:maven-
repository-metadata:jar:3.1.0, org.apache.maven:maven-model-
builder:jar:3.1.0, org.apache.maven:maven-aether-provider:jar:3.1.0, 
org.codehaus.plexus:plexus-classworlds:jar:2.4.2: Cannot access scalaris-
plugin-release (file:///) in offline mode and the artifact 
org.apache.maven:maven-model:jar:3.1.0 has not been downloaded from it 
before. -> [Help 1]
============= %< ================

Again, all the "unavailable" artifacts are already in the local repo. It 
seems M339 is missing some compatibility layer.

However, offline builds are very hard to accomplish. They are definitely no 
fun.

Cheers,
Jörg



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Offline builds nearly impossible

Posted by Gary Gregory <ga...@gmail.com>.
On Mon, Nov 16, 2015 at 6:37 AM, Jörg Schaible <joerg.schaible@swisspost.com
> wrote:

> Hi Jason,
>
> Jason van Zyl wrote:
>
> > If this does not work please let me know. This is what I’ve used in the
> > past and if it doesn’t work I agree it needs to be fixed. I honestly
> > haven’t tried making a hermetically sealed build in a few years but last
> > year worked on a project that did no network traversal aside from using
> > file-based repositories and it all worked fine.
>
> Worked like charm. I had to create the metadata for any plugin without a
> fixed version, but that's OK (none of those is actually involved creating
> the artifacts).
>

Can offline builds be documented in detail in the FAQ or site? It sounds
like this is not going to be as simple as saying "--offline" for a while.

Gary


> Cheers,
> Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Offline builds nearly impossible

Posted by Jörg Schaible <jo...@swisspost.com>.
Hi Jason,

Jason van Zyl wrote:

> If this does not work please let me know. This is what I’ve used in the
> past and if it doesn’t work I agree it needs to be fixed. I honestly
> haven’t tried making a hermetically sealed build in a few years but last
> year worked on a project that did no network traversal aside from using
> file-based repositories and it all worked fine.

Worked like charm. I had to create the metadata for any plugin without a 
fixed version, but that's OK (none of those is actually involved creating 
the artifacts).

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Offline builds nearly impossible

Posted by Gary Gregory <ga...@gmail.com>.
On Nov 13, 2015 9:45 AM, <co...@wellsfargo.com> wrote:
>
> I just wanted to weigh in.
>
> This indeed does not function in what I would call an "intuitive" way.
>
> It would be really nice if offline mode meant just provide the switch and
everything used your local repo. No extra configuration or trickery
required.

+1

This would also help when your ISP looses service and you still want to get
some work done.

Gary
>
> I know in modern times, the idea of always being connected is the norm,
but if you KNOW you don't need any updates and you have a lot of deps, this
could speed up the build a bit. Especially if you are forced to use a 3G
connection for a build on an emergency basis in your job.
>
> Then again, it would also be nice if Santa Claus were real.
>
> When will Apache have their open source Santa project? ;)
>
> Cody Fyler
> Lending Grid Build Team
> G=Lending Grid Builds
> (515) – 441 - 0814
>
> -----Original Message-----
> From: Paul Benedict [mailto:pbenedict@apache.org]
> Sent: Friday, November 13, 2015 11:27 AM
> To: Maven Users List <us...@maven.apache.org>
> Cc: joerg.schaible@gmx.de
> Subject: Re: Offline builds nearly impossible
>
> I think most people, at least once in their life, try to use their local
repository cache as an offline remote repository. However, the two aren't
the same in concept though, IIRC, the last time I tried. You still need to
keep the two separate.
>
> Now it would be interesting if a tool existed to copy the contents of a
local repository and scrub its local metadata. That would then give you a
true "remote offline repo".
>
>
> Cheers,
> Paul
>
> On Fri, Nov 13, 2015 at 11:17 AM, Jason van Zyl <ja...@takari.io> wrote:
>
> > If this does not work please let me know. This is what I’ve used in
> > the past and if it doesn’t work I agree it needs to be fixed. I
> > honestly haven’t tried making a hermetically sealed build in a few
> > years but last year worked on a project that did no network traversal
> > aside from using file-based repositories and it all worked fine.
> >
> > > On Nov 13, 2015, at 11:33 AM, Jörg Schaible <jo...@gmx.de>
> > wrote:
> > >
> > > Hi Jason,
> > >
> > > Jason van Zyl wrote:
> > >
> > >> Use a file based remote repository instead of trying to build in
> > >> offline mode.
> > >>
> > >> You can either use a repository manager to create the remote
> > >> repository
> > or
> > >> an empty local repository with a full build. As noted though, you
> > >> have
> > to
> > >> remove all local repository metadata and files if you create the
> > >> repository locally.
> > >>
> > >> Now that you have the repository that contains everything you need
> > >> to build create a settings.xml with a mirror pointing to a
> > >> file-based repository. You shouldn’t need to build in offline mode
> > >> but using a file-base repository in your mirror will effectively be
> > >> the same. This
> > way
> > >> you will not be subject to every Maven plugins potentially flaking
> > >> handling of offline mode.
> > >
> > > Good idea, thanks! And with a mirror setup to file:/// (except for
> > > that file-based remote repo) we can even verify that no offline
> > > access is required.
> > >
> > > Cheers,
> > > Jörg
> > >
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
> > Thanks,
> >
> > Jason
> >
> > ----------------------------------------------------------
> > Jason van Zyl
> > Founder, Takari and Apache Maven
> > http://twitter.com/jvanzyl
> > http://twitter.com/takari_io
> > ---------------------------------------------------------
> >
> > To think is easy. To act is hard. But the hardest thing in the world
> > is to act in accordance with your thinking.
> >
> >  -- Johann von Goethe
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >

Re: Offline builds nearly impossible

Posted by Paul Benedict <pb...@apache.org>.
Jason's suggestion is what I have attempted in the past. You want to mirror
your remote repository using file:/// pointing to your disk copy. Then you
don't have to be offline. However, this is NOT your local repo! You still
need that. Don't confuse the two even if both are on your machine.


Cheers,
Paul

On Fri, Nov 13, 2015 at 1:36 PM, Ron Wheeler <rwheeler@artifact-software.com
> wrote:

> I certainly would defer to your expertise.
>
> Ron
>
> On 13/11/2015 2:33 PM, Jason van Zyl wrote:
>
>> In this case they would not be better and far less convenient. For a
>> hermetically sealed build at any rate. The local repository cache cleared
>> of the tracking files serves as a perfectly fine remote repository for this
>> use case. Most escrow bundles carry all the tools and sources required to
>> build the product: packaging a repository manager would probably be a bit
>> much.
>>
>> On Nov 13, 2015, at 2:09 PM, Ron Wheeler <rw...@artifact-software.com>
>>> wrote:
>>>
>>>
>>> Not sure if the extra work would be worthwhile when you have a number of
>>> free repo packages that are better in many ways than the maven cache and
>>> can be installed on Windows or Linux.
>>>
>>>
>>> Ron
>>>
>>> On 13/11/2015 12:44 PM, cody.a.fyler@wellsfargo.com wrote:
>>>
>>>> I just wanted to weigh in.
>>>>
>>>> This indeed does not function in what I would call an "intuitive" way.
>>>>
>>>> It would be really nice if offline mode meant just provide the switch
>>>> and everything used your local repo. No extra configuration or trickery
>>>> required.
>>>>
>>>> I know in modern times, the idea of always being connected is the norm,
>>>> but if you KNOW you don't need any updates and you have a lot of deps, this
>>>> could speed up the build a bit. Especially if you are forced to use a 3G
>>>> connection for a build on an emergency basis in your job.
>>>>
>>>> Then again, it would also be nice if Santa Claus were real.
>>>>
>>>> When will Apache have their open source Santa project? ;)
>>>>
>>>> Cody Fyler
>>>> Lending Grid Build Team
>>>> G=Lending Grid Builds
>>>> (515) – 441 - 0814
>>>>
>>>> -----Original Message-----
>>>> From: Paul Benedict [mailto:pbenedict@apache.org]
>>>> Sent: Friday, November 13, 2015 11:27 AM
>>>> To: Maven Users List <us...@maven.apache.org>
>>>> Cc: joerg.schaible@gmx.de
>>>> Subject: Re: Offline builds nearly impossible
>>>>
>>>> I think most people, at least once in their life, try to use their
>>>> local repository cache as an offline remote repository. However, the two
>>>> aren't the same in concept though, IIRC, the last time I tried. You still
>>>> need to keep the two separate.
>>>>
>>>> Now it would be interesting if a tool existed to copy the contents of a
>>>> local repository and scrub its local metadata. That would then give you a
>>>> true "remote offline repo".
>>>>
>>>>
>>>> Cheers,
>>>> Paul
>>>>
>>>> On Fri, Nov 13, 2015 at 11:17 AM, Jason van Zyl <ja...@takari.io>
>>>> wrote:
>>>>
>>>> If this does not work please let me know. This is what I’ve used in
>>>>> the past and if it doesn’t work I agree it needs to be fixed. I
>>>>> honestly haven’t tried making a hermetically sealed build in a few
>>>>> years but last year worked on a project that did no network traversal
>>>>> aside from using file-based repositories and it all worked fine.
>>>>>
>>>>> On Nov 13, 2015, at 11:33 AM, Jörg Schaible <jo...@gmx.de>
>>>>>>
>>>>> wrote:
>>>>>
>>>>>> Hi Jason,
>>>>>>
>>>>>> Jason van Zyl wrote:
>>>>>>
>>>>>> Use a file based remote repository instead of trying to build in
>>>>>>> offline mode.
>>>>>>>
>>>>>>> You can either use a repository manager to create the remote
>>>>>>> repository
>>>>>>>
>>>>>> or
>>>>>
>>>>>> an empty local repository with a full build. As noted though, you
>>>>>>> have
>>>>>>>
>>>>>> to
>>>>>
>>>>>> remove all local repository metadata and files if you create the
>>>>>>> repository locally.
>>>>>>>
>>>>>>> Now that you have the repository that contains everything you need
>>>>>>> to build create a settings.xml with a mirror pointing to a
>>>>>>> file-based repository. You shouldn’t need to build in offline mode
>>>>>>> but using a file-base repository in your mirror will effectively be
>>>>>>> the same. This
>>>>>>>
>>>>>> way
>>>>>
>>>>>> you will not be subject to every Maven plugins potentially flaking
>>>>>>> handling of offline mode.
>>>>>>>
>>>>>> Good idea, thanks! And with a mirror setup to file:/// (except for
>>>>>> that file-based remote repo) we can even verify that no offline
>>>>>> access is required.
>>>>>>
>>>>>> Cheers,
>>>>>> Jörg
>>>>>>
>>>>>>
>>>>>> --------------------------------------------------------------------
>>>>>> - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>
>>>>>> Thanks,
>>>>>
>>>>> Jason
>>>>>
>>>>> ----------------------------------------------------------
>>>>> Jason van Zyl
>>>>> Founder, Takari and Apache Maven
>>>>> http://twitter.com/jvanzyl
>>>>> http://twitter.com/takari_io
>>>>> ---------------------------------------------------------
>>>>>
>>>>> To think is easy. To act is hard. But the hardest thing in the world
>>>>> is to act in accordance with your thinking.
>>>>>
>>>>>   -- Johann von Goethe
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>> --
>>> Ron Wheeler
>>> President
>>> Artifact Software Inc
>>> email: rwheeler@artifact-software.com
>>> skype: ronaldmwheeler
>>> phone: 866-970-2435, ext 102
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder, Takari and Apache Maven
>> http://twitter.com/jvanzyl
>> http://twitter.com/takari_io
>> ---------------------------------------------------------
>>
>> The most dangerous risk: spending your life not doing what you want on
>> the bet you can buy yourself freedom to do it later.
>>
>>   -- Randy Komisar
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Offline builds nearly impossible

Posted by Ron Wheeler <rw...@artifact-software.com>.
I certainly would defer to your expertise.

Ron

On 13/11/2015 2:33 PM, Jason van Zyl wrote:
> In this case they would not be better and far less convenient. For a hermetically sealed build at any rate. The local repository cache cleared of the tracking files serves as a perfectly fine remote repository for this use case. Most escrow bundles carry all the tools and sources required to build the product: packaging a repository manager would probably be a bit much.
>
>> On Nov 13, 2015, at 2:09 PM, Ron Wheeler <rw...@artifact-software.com> wrote:
>>
>>
>> Not sure if the extra work would be worthwhile when you have a number of free repo packages that are better in many ways than the maven cache and can be installed on Windows or Linux.
>>
>>
>> Ron
>>
>> On 13/11/2015 12:44 PM, cody.a.fyler@wellsfargo.com wrote:
>>> I just wanted to weigh in.
>>>
>>> This indeed does not function in what I would call an "intuitive" way.
>>>
>>> It would be really nice if offline mode meant just provide the switch and everything used your local repo. No extra configuration or trickery required.
>>>
>>> I know in modern times, the idea of always being connected is the norm, but if you KNOW you don't need any updates and you have a lot of deps, this could speed up the build a bit. Especially if you are forced to use a 3G connection for a build on an emergency basis in your job.
>>>
>>> Then again, it would also be nice if Santa Claus were real.
>>>
>>> When will Apache have their open source Santa project? ;)
>>>
>>> Cody Fyler
>>> Lending Grid Build Team
>>> G=Lending Grid Builds
>>> (515) – 441 - 0814
>>>
>>> -----Original Message-----
>>> From: Paul Benedict [mailto:pbenedict@apache.org]
>>> Sent: Friday, November 13, 2015 11:27 AM
>>> To: Maven Users List <us...@maven.apache.org>
>>> Cc: joerg.schaible@gmx.de
>>> Subject: Re: Offline builds nearly impossible
>>>
>>> I think most people, at least once in their life, try to use their local repository cache as an offline remote repository. However, the two aren't the same in concept though, IIRC, the last time I tried. You still need to keep the two separate.
>>>
>>> Now it would be interesting if a tool existed to copy the contents of a local repository and scrub its local metadata. That would then give you a true "remote offline repo".
>>>
>>>
>>> Cheers,
>>> Paul
>>>
>>> On Fri, Nov 13, 2015 at 11:17 AM, Jason van Zyl <ja...@takari.io> wrote:
>>>
>>>> If this does not work please let me know. This is what I’ve used in
>>>> the past and if it doesn’t work I agree it needs to be fixed. I
>>>> honestly haven’t tried making a hermetically sealed build in a few
>>>> years but last year worked on a project that did no network traversal
>>>> aside from using file-based repositories and it all worked fine.
>>>>
>>>>> On Nov 13, 2015, at 11:33 AM, Jörg Schaible <jo...@gmx.de>
>>>> wrote:
>>>>> Hi Jason,
>>>>>
>>>>> Jason van Zyl wrote:
>>>>>
>>>>>> Use a file based remote repository instead of trying to build in
>>>>>> offline mode.
>>>>>>
>>>>>> You can either use a repository manager to create the remote
>>>>>> repository
>>>> or
>>>>>> an empty local repository with a full build. As noted though, you
>>>>>> have
>>>> to
>>>>>> remove all local repository metadata and files if you create the
>>>>>> repository locally.
>>>>>>
>>>>>> Now that you have the repository that contains everything you need
>>>>>> to build create a settings.xml with a mirror pointing to a
>>>>>> file-based repository. You shouldn’t need to build in offline mode
>>>>>> but using a file-base repository in your mirror will effectively be
>>>>>> the same. This
>>>> way
>>>>>> you will not be subject to every Maven plugins potentially flaking
>>>>>> handling of offline mode.
>>>>> Good idea, thanks! And with a mirror setup to file:/// (except for
>>>>> that file-based remote repo) we can even verify that no offline
>>>>> access is required.
>>>>>
>>>>> Cheers,
>>>>> Jörg
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------
>>>>> - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>> Thanks,
>>>>
>>>> Jason
>>>>
>>>> ----------------------------------------------------------
>>>> Jason van Zyl
>>>> Founder, Takari and Apache Maven
>>>> http://twitter.com/jvanzyl
>>>> http://twitter.com/takari_io
>>>> ---------------------------------------------------------
>>>>
>>>> To think is easy. To act is hard. But the hardest thing in the world
>>>> is to act in accordance with your thinking.
>>>>
>>>>   -- Johann von Goethe
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>
>> -- 
>> Ron Wheeler
>> President
>> Artifact Software Inc
>> email: rwheeler@artifact-software.com
>> skype: ronaldmwheeler
>> phone: 866-970-2435, ext 102
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder, Takari and Apache Maven
> http://twitter.com/jvanzyl
> http://twitter.com/takari_io
> ---------------------------------------------------------
>
> The most dangerous risk: spending your life not doing what you want on the bet you can buy yourself freedom to do it later.
>
>   -- Randy Komisar
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Offline builds nearly impossible

Posted by Jason van Zyl <ja...@takari.io>.
In this case they would not be better and far less convenient. For a hermetically sealed build at any rate. The local repository cache cleared of the tracking files serves as a perfectly fine remote repository for this use case. Most escrow bundles carry all the tools and sources required to build the product: packaging a repository manager would probably be a bit much.

> On Nov 13, 2015, at 2:09 PM, Ron Wheeler <rw...@artifact-software.com> wrote:
> 
> 
> Not sure if the extra work would be worthwhile when you have a number of free repo packages that are better in many ways than the maven cache and can be installed on Windows or Linux.
> 
> 
> Ron
> 
> On 13/11/2015 12:44 PM, cody.a.fyler@wellsfargo.com wrote:
>> I just wanted to weigh in.
>> 
>> This indeed does not function in what I would call an "intuitive" way.
>> 
>> It would be really nice if offline mode meant just provide the switch and everything used your local repo. No extra configuration or trickery required.
>> 
>> I know in modern times, the idea of always being connected is the norm, but if you KNOW you don't need any updates and you have a lot of deps, this could speed up the build a bit. Especially if you are forced to use a 3G connection for a build on an emergency basis in your job.
>> 
>> Then again, it would also be nice if Santa Claus were real.
>> 
>> When will Apache have their open source Santa project? ;)
>> 
>> Cody Fyler
>> Lending Grid Build Team
>> G=Lending Grid Builds
>> (515) – 441 - 0814
>> 
>> -----Original Message-----
>> From: Paul Benedict [mailto:pbenedict@apache.org]
>> Sent: Friday, November 13, 2015 11:27 AM
>> To: Maven Users List <us...@maven.apache.org>
>> Cc: joerg.schaible@gmx.de
>> Subject: Re: Offline builds nearly impossible
>> 
>> I think most people, at least once in their life, try to use their local repository cache as an offline remote repository. However, the two aren't the same in concept though, IIRC, the last time I tried. You still need to keep the two separate.
>> 
>> Now it would be interesting if a tool existed to copy the contents of a local repository and scrub its local metadata. That would then give you a true "remote offline repo".
>> 
>> 
>> Cheers,
>> Paul
>> 
>> On Fri, Nov 13, 2015 at 11:17 AM, Jason van Zyl <ja...@takari.io> wrote:
>> 
>>> If this does not work please let me know. This is what I’ve used in
>>> the past and if it doesn’t work I agree it needs to be fixed. I
>>> honestly haven’t tried making a hermetically sealed build in a few
>>> years but last year worked on a project that did no network traversal
>>> aside from using file-based repositories and it all worked fine.
>>> 
>>>> On Nov 13, 2015, at 11:33 AM, Jörg Schaible <jo...@gmx.de>
>>> wrote:
>>>> Hi Jason,
>>>> 
>>>> Jason van Zyl wrote:
>>>> 
>>>>> Use a file based remote repository instead of trying to build in
>>>>> offline mode.
>>>>> 
>>>>> You can either use a repository manager to create the remote
>>>>> repository
>>> or
>>>>> an empty local repository with a full build. As noted though, you
>>>>> have
>>> to
>>>>> remove all local repository metadata and files if you create the
>>>>> repository locally.
>>>>> 
>>>>> Now that you have the repository that contains everything you need
>>>>> to build create a settings.xml with a mirror pointing to a
>>>>> file-based repository. You shouldn’t need to build in offline mode
>>>>> but using a file-base repository in your mirror will effectively be
>>>>> the same. This
>>> way
>>>>> you will not be subject to every Maven plugins potentially flaking
>>>>> handling of offline mode.
>>>> Good idea, thanks! And with a mirror setup to file:/// (except for
>>>> that file-based remote repo) we can even verify that no offline
>>>> access is required.
>>>> 
>>>> Cheers,
>>>> Jörg
>>>> 
>>>> 
>>>> --------------------------------------------------------------------
>>>> - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>> 
>>> Thanks,
>>> 
>>> Jason
>>> 
>>> ----------------------------------------------------------
>>> Jason van Zyl
>>> Founder, Takari and Apache Maven
>>> http://twitter.com/jvanzyl
>>> http://twitter.com/takari_io
>>> ---------------------------------------------------------
>>> 
>>> To think is easy. To act is hard. But the hardest thing in the world
>>> is to act in accordance with your thinking.
>>> 
>>>  -- Johann von Goethe
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>> 
>>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> -- 
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

The most dangerous risk: spending your life not doing what you want on the bet you can buy yourself freedom to do it later.

 -- Randy Komisar












---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Offline builds nearly impossible

Posted by Ron Wheeler <rw...@artifact-software.com>.
Not sure if the extra work would be worthwhile when you have a number of 
free repo packages that are better in many ways than the maven cache and 
can be installed on Windows or Linux.


Ron

On 13/11/2015 12:44 PM, cody.a.fyler@wellsfargo.com wrote:
> I just wanted to weigh in.
>
> This indeed does not function in what I would call an "intuitive" way.
>
> It would be really nice if offline mode meant just provide the switch and everything used your local repo. No extra configuration or trickery required.
>
> I know in modern times, the idea of always being connected is the norm, but if you KNOW you don't need any updates and you have a lot of deps, this could speed up the build a bit. Especially if you are forced to use a 3G connection for a build on an emergency basis in your job.
>
> Then again, it would also be nice if Santa Claus were real.
>
> When will Apache have their open source Santa project? ;)
>
> Cody Fyler
> Lending Grid Build Team
> G=Lending Grid Builds
> (515) – 441 - 0814
>
> -----Original Message-----
> From: Paul Benedict [mailto:pbenedict@apache.org]
> Sent: Friday, November 13, 2015 11:27 AM
> To: Maven Users List <us...@maven.apache.org>
> Cc: joerg.schaible@gmx.de
> Subject: Re: Offline builds nearly impossible
>
> I think most people, at least once in their life, try to use their local repository cache as an offline remote repository. However, the two aren't the same in concept though, IIRC, the last time I tried. You still need to keep the two separate.
>
> Now it would be interesting if a tool existed to copy the contents of a local repository and scrub its local metadata. That would then give you a true "remote offline repo".
>
>
> Cheers,
> Paul
>
> On Fri, Nov 13, 2015 at 11:17 AM, Jason van Zyl <ja...@takari.io> wrote:
>
>> If this does not work please let me know. This is what I’ve used in
>> the past and if it doesn’t work I agree it needs to be fixed. I
>> honestly haven’t tried making a hermetically sealed build in a few
>> years but last year worked on a project that did no network traversal
>> aside from using file-based repositories and it all worked fine.
>>
>>> On Nov 13, 2015, at 11:33 AM, Jörg Schaible <jo...@gmx.de>
>> wrote:
>>> Hi Jason,
>>>
>>> Jason van Zyl wrote:
>>>
>>>> Use a file based remote repository instead of trying to build in
>>>> offline mode.
>>>>
>>>> You can either use a repository manager to create the remote
>>>> repository
>> or
>>>> an empty local repository with a full build. As noted though, you
>>>> have
>> to
>>>> remove all local repository metadata and files if you create the
>>>> repository locally.
>>>>
>>>> Now that you have the repository that contains everything you need
>>>> to build create a settings.xml with a mirror pointing to a
>>>> file-based repository. You shouldn’t need to build in offline mode
>>>> but using a file-base repository in your mirror will effectively be
>>>> the same. This
>> way
>>>> you will not be subject to every Maven plugins potentially flaking
>>>> handling of offline mode.
>>> Good idea, thanks! And with a mirror setup to file:/// (except for
>>> that file-based remote repo) we can even verify that no offline
>>> access is required.
>>>
>>> Cheers,
>>> Jörg
>>>
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>> Thanks,
>>
>> Jason
>>
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder, Takari and Apache Maven
>> http://twitter.com/jvanzyl
>> http://twitter.com/takari_io
>> ---------------------------------------------------------
>>
>> To think is easy. To act is hard. But the hardest thing in the world
>> is to act in accordance with your thinking.
>>
>>   -- Johann von Goethe
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Offline builds nearly impossible

Posted by co...@wellsfargo.com.
I just wanted to weigh in.

This indeed does not function in what I would call an "intuitive" way.

It would be really nice if offline mode meant just provide the switch and everything used your local repo. No extra configuration or trickery required.

I know in modern times, the idea of always being connected is the norm, but if you KNOW you don't need any updates and you have a lot of deps, this could speed up the build a bit. Especially if you are forced to use a 3G connection for a build on an emergency basis in your job.

Then again, it would also be nice if Santa Claus were real. 

When will Apache have their open source Santa project? ;)

Cody Fyler
Lending Grid Build Team
G=Lending Grid Builds
(515) – 441 - 0814

-----Original Message-----
From: Paul Benedict [mailto:pbenedict@apache.org] 
Sent: Friday, November 13, 2015 11:27 AM
To: Maven Users List <us...@maven.apache.org>
Cc: joerg.schaible@gmx.de
Subject: Re: Offline builds nearly impossible

I think most people, at least once in their life, try to use their local repository cache as an offline remote repository. However, the two aren't the same in concept though, IIRC, the last time I tried. You still need to keep the two separate.

Now it would be interesting if a tool existed to copy the contents of a local repository and scrub its local metadata. That would then give you a true "remote offline repo".


Cheers,
Paul

On Fri, Nov 13, 2015 at 11:17 AM, Jason van Zyl <ja...@takari.io> wrote:

> If this does not work please let me know. This is what I’ve used in 
> the past and if it doesn’t work I agree it needs to be fixed. I 
> honestly haven’t tried making a hermetically sealed build in a few 
> years but last year worked on a project that did no network traversal 
> aside from using file-based repositories and it all worked fine.
>
> > On Nov 13, 2015, at 11:33 AM, Jörg Schaible <jo...@gmx.de>
> wrote:
> >
> > Hi Jason,
> >
> > Jason van Zyl wrote:
> >
> >> Use a file based remote repository instead of trying to build in 
> >> offline mode.
> >>
> >> You can either use a repository manager to create the remote 
> >> repository
> or
> >> an empty local repository with a full build. As noted though, you 
> >> have
> to
> >> remove all local repository metadata and files if you create the 
> >> repository locally.
> >>
> >> Now that you have the repository that contains everything you need 
> >> to build create a settings.xml with a mirror pointing to a 
> >> file-based repository. You shouldn’t need to build in offline mode 
> >> but using a file-base repository in your mirror will effectively be 
> >> the same. This
> way
> >> you will not be subject to every Maven plugins potentially flaking 
> >> handling of offline mode.
> >
> > Good idea, thanks! And with a mirror setup to file:/// (except for 
> > that file-based remote repo) we can even verify that no offline 
> > access is required.
> >
> > Cheers,
> > Jörg
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder, Takari and Apache Maven
> http://twitter.com/jvanzyl
> http://twitter.com/takari_io
> ---------------------------------------------------------
>
> To think is easy. To act is hard. But the hardest thing in the world 
> is to act in accordance with your thinking.
>
>  -- Johann von Goethe
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Offline builds nearly impossible

Posted by Jörg Schaible <jo...@gmx.de>.
Paul Benedict wrote:

> I think most people, at least once in their life, try to use their local
> repository cache as an offline remote repository. However, the two aren't
> the same in concept though, IIRC, the last time I tried. You still need to
> keep the two separate.
> 
> Now it would be interesting if a tool existed to copy the contents of a
> local repository and scrub its local metadata. That would then give you a
> true "remote offline repo".

That's what Jason proposed. And what I will do. Actually I already have some 
bash scripts that create the metadata of a remote repo. I just do not have 
the clean-up yet. ;-)

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Offline builds nearly impossible

Posted by Paul Benedict <pb...@apache.org>.
I think most people, at least once in their life, try to use their local
repository cache as an offline remote repository. However, the two aren't
the same in concept though, IIRC, the last time I tried. You still need to
keep the two separate.

Now it would be interesting if a tool existed to copy the contents of a
local repository and scrub its local metadata. That would then give you a
true "remote offline repo".


Cheers,
Paul

On Fri, Nov 13, 2015 at 11:17 AM, Jason van Zyl <ja...@takari.io> wrote:

> If this does not work please let me know. This is what I’ve used in the
> past and if it doesn’t work I agree it needs to be fixed. I honestly
> haven’t tried making a hermetically sealed build in a few years but last
> year worked on a project that did no network traversal aside from using
> file-based repositories and it all worked fine.
>
> > On Nov 13, 2015, at 11:33 AM, Jörg Schaible <jo...@gmx.de>
> wrote:
> >
> > Hi Jason,
> >
> > Jason van Zyl wrote:
> >
> >> Use a file based remote repository instead of trying to build in offline
> >> mode.
> >>
> >> You can either use a repository manager to create the remote repository
> or
> >> an empty local repository with a full build. As noted though, you have
> to
> >> remove all local repository metadata and files if you create the
> >> repository locally.
> >>
> >> Now that you have the repository that contains everything you need to
> >> build create a settings.xml with a mirror pointing to a file-based
> >> repository. You shouldn’t need to build in offline mode but using a
> >> file-base repository in your mirror will effectively be the same. This
> way
> >> you will not be subject to every Maven plugins potentially flaking
> >> handling of offline mode.
> >
> > Good idea, thanks! And with a mirror setup to file:/// (except for that
> > file-based remote repo) we can even verify that no offline access is
> > required.
> >
> > Cheers,
> > Jörg
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder, Takari and Apache Maven
> http://twitter.com/jvanzyl
> http://twitter.com/takari_io
> ---------------------------------------------------------
>
> To think is easy. To act is hard. But the hardest thing in the world is to
> act in accordance with your thinking.
>
>  -- Johann von Goethe
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Offline builds nearly impossible

Posted by Jason van Zyl <ja...@takari.io>.
If this does not work please let me know. This is what I’ve used in the past and if it doesn’t work I agree it needs to be fixed. I honestly haven’t tried making a hermetically sealed build in a few years but last year worked on a project that did no network traversal aside from using file-based repositories and it all worked fine.

> On Nov 13, 2015, at 11:33 AM, Jörg Schaible <jo...@gmx.de> wrote:
> 
> Hi Jason,
> 
> Jason van Zyl wrote:
> 
>> Use a file based remote repository instead of trying to build in offline
>> mode.
>> 
>> You can either use a repository manager to create the remote repository or
>> an empty local repository with a full build. As noted though, you have to
>> remove all local repository metadata and files if you create the
>> repository locally.
>> 
>> Now that you have the repository that contains everything you need to
>> build create a settings.xml with a mirror pointing to a file-based
>> repository. You shouldn’t need to build in offline mode but using a
>> file-base repository in your mirror will effectively be the same. This way
>> you will not be subject to every Maven plugins potentially flaking
>> handling of offline mode.
> 
> Good idea, thanks! And with a mirror setup to file:/// (except for that 
> file-based remote repo) we can even verify that no offline access is 
> required.
> 
> Cheers,
> Jörg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

To think is easy. To act is hard. But the hardest thing in the world is to act in accordance with your thinking.

 -- Johann von Goethe













---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Offline builds nearly impossible

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Jason,

Jason van Zyl wrote:

> Use a file based remote repository instead of trying to build in offline
> mode.
> 
> You can either use a repository manager to create the remote repository or
> an empty local repository with a full build. As noted though, you have to
> remove all local repository metadata and files if you create the
> repository locally.
> 
> Now that you have the repository that contains everything you need to
> build create a settings.xml with a mirror pointing to a file-based
> repository. You shouldn’t need to build in offline mode but using a
> file-base repository in your mirror will effectively be the same. This way
> you will not be subject to every Maven plugins potentially flaking
> handling of offline mode.

Good idea, thanks! And with a mirror setup to file:/// (except for that 
file-based remote repo) we can even verify that no offline access is 
required.

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Offline builds nearly impossible

Posted by Jason van Zyl <ja...@takari.io>.
Use a file based remote repository instead of trying to build in offline mode. 

You can either use a repository manager to create the remote repository or an empty local repository with a full build. As noted though, you have to remove all local repository metadata and files if you create the repository locally. 

Now that you have the repository that contains everything you need to build create a settings.xml with a mirror pointing to a file-based repository. You shouldn’t need to build in offline mode but using a file-base repository in your mirror will effectively be the same. This way you will not be subject to every Maven plugins potentially flaking handling of offline mode.

> On Nov 13, 2015, at 7:54 AM, Jörg Schaible <jo...@swisspost.com> wrote:
> 
> Hi Stephen,
> 
> Stephen Connolly wrote:
> 
>> IOW
>> 
>> mvn -o -llr goal
>> 
>> Should do what you want where you have changed the repo url. The
>> _remote.repositories stores the URL of the repository not just the id.
> 
> My local repo was populated using Maven 3.3.8 or 3.3.9 and those files never 
> contained any URL.
> =============== %< ==============
> $ find local.repo -name _remote.repositories -exec grep '://' {} +
> $ cat local.repo/org/apache/maven/maven-model/3.1.0/_maven.repositories 
> #NOTE: This is an internal implementation file, its format can be changed 
> without prior notice.
> #Fri Nov 13 09:38:55 CET 2015
> maven-model-3.1.0.pom>maven-proxy=
> =============== %< ==============
> 
> therefore I've changed the URL in the settings to be sure, that no access is 
> possible.
> 
> As reported  it actually works for 3.1.1, 3.2.5 and 3.3.9 without -llr 
> unless the assembly plugin is used. And for 3.3.9 even -llr did not help, 
> again due to plugin incompatibilities.
> 
>> If you are doing offline, better would be to have a repository manager and
>> a hostname to host it at... but if you want to use a file:/// URL then you
>> need -llr AIUI
> 
> In an escrow situation, you certainly have no repo manager. You simply have 
> to ensure that the provided source, libraries and tools can be used to 
> recreate the product. However, the complete resolver mechanism is extremely 
> brittle in offline mode.
> 
> Cheers,
> Jörg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

Our achievements speak for themselves. What we have to keep track
of are our failures, discouragements and doubts. We tend to forget
the past difficulties, the many false starts, and the painful
groping. We see our past achievements as the end result of a
clean forward thrust, and our present difficulties as
signs of decline and decay.

 -- Eric Hoffer, Reflections on the Human Condition













---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Offline builds nearly impossible

Posted by Jörg Schaible <jo...@swisspost.com>.
Hi Stephen,

Stephen Connolly wrote:

> IOW
> 
> mvn -o -llr goal
> 
> Should do what you want where you have changed the repo url. The
> _remote.repositories stores the URL of the repository not just the id.

My local repo was populated using Maven 3.3.8 or 3.3.9 and those files never 
contained any URL.
=============== %< ==============
$ find local.repo -name _remote.repositories -exec grep '://' {} +
$ cat local.repo/org/apache/maven/maven-model/3.1.0/_maven.repositories 
#NOTE: This is an internal implementation file, its format can be changed 
without prior notice.
#Fri Nov 13 09:38:55 CET 2015
maven-model-3.1.0.pom>maven-proxy=
=============== %< ==============

therefore I've changed the URL in the settings to be sure, that no access is 
possible.

As reported  it actually works for 3.1.1, 3.2.5 and 3.3.9 without -llr 
unless the assembly plugin is used. And for 3.3.9 even -llr did not help, 
again due to plugin incompatibilities.
 
> If you are doing offline, better would be to have a repository manager and
> a hostname to host it at... but if you want to use a file:/// URL then you
> need -llr AIUI

In an escrow situation, you certainly have no repo manager. You simply have 
to ensure that the provided source, libraries and tools can be used to 
recreate the product. However, the complete resolver mechanism is extremely 
brittle in offline mode.

Cheers,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Offline builds nearly impossible

Posted by Stephen Connolly <st...@gmail.com>.
IOW

mvn -o -llr goal

Should do what you want where you have changed the repo url. The
_remote.repositories stores the URL of the repository not just the id.

If you are doing offline, better would be to have a repository manager and
a hostname to host it at... but if you want to use a file:/// URL then you
need -llr AIUI

On 13 November 2015 at 12:09, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> I would have tried the -llr command line option
>
> On 13 November 2015 at 11:58, Jörg Schaible <jo...@swisspost.com>
> wrote:
>
>> Hi folks,
>>
>> we have a requirement for a source code escrow
>> (https://en.wikipedia.org/wiki/Source_code_escrow). Therefore we intended
>> provide our source code with a local Maven repository that can be used for
>> offline builds. However, all attempts have been failed so far.
>>
>> What have we done:
>> 1/ Checked out the tagged versions of our software
>> 2/ Build it with M339 (mvn package) using an empty local Maven repo
>> As result all released artifacts are recreated in the target directories -
>> so far so good.
>>
>> As next step we took a copy of the local repo and of the cleaned sources
>> to
>> a new location and created naively a settings.xml containing two entries
>> only:
>> - the location to the copy of the local repo
>> - offline set to true
>>
>> We use JDK 1.7 and tried the different M3 versions (3.0.5, 3.1.1, 3.2.5,
>> 3.3.9):
>>
>> First try with Maven 3.0.5:
>> ============= %< ================
>> jos@josoo /tmp/kde-jos/offline $ mvn -s settings.xml -f source/pom.xml
>> clean
>> package
>> [INFO] Scanning for projects...
>> [ERROR] The build could not read 1 project -> [Help 1]
>> [ERROR]
>> [ERROR]   The project ip.users:ip-users-ear:4.4.1 (/tmp/kde-
>> jos/offline/source/ip.users/ip-users-ear/pom.xml) has 1 error
>> [ERROR]     Unresolveable build extension: Error resolving version for
>> plugin 'org.apache.maven.plugins:maven-eclipse-plugin' from the
>> repositories
>> [local (/tmp/kde-jos/offline/local.repo), central
>> (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin
>> repository -> [Help 2]
>> [ERROR]
>> [ERROR] To see the full stack trace of the errors, re-run Maven with the
>> -e
>> switch.
>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> [ERROR]
>> [ERROR] For more information about the errors and possible solutions,
>> please
>> read the following articles:
>> [ERROR] [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
>> [ERROR] [Help 2]
>>
>> http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException
>> ============= %< ================
>> $ ls -l local.repo/org/apache/maven/plugins/maven-eclipse-plugin/
>> drwxr-xr-x 2 jos jos 4096 Nov 13 09:47 2.10
>> ============= %< ================
>>
>> For whatever reason, it does not accept the maven-eclipse-plugin in the
>> local repo (although it is just declared, but not used in the build
>> itself).
>> (And yes, it has no sticky version, the newest might always create the
>> best
>> project...)
>>
>> Try with Maven 3.1.1/3.2.5/3.3.9 (all the same):
>> ============= %< ================
>> $ mvn -s settings.xml -f source/pom.xml clean package
>> [INFO] Scanning for projects...
>> [ERROR] The build could not read 1 project -> [Help 1]
>> [ERROR]
>> [ERROR]   The project builder:source:x-SNAPSHOT (/tmp/kde-
>> jos/offline/source/pom.xml) has 1 error
>> [ERROR]     Non-resolvable parent POM: Cannot access central
>> (http://repo.maven.apache.org/maven2) in offline mode and the artifact
>> com.scalaris.buildsystem.maven2:master:pom:274 has not been downloaded
>> from
>> it before. and 'parent.relativePath' points at no local POM @ line 6,
>> column
>> 13 -> [Help 2]
>> [ERROR]
>> [ERROR] To see the full stack trace of the errors, re-run Maven with the
>> -e
>> switch.
>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> [ERROR]
>> [ERROR] For more information about the errors and possible solutions,
>> please
>> read the following articles:
>> [ERROR] [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
>> [ERROR] [Help 2]
>>
>> http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
>> ============= %< ================
>> $ ls -l local.repo/com/scalaris/buildsystem/maven2/master
>> drwxr-xr-x 2 jos jos 4096 Nov 13 09:47 274
>> ============= %< ================
>>
>> The "unresolvable" parent is obviously available in the local repo.
>>
>> As next step we added an active profile to settings.xml with repository
>> definitions using the same ids we had originally, but with a URL pointing
>> to
>> nowhere (file:///). This makes no difference for M305, but all versions
>> 3.1.1 and higher start to accept the artifacts available in the local
>> repository ... unless the first project in the build uses the maven-
>> assembly-artifact:
>>
>> ============= %< ================
>> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-
>> plugin:2.4.1:single (create-assemblies) on project fileupload-app: Failed
>> to
>> create assembly: Unable to resolve dependencies for assembly 'app': Failed
>> to resolve dependencies for assembly: Missing:
>> [ERROR] ----------
>> [ERROR] 1) commons-codec:commons-codec:jar:1.6
>> [ERROR]
>> [ERROR] Try downloading the file manually from the project website.
>> [ERROR]
>> [ERROR] Then, install it using the command:
>> [ERROR] mvn install:install-file -DgroupId=commons-codec -
>> DartifactId=commons-codec -Dversion=1.6 -Dpackaging=jar
>> -Dfile=/path/to/file
>> [ERROR]
>> [ERROR] Alternatively, if you host your own repository you can deploy the
>> file there:
>> [ERROR] mvn deploy:deploy-file -DgroupId=commons-codec
>> -DartifactId=commons-
>> codec -Dversion=1.6 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -
>> DrepositoryId=[id]
>> [ERROR]
>> [ERROR] Path to dependency:
>> [ERROR] 1) com.essencio.components.fileupload:fileupload-app:jar:4.4.0
>> [ERROR] 2) com.scalaris.commons:scalaris-commons-run:jar:2.2.1
>> [ERROR] 3) com.scalaris.commons:scalaris-commons-lang:jar:2.6.1
>> [ERROR] 4) commons-codec:commons-codec:jar:1.6
>> [...]
>> ============= %< ================
>>
>> Again, all the "unavailable" artifacts are already in the local repo.
>>
>> Finally, using the -llr flag, the build with M311/M325 succeeds, but fails
>> still with M339, because a 3rd party plugin cannot find its dependencies
>> now:
>>
>> ============= %< ================
>> [ERROR] Failed to execute goal org.primefaces.extensions:resources-
>> optimizer-maven-plugin:1.0.0:optimize (optimize) on project ip-wwpbase:
>> Execution optimize of goal org.primefaces.extensions:resources-optimizer-
>> maven-plugin:1.0.0:optimize failed: Plugin
>> org.primefaces.extensions:resources-optimizer-maven-plugin:1.0.0 or one of
>> its dependencies could not be resolved: The following artifacts could not
>> be
>> resolved: org.apache.maven:maven-model:jar:3.1.0, org.apache.maven:maven-
>> artifact:jar:3.1.0, org.apache.maven:maven-settings:jar:3.1.0,
>> org.apache.maven:maven-settings-builder:jar:3.1.0, org.apache.maven:maven-
>> repository-metadata:jar:3.1.0, org.apache.maven:maven-model-
>> builder:jar:3.1.0, org.apache.maven:maven-aether-provider:jar:3.1.0,
>> org.codehaus.plexus:plexus-classworlds:jar:2.4.2: Cannot access scalaris-
>> plugin-release (file:///) in offline mode and the artifact
>> org.apache.maven:maven-model:jar:3.1.0 has not been downloaded from it
>> before. -> [Help 1]
>> ============= %< ================
>>
>> Again, all the "unavailable" artifacts are already in the local repo. It
>> seems M339 is missing some compatibility layer.
>>
>> However, offline builds are very hard to accomplish. They are definitely
>> no
>> fun.
>>
>> Cheers,
>> Jörg
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

Re: Offline builds nearly impossible

Posted by Stephen Connolly <st...@gmail.com>.
I would have tried the -llr command line option

On 13 November 2015 at 11:58, Jörg Schaible <jo...@swisspost.com>
wrote:

> Hi folks,
>
> we have a requirement for a source code escrow
> (https://en.wikipedia.org/wiki/Source_code_escrow). Therefore we intended
> provide our source code with a local Maven repository that can be used for
> offline builds. However, all attempts have been failed so far.
>
> What have we done:
> 1/ Checked out the tagged versions of our software
> 2/ Build it with M339 (mvn package) using an empty local Maven repo
> As result all released artifacts are recreated in the target directories -
> so far so good.
>
> As next step we took a copy of the local repo and of the cleaned sources to
> a new location and created naively a settings.xml containing two entries
> only:
> - the location to the copy of the local repo
> - offline set to true
>
> We use JDK 1.7 and tried the different M3 versions (3.0.5, 3.1.1, 3.2.5,
> 3.3.9):
>
> First try with Maven 3.0.5:
> ============= %< ================
> jos@josoo /tmp/kde-jos/offline $ mvn -s settings.xml -f source/pom.xml
> clean
> package
> [INFO] Scanning for projects...
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR]   The project ip.users:ip-users-ear:4.4.1 (/tmp/kde-
> jos/offline/source/ip.users/ip-users-ear/pom.xml) has 1 error
> [ERROR]     Unresolveable build extension: Error resolving version for
> plugin 'org.apache.maven.plugins:maven-eclipse-plugin' from the
> repositories
> [local (/tmp/kde-jos/offline/local.repo), central
> (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin
> repository -> [Help 2]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
> [ERROR] [Help 2]
>
> http://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException
> ============= %< ================
> $ ls -l local.repo/org/apache/maven/plugins/maven-eclipse-plugin/
> drwxr-xr-x 2 jos jos 4096 Nov 13 09:47 2.10
> ============= %< ================
>
> For whatever reason, it does not accept the maven-eclipse-plugin in the
> local repo (although it is just declared, but not used in the build
> itself).
> (And yes, it has no sticky version, the newest might always create the best
> project...)
>
> Try with Maven 3.1.1/3.2.5/3.3.9 (all the same):
> ============= %< ================
> $ mvn -s settings.xml -f source/pom.xml clean package
> [INFO] Scanning for projects...
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]
> [ERROR]   The project builder:source:x-SNAPSHOT (/tmp/kde-
> jos/offline/source/pom.xml) has 1 error
> [ERROR]     Non-resolvable parent POM: Cannot access central
> (http://repo.maven.apache.org/maven2) in offline mode and the artifact
> com.scalaris.buildsystem.maven2:master:pom:274 has not been downloaded from
> it before. and 'parent.relativePath' points at no local POM @ line 6,
> column
> 13 -> [Help 2]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
> [ERROR] [Help 2]
> http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
> ============= %< ================
> $ ls -l local.repo/com/scalaris/buildsystem/maven2/master
> drwxr-xr-x 2 jos jos 4096 Nov 13 09:47 274
> ============= %< ================
>
> The "unresolvable" parent is obviously available in the local repo.
>
> As next step we added an active profile to settings.xml with repository
> definitions using the same ids we had originally, but with a URL pointing
> to
> nowhere (file:///). This makes no difference for M305, but all versions
> 3.1.1 and higher start to accept the artifacts available in the local
> repository ... unless the first project in the build uses the maven-
> assembly-artifact:
>
> ============= %< ================
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-
> plugin:2.4.1:single (create-assemblies) on project fileupload-app: Failed
> to
> create assembly: Unable to resolve dependencies for assembly 'app': Failed
> to resolve dependencies for assembly: Missing:
> [ERROR] ----------
> [ERROR] 1) commons-codec:commons-codec:jar:1.6
> [ERROR]
> [ERROR] Try downloading the file manually from the project website.
> [ERROR]
> [ERROR] Then, install it using the command:
> [ERROR] mvn install:install-file -DgroupId=commons-codec -
> DartifactId=commons-codec -Dversion=1.6 -Dpackaging=jar
> -Dfile=/path/to/file
> [ERROR]
> [ERROR] Alternatively, if you host your own repository you can deploy the
> file there:
> [ERROR] mvn deploy:deploy-file -DgroupId=commons-codec
> -DartifactId=commons-
> codec -Dversion=1.6 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -
> DrepositoryId=[id]
> [ERROR]
> [ERROR] Path to dependency:
> [ERROR] 1) com.essencio.components.fileupload:fileupload-app:jar:4.4.0
> [ERROR] 2) com.scalaris.commons:scalaris-commons-run:jar:2.2.1
> [ERROR] 3) com.scalaris.commons:scalaris-commons-lang:jar:2.6.1
> [ERROR] 4) commons-codec:commons-codec:jar:1.6
> [...]
> ============= %< ================
>
> Again, all the "unavailable" artifacts are already in the local repo.
>
> Finally, using the -llr flag, the build with M311/M325 succeeds, but fails
> still with M339, because a 3rd party plugin cannot find its dependencies
> now:
>
> ============= %< ================
> [ERROR] Failed to execute goal org.primefaces.extensions:resources-
> optimizer-maven-plugin:1.0.0:optimize (optimize) on project ip-wwpbase:
> Execution optimize of goal org.primefaces.extensions:resources-optimizer-
> maven-plugin:1.0.0:optimize failed: Plugin
> org.primefaces.extensions:resources-optimizer-maven-plugin:1.0.0 or one of
> its dependencies could not be resolved: The following artifacts could not
> be
> resolved: org.apache.maven:maven-model:jar:3.1.0, org.apache.maven:maven-
> artifact:jar:3.1.0, org.apache.maven:maven-settings:jar:3.1.0,
> org.apache.maven:maven-settings-builder:jar:3.1.0, org.apache.maven:maven-
> repository-metadata:jar:3.1.0, org.apache.maven:maven-model-
> builder:jar:3.1.0, org.apache.maven:maven-aether-provider:jar:3.1.0,
> org.codehaus.plexus:plexus-classworlds:jar:2.4.2: Cannot access scalaris-
> plugin-release (file:///) in offline mode and the artifact
> org.apache.maven:maven-model:jar:3.1.0 has not been downloaded from it
> before. -> [Help 1]
> ============= %< ================
>
> Again, all the "unavailable" artifacts are already in the local repo. It
> seems M339 is missing some compatibility layer.
>
> However, offline builds are very hard to accomplish. They are definitely no
> fun.
>
> Cheers,
> Jörg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>