You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Khin, Gerald" <Ge...@ids-scheer.com> on 2006/03/11 17:19:17 UTC

[m2,maven-proxy,newbie] Struggling with maven-proxy

Hi!
 
I'm new m2 and maven-proxy and struggling to get it working.
 
If I call "mvn clean", then the console debug output shows:
 
[INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from wollox-plugin-repo
[DEBUG] repository metadata for: 'artifact org.apache.maven.plugins:maven-clean-plugin' could not be found on repository
: wollox-plugin-repo
[INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from central
[DEBUG] maven-clean-plugin: resolved to version 2.1 from repository central
[DEBUG] Trying repository central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.1/maven-clean-plugin-2.1.pom
703b downloaded
...
 
 
It appears that my maven-proxy instance was tried to be used, but that something went wrong there so that things were retrieved from central at the end . The console output of maven-proxy is:
 
 
Y:\maven-proxy>java -jar maven-proxy-standalone-0.2-app.jar maven-proxy.properties
maven-proxy Unversioned
2006-03-11 16:44:06,406 [INFO ] proxy.config.RepoConfiguration  - Disabling snapshot cache
2006-03-11 16:44:06,421 [INFO ] proxy.config.RepoConfiguration  - Disabling snapshot cache
2006-03-11 16:44:06,421 [INFO ] proxy.config.RepoConfiguration  - Repo[www-ibiblio-org]: Enabling cache with period of 3
600 seconds
2006-03-11 16:44:06,421 [INFO ] proxy.config.RepoConfiguration  - Repo[dist-codehaus-org]: Enabling cache with period of
 3600 seconds
Saving repository at U:///Modules/maven/remote-repo
Scanning repository: file:///U:///Modules/maven/remote-repo
Scanning repository: file:///./target/repo-local
Scanning repository: http://www.ibiblio.org/maven
Scanning repository: http://dist.codehaus.org
Starting...
Prefix: 'repository'
Started.
Add the following to your ~/build.properties file:
   maven.repo.remote=http://localhost:1516/repository
The proxy can be managed at http://localhost:1516
The repository can be browsed at http://localhost:1516/repository
Repository searching is enabled.
2006-03-11 16:44:48,281 [INFO ] proxy.servlets.RepositoryServlet  - Received request: /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
2006-03-11 16:44:48,296 [DEBUG] proxy.engine.DownloadEngine  - Request: source=127.0.0.1, path=/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml, lastModified=-1, headOnly=false, ifModifiedSince=-1
2006-03-11 16:44:48,296 [WARN ] proxy.engine.DownloadEngine  - Neither If-Modified-Since nor Last-Modified are set
2006-03-11 16:44:48,296 [DEBUG] proxy.config.FileRepoConfiguration  - Repo[global]: Checking last modified time for U:\Modules\maven\remote-repo\org\apache\maven\plugins\maven-clean-plugin\maven-metadata.xml
2006-03-11 16:44:48,312 [DEBUG] proxy.config.FileRepoConfiguration  - Repo[local-repo]: Checking last modified time for .\target\repo-local\org\apache\maven\plugins\maven-clean-plugin\maven-metadata.xml
2006-03-11 16:44:48,312 [DEBUG] components.impl.DefaultSnapshotCache  - Unable to find /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml in snapshot cache
2006-03-11 16:44:48,312 [INFO ] proxy.config.HttpRepoConfiguration  - Repo[www-ibiblio-org]: Checking last modified time for http://www.ibiblio.org/maven/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
2006-03-11 16:44:48,875 [INFO ] components.impl.DefaultSnapshotCache  - Adding /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml to snapshot cache
2006-03-11 16:44:48,875 [DEBUG] components.impl.DefaultSnapshotCache  - Unable to find /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml in snapshot cache
2006-03-11 16:44:48,875 [INFO ] proxy.config.HttpRepoConfiguration  - Repo[dist-codehaus-org]: Checking last modified time for http://dist.codehaus.org/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
2006-03-11 16:44:49,218 [INFO ] components.impl.DefaultSnapshotCache  - Adding /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml to snapshot cache
2006-03-11 16:44:49,218 [INFO ] proxy.engine.DownloadEngine  - Artifact not found: /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
...
 
What could I have done wrong?
 
My pom.xml looks like this:
 
  <pluginRepositories>
    <pluginRepository>
      <id>wollox-plugin-repo</id>
      <url>http://localhost:1516/repository</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
      <layout>default</layout>
    </pluginRepository>
  </pluginRepositories>

 
Regards
Gerald
 

Re: [m2,maven-proxy,newbie] Struggling with maven-proxy

Posted by Alexandre Poitras <al...@gmail.com>.
No problem, Maven-Proxy is a pain in the a** for the moment but they
are going to release Maven-repository-browser in the near future wich
integrates it and look like having a lot of nice features. By the way,
if you want to search you proxy repository, Maven-proxy has an
administration web tool wich can be reached on the port 9999.

On 3/12/06, Khin, Gerald <Ge...@ids-scheer.com> wrote:
>
> On 3/11/06, Khin, Gerald <Ge...@ids-scheer.com> wrote:
> > [...]
> > So there seems to be still something else that is not correct.
>
> In spite of missing no trip wires on my way I managed it in the end.
>
> The culprit was the line
>
> repo.www-ibiblio-org.url=http://www.ibiblio.org/maven
>
> in my maven-proxy.properties configuration file. After replacing it by
>
> repo.www-ibiblio-org.url=http://www.ibiblio.org/maven2
>
> everything works like a charm.
>
> Thanks a lot, Alexandre, to point me to the right direction.
>
> Regards
> Gerald
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Alexandre Poitras
Québec, Canada

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


Re: [m2,maven-proxy,newbie] Struggling with maven-proxy

Posted by "Khin, Gerald" <Ge...@ids-scheer.com>.
On 3/11/06, Khin, Gerald <Ge...@ids-scheer.com> wrote:
> [...]
> So there seems to be still something else that is not correct.

In spite of missing no trip wires on my way I managed it in the end.

The culprit was the line 

repo.www-ibiblio-org.url=http://www.ibiblio.org/maven

in my maven-proxy.properties configuration file. After replacing it by

repo.www-ibiblio-org.url=http://www.ibiblio.org/maven2

everything works like a charm.

Thanks a lot, Alexandre, to point me to the right direction.

Regards
Gerald





Re: [m2,maven-proxy,newbie] Struggling with maven-proxy

Posted by "Khin, Gerald" <Ge...@ids-scheer.com>.
On 3/11/06, Poitras , Alexandre <al...@gmail.com> wrote:
> You have to declare it as mirror of central in your settings.xml file.

OK. I added these lines to my settings.xml:

    <mirrors>
        <mirror>
            <id>wolloxmirror</id>
            <name>wollox mirror</name>
            <url>http://localhost:1516/repository</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>

And I modified my pom.xml so that there are no repository nor pluginRepositories specifications anymore.

Now, when calling "mvn clean" the following happens:

[INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from central
[DEBUG] repository metadata for: 'artifact org.apache.maven.plugins:maven-clean-plugin' could not be found on repository
: central
[DEBUG] maven-clean-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the latest version

  org.apache.maven.plugins:maven-clean-plugin:pom:LATEST


[DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-clean-plugin:pom:LATEST
[DEBUG] maven-clean-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the release version

  org.apache.maven.plugins:maven-clean-plugin:pom:RELEASE


[DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-clean-plugin:pom:RELEASE
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-clean-plugin' does not exist or no valid version could be found
[INFO] ----------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-clean-plugin' does no
t exist or no valid version could be found
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1247)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1483)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:9
79)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:
943)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:450)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
a:303)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-cl
ean-plugin' does not exist or no valid version could be found
        at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.
