You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Marilyn Sander -X (marilysa - Digital-X, Inc. at Cisco)" <ma...@cisco.com> on 2007/02/10 02:57:01 UTC

How to build offline??

Hi, all.
 
I understood that it should be possible to do a Maven build offline,
that is, with no connection to any repository except the local
repository.  I understand that all necessary artifacts have to already
be in the local repository.
 
In fact, I did this exercise a couple of months ago with great success.
But Maven seems to have changed in the meantime.
 
I have a situation where I just did a build using a local repository.
The build succeeded.  From that success, I assumed that all necessary
artifacts had been downloaded to the local repository.   I then tried to
repeat that build using the "-o" parameter to Maven, using that very
same local repository.  The build failed because some artifacts were
missing.  I re-ran it with " -o -e " as recommend, but got no additional
information.  Can someone explain what is going on? Should I file a JIRA
report?
 
I received the messages below.  Three artifacts are missing.  In all
three cases the pom file and its checksum file are present, but no
corresponding jar file.  In the dependency paths to the three jar files,
some of the artifacts have jar files in the local repository and some
have only the pom file.    But if the jar files are needed, how could
the original build have run successfully?  Also, my repository does not
have dummy:dummy.  Can anyone explain what dummy:dummy is?
 
I could start downloading things manually, but (a) I thought it should
not be necessary, and (b) I could end up having to download dozens of
things manually, as this is a very large build.
 
Thanks for any insights that could be provided.
 
--Marilyn Sander
 
     [exec] Missing:
     [exec] ----------
     [exec] 1) classworlds:classworlds:jar:1.1-alpha-2
 
     [exec]   Try downloading the file manually from the project
website.
 
     [exec]   Then, install it using the command:
     [exec]       mvn install:install-file -DgroupId=classworlds
-DartifactId=classworlds \
     [exec]           -Dversion=1.1-alpha-2 -Dpackaging=jar
-Dfile=/path/to/file
 
     [exec]   Path to dependency:
     [exec]     1) dummy:dummy:jar:1.0
     [exec]     2)
org.apache.maven.surefire:surefire-booter:jar:2.3-SNAPSHOT
     [exec]     3) org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-7
     [exec]     4)
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
     [exec]     5) classworlds:classworlds:jar:1.1-alpha-2
 
     [exec] 2)
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
 
     [exec]   Try downloading the file manually from the project
website.
 
     [exec]   Then, install it using the command:
     [exec]       mvn install:install-file -DgroupId=org.codehaus.plexus
-DartifactId=plexus-container-default \
     [exec]           -Dversion=1.0-alpha-8 -Dpackaging=jar
-Dfile=/path/to/file
 
     [exec]   Path to dependency:
     [exec]     1) dummy:dummy:jar:1.0
     [exec]     2)
org.apache.maven.surefire:surefire-booter:jar:2.3-SNAPSHOT
     [exec]     3) org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-7
     [exec]     4)
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
 
     [exec] 3) org.codehaus.plexus:plexus-utils:jar:1.1
 
     [exec]   Try downloading the file manually from the project
website.
 
     [exec]   Then, install it using the command:
     [exec]       mvn install:install-file -DgroupId=org.codehaus.plexus
-DartifactId=plexus-utils \
     [exec]           -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file
 
     [exec]   Path to dependency:
     [exec]     1) dummy:dummy:jar:1.0
     [exec]     2)