java:225)
        at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.
java:87)
        at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:160)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1218)
        ... 18 more


And my maven-proxy instances shows:

Y:\maven-proxy>java -jar maven-proxy-standalone-0.2-app.jar maven-proxy.properties
maven-proxy Unversioned
2006-03-12 09:14:36,265 [INFO ] proxy.config.RepoConfiguration  - Disabling snapshot cache
2006-03-12 09:14:36,281 [INFO ] proxy.config.RepoConfiguration  - Disabling snapshot cache
2006-03-12 09:14:36,281 [INFO ] proxy.config.RepoConfiguration  - Repo[www-ibiblio-org]: Enabling cache with period of 3
600 seconds
2006-03-12 09:14:36,281 [INFO ] proxy.config.RepoConfiguration  - Repo[dist-codehaus-org]: Enabling cache with period of
 3600 seconds
Saving repository at U:///Modules/maven/remote-repo
Scanning repository: file:///U:///Modules/maven/remote-repo
Scanning repository: file:///./target/repo-local
Scanning repository: http://www.ibiblio.org/maven
Scanning repository: http://dist.codehaus.org
Starting...
Prefix: 'repository'
Started.
Add the following to your ~/build.properties file:
   maven.repo.remote=http://localhost:1516/repository
The proxy can be managed at http://localhost:1516
The repository can be browsed at http://localhost:1516/repository
Repository searching is enabled.
2006-03-12 09:14:55,078 [INFO ] proxy.servlets.RepositoryServlet  - Received request: /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
2006-03-12 09:14:55,078 [DEBUG] proxy.engine.DownloadEngine  - Request: source=127.0.0.1, path=/org/apache/maven/plugins /maven-clean-plugin/maven-metadata.xml, lastModified=-1, headOnly=false, ifModifiedSince=-1
2006-03-12 09:14:55,093 [WARN ] proxy.engine.DownloadEngine  - Neither If-Modified-Since nor Last-Modified are set
2006-03-12 09:14:55,093 [DEBUG] proxy.config.FileRepoConfiguration  - Repo[global]: Checking last modified time for U:\Modules\maven\remote-repo\org\apache\maven\plugins\maven-clean-plugin\maven-metadata.xml
2006-03-12 09:14:55,093 [DEBUG] proxy.config.FileRepoConfiguration  - Repo[local-repo]: Checking last modified time for .\target\repo-local\org\apache\maven\plugins\maven-clean-plugin\maven-metadata.xml
2006-03-12 09:14:55,093 [DEBUG] components.impl.DefaultSnapshotCache  - Unable to find /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml in snapshot cache
2006-03-12 09:14:55,109 [INFO ] proxy.config.HttpRepoConfiguration  - Repo[www-ibiblio-org]: Checking last modified time
 for http://www.ibiblio.org/maven/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