org.apache.maven.surefire:surefire-booter:jar:2.3-SNAPSHOT
     [exec]     3) org.codehaus.plexus:plexus-utils:jar:1.1
 
     [exec] ----------
     [exec] 3 required artifacts are missing.
     [exec] for artifact:
     [exec]   dummy:dummy:jar:1.0
 
     [exec] from the specified remote repositories:
     [exec]   central (http://maven.cisco.com/maven-proxy/repository),
     [exec]   bounty-build-proxy
(http://bounty-build.cisco.com/maven-proxy/repository)
 

     [exec] NOTE: Maven is executing in offline mode. Any artifacts not
already in your local
     [exec] repository will be inaccessible.

 
 

Re: How to build offline??

Posted by Arnaud Bailly <ab...@oqube.com>.
"Marilyn Sander -X (marilysa - Digital-X, Inc. at Cisco)" <ma...@cisco.com> writes:

> Hi, all.
>  
Hi,
Maybe trying with mvn -X -o could give some more informations.


-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


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


Filtering and Eclipse

Posted by Gu...@tietoenator.com.
Hi,

In out project we try to use Maven 2 and Eclipse together, but now I run
into one issue with filtered resources.
When I set up my project I do mvn eclipse:eclipse.

When I do mvn process-resources my resource get filtered as it should.
But when I do Project->Clean... In Eclipse my resource will not get
filtered only copied to target/classes.

Is there any way to make Eclipse filter my resources autmatically?

Of cause one can do a mvn process-resources afterwards but it is easy to
forget.

Regards
Gunnar

 

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


RE: How to build offline??

Posted by "Marilyn Sander -X (marilysa - Digital-X, Inc. at Cisco)" <ma...@cisco.com>.
Hello, Maven experts.

Here is additional information about my troubles with building offline.

To recap:  a build which completed successfully has failed when re-run
offline 
immediately afterward, using  the same local repository.  The failure
was due to 
missing  artifacts related to  surefire-booter.  I'm trying to figure
out whether 
there is a bug that needs to be  fixed, and if so where.  Also, am
trying to 
figure out a way to work around the problem, perhaps by simply creating
a static 
internal remote repository.

As suggested, I have done runs with -X and -e, but the trace showed
nothing that
I could identify as significant, except that the logic for dependency
resolution
when running offline seemed to be different from the logic when running
online.  
A few things seemed to happen in a different order.  

I've done additional runs, with these results:

1.  Starting with an empty local repository, do a build online.  Capture
stderr
    and stdout in a log file.  Looking at the log file, I see that these
jars
    are "selected for runtime", but do not get downloaded:
	
org.plexus.plexus:plexus-container-default:jar:1.0-alpha-8
		org.codehaus.plexus:plexus-utils:jar:1.1
		classworlds:classworlds:jar:1.1-alpha-2
    I also see that various versions of plexus-utils get selected and
then "removed",
    but no version of its jar file gets downloaded.  

    Save the contents of the resulting local repository.

2.  Empty the build area (it's ClearCase, so I just remove view-private
elements)
    and run again offline using the local repository contents from run
1.  The 
    build fails because the above three jar files are not in the local
repository.

3.  Empty the build area again.  Run online using the repository
contents from 
    run 1 (NOT run 2).  The build is successful again.  This time the
log file shows that 
    the three jar files do get downloaded.

    Save the new contents of the resulting local repository.

4.  Empty the build area, and run again offline using the content of the
local
    repository from run 3.  This time the offline build is successful.

I observed that the three missing jar files are all dependencies (direct
or transitive)
of org.apache.maven.surefire:surefire-booter:jar:2.3-SNAPSHOT.

I am really concerned about this.  We originally thought that a way to
guarantee 
repeatable builds would be to save the contents of the local repository,
the environment,
and the source code configuration.   Now it seems the contents of the
local repository
cannot be relied upon.

Thoughts, anyone?  Do I have enough data to file a JIRA report?  Would
that be in 
order?  If so, would it be against maven core, against surefire, or
against the reactor?

Or would it be more appropriate to find a version of surefire-booter
that is not
a SNAPSHOT?

thanks,
--Marilyn Sander
    



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


Re: How to build offline??

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
Hi,

Looks like you are running with snapshots enabled (surefire plugin uses
v2.3-SNAPSHOT) - not sure how exactly maven behaves when snapshot
versions of plugins are enabled, but it may be that it requires to be
online all the time.

Regards,

Johan

Marilyn Sander -X (marilysa - Digital-X, Inc. at Cisco) wrote:
> Hi, all.
>  
> I understood that it should be possible to do a Maven build offline,
> that is, with no connection to any repository except the local
> repository.  I understand that all necessary artifacts have to already
> be in the local repository.
>  
> In fact, I did this exercise a couple of months ago with great success.
> But Maven seems to have changed in the meantime.
>  
> I have a situation where I just did a build using a local repository.
> The build succeeded.  From that success, I assumed that all necessary
> artifacts had been downloaded to the local repository.   I then tried to
> repeat that build using the "-o" parameter to Maven, using that very
> same local repository.  The build failed because some artifacts were
> missing.  I re-ran it with " -o -e " as recommend, but got no additional
> information.  Can someone explain what is going on? Should I file a JIRA
> report?
>  
> I received the messages below.  Three artifacts are missing.  In all
> three cases the pom file and its checksum file are present, but no
> corresponding jar file.  In the dependency paths to the three jar files,
> some of the artifacts have jar files in the local repository and some
> have only the pom file.    But if the jar files are needed, how could
> the original build have run successfully?  Also, my repository does not
> have dummy:dummy.  Can anyone explain what dummy:dummy is?
>  
> I could start downloading things manually, but (a) I thought it should
> not be necessary, and (b) I could end up having to download dozens of
> things manually, as this is a very large build.
>  
> Thanks for any insights that could be provided.
>  
> --Marilyn Sander
>  
>      [exec] Missing:
>      [exec] ----------
>      [exec] 1) classworlds:classworlds:jar:1.1-alpha-2
>  
>      [exec]   Try downloading the file manually from the project
> website.
>  
>      [exec]   Then, install it using the command:
>      [exec]       mvn install:install-file -DgroupId=classworlds
> -DartifactId=classworlds \
>      [exec]           -Dversion=1.1-alpha-2 -Dpackaging=jar
> -Dfile=/path/to/file
>  
>      [exec]   Path to dependency:
>      [exec]     1) dummy:dummy:jar:1.0
>      [exec]     2)
> org.apache.maven.surefire:surefire-booter:jar:2.3-SNAPSHOT
>      [exec]     3) org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-7
>      [exec]     4)
> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
>      [exec]     5) classworlds:classworlds:jar:1.1-alpha-2
>  
>      [exec] 2)
> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
>  
>      [exec]   Try downloading the file manually from the project
> website.
>  
>      [exec]   Then, install it using the command:
>      [exec]       mvn install:install-file -DgroupId=org.codehaus.plexus
> -DartifactId=plexus-container-default \
>      [exec]           -Dversion=1.0-alpha-8 -Dpackaging=jar
> -Dfile=/path/to/file
>  
>      [exec]   Path to dependency:
>      [exec]     1) dummy:dummy:jar:1.0
>      [exec]     2)
> org.apache.maven.surefire:surefire-booter:jar:2.3-SNAPSHOT
>      [exec]     3) org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-7
>      [exec]     4)
> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
>  
>      [exec] 3) org.codehaus.plexus:plexus-utils:jar:1.1
>  
>      [exec]   Try downloading the file manually from the project
> website.
>  
>      [exec]   Then, install it using the command:
>      [exec]       mvn install:install-file -DgroupId=org.codehaus.plexus
> -DartifactId=plexus-utils \
>      [exec]           -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file
>  
>      [exec]   Path to dependency:
>      [exec]     1) dummy:dummy:jar:1.0
>      [exec]     2)
> org.apache.maven.surefire:surefire-booter:jar:2.3-SNAPSHOT
>      [exec]     3) org.codehaus.plexus:plexus-utils:jar:1.1
>  
>      [exec] ----------
>      [exec] 3 required artifacts are missing.
>      [exec] for artifact:
>      [exec]   dummy:dummy:jar:1.0
>  
>      [exec] from the specified remote repositories:
>      [exec]   central (http://maven.cisco.com/maven-proxy/repository),
>      [exec]   bounty-build-proxy
> (http://bounty-build.cisco.com/maven-proxy/repository)
>  
> 
>      [exec] NOTE: Maven is executing in offline mode. Any artifacts not
> already in your local
>      [exec] repository will be inaccessible.
> 
>  
>  
> 

-- 
you too?

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