2006-03-12 09:14:56,390 [INFO ] components.impl.DefaultSnapshotCache  - Adding /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml to snapshot cache
2006-03-12 09:14:56,390 [DEBUG] components.impl.DefaultSnapshotCache  - Unable to find /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml in snapshot cache
2006-03-12 09:14:56,390 [INFO ] proxy.config.HttpRepoConfiguration  - Repo[dist-codehaus-org]: Checking last modified time for http://dist.codehaus.org/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
2006-03-12 09:14:56,750 [INFO ] components.impl.DefaultSnapshotCache  - Adding /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml to snapshot cache
2006-03-12 09:14:56,750 [INFO ] proxy.engine.DownloadEngine  - Artifact not found: /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml


So there seems to be still something else that is not correct.

> It is very important to understand that a proxy is not a true
> repository. It is always confused because a lot of people share their
> proxy *cache* (where the artifacts are copied) and their internal
> corporation repository in case their internet access go down.
> Well that's what I do.

Regards
Gerald



Re: [m2,maven-proxy,newbie] Struggling with maven-proxy

Posted by Alexandre Poitras <al...@gmail.com>.
You have to declare it as mirror of central in your settings.xml file.
It is very important to understand that a proxy is not a true
repository. It is always confused because a lot of people share their
proxy *cache* (where the artifacts are copied) and their internal
corporation repository in case their internet access go down.
Well that's what I do.


On 3/11/06, Khin, Gerald <Ge...@ids-scheer.com> wrote:
> Hi!
>
> I'm new m2 and maven-proxy and struggling to get it working.
>
> If I call "mvn clean", then the console debug output shows:
>
> [INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from wollox-plugin-repo
> [DEBUG] repository metadata for: 'artifact org.apache.maven.plugins:maven-clean-plugin' could not be found on repository
> : wollox-plugin-repo
> [INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for updates from central
> [DEBUG] maven-clean-plugin: resolved to version 2.1 from repository central
> [DEBUG] Trying repository central
> Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.1/maven-clean-plugin-2.1.pom
> 703b downloaded
> ...
>
>
> It appears that my maven-proxy instance was tried to be used, but that something went wrong there so that things were retrieved from central at the end . The console output of maven-proxy is:
>
>
> Y:\maven-proxy>java -jar maven-proxy-standalone-0.2-app.jar maven-proxy.properties
> maven-proxy Unversioned
> 2006-03-11 16:44:06,406 [INFO ] proxy.config.RepoConfiguration  - Disabling snapshot cache
> 2006-03-11 16:44:06,421 [INFO ] proxy.config.RepoConfiguration  - Disabling snapshot cache
> 2006-03-11 16:44:06,421 [INFO ] proxy.config.RepoConfiguration  - Repo[www-ibiblio-org]: Enabling cache with period of 3
> 600 seconds
> 2006-03-11 16:44:06,421 [INFO ] proxy.config.RepoConfiguration  - Repo[dist-codehaus-org]: Enabling cache with period of
>  3600 seconds
> Saving repository at U:///Modules/maven/remote-repo
> Scanning repository: file:///U:///Modules/maven/remote-repo
> Scanning repository: file:///./target/repo-local
> Scanning repository: http://www.ibiblio.org/maven
> Scanning repository: http://dist.codehaus.org
> Starting...
> Prefix: 'repository'
> Started.
> Add the following to your ~/build.properties file:
>    maven.repo.remote=http://localhost:1516/repository
> The proxy can be managed at http://localhost:1516
> The repository can be browsed at http://localhost:1516/repository
> Repository searching is enabled.
> 2006-03-11 16:44:48,281 [INFO ] proxy.servlets.RepositoryServlet  - Received request: /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
> 2006-03-11 16:44:48,296 [DEBUG] proxy.engine.DownloadEngine  - Request: source=127.0.0.1, path=/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml, lastModified=-1, headOnly=false, ifModifiedSince=-1
> 2006-03-11 16:44:48,296 [WARN ] proxy.engine.DownloadEngine  - Neither If-Modified-Since nor Last-Modified are set
> 2006-03-11 16:44:48,296 [DEBUG] proxy.config.FileRepoConfiguration  - Repo[global]: Checking last modified time for U:\Modules\maven\remote-repo\org\apache\maven\plugins\maven-clean-plugin\maven-metadata.xml
> 2006-03-11 16:44:48,312 [DEBUG] proxy.config.FileRepoConfiguration  - Repo[local-repo]: Checking last modified time for .\target\repo-local\org\apache\maven\plugins\maven-clean-plugin\maven-metadata.xml
> 2006-03-11 16:44:48,312 [DEBUG] components.impl.DefaultSnapshotCache  - Unable to find /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml in snapshot cache
> 2006-03-11 16:44:48,312 [INFO ] proxy.config.HttpRepoConfiguration  - Repo[www-ibiblio-org]: Checking last modified time for http://www.ibiblio.org/maven/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
> 2006-03-11 16:44:48,875 [INFO ] components.impl.DefaultSnapshotCache  - Adding /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml to snapshot cache
> 2006-03-11 16:44:48,875 [DEBUG] components.impl.DefaultSnapshotCache  - Unable to find /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml in snapshot cache
> 2006-03-11 16:44:48,875 [INFO ] proxy.config.HttpRepoConfiguration  - Repo[dist-codehaus-org]: Checking last modified time for http://dist.codehaus.org/org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
> 2006-03-11 16:44:49,218 [INFO ] components.impl.DefaultSnapshotCache  - Adding /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml to snapshot cache
> 2006-03-11 16:44:49,218 [INFO ] proxy.engine.DownloadEngine  - Artifact not found: /org/apache/maven/plugins/maven-clean-plugin/maven-metadata.xml
> ...
>
> What could I have done wrong?
>
> My pom.xml looks like this:
>
>   <pluginRepositories>
>     <pluginRepository>
>       <id>wollox-plugin-repo</id>
>       <url>http://localhost:1516/repository</url>
>       <snapshots>
>         <enabled>true</enabled>
>       </snapshots>
>       <releases>
>         <enabled>true</enabled>
>       </releases>
>       <layout>default</layout>
>     </pluginRepository>
>   </pluginRepositories>
>
>
> Regards
> Gerald
>
>
>


--
Alexandre Poitras
Québec, Canada

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