You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Eric Miles <er...@kronos.com> on 2008/01/29 16:00:54 UTC

proxied repositories -- plugin question

I have a managed repository that I intend to use as a proxy for several
remote repositories.  I'm doing a test and can't get the proxy to
resolve a plugin dependency to save my life.  It will however resolve
regular dependencies to same remote repository.  I am attempting to
proxy the Dev Java Net remote repoistory.

Here is my pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>archiva-test</groupId>
	<artifactId>archiva-test</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<description></description>
	<dependencies>
		<dependency>
			<groupId>org.j4j</groupId>
			<artifactId>j4j</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.jtb</groupId>
			<artifactId>quickr</artifactId>
			<version>0.8</version>
		</dependency>
	</dependencies>
	<repositories>
		<repository>
			<id>proxied</id>
			<url>
				http://myproxyserver/archiva/repository/proxied
			</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>proxied</id>
			<url>
				http://myproxyserver/archiva/repository/proxied
			</url>
		</pluginRepository>
	</pluginRepositories>
	<build>
		<resources>
			<resource>
				<filtering>true</filtering>
				<directory>src/main/resources</directory>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.jvnet.jaxb2.maven2</groupId>
				<artifactId>maven-jaxb2-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<schemaIncludes>
						<schemaInclude>**/*.xsd</schemaInclude>
					</schemaIncludes>
					<extension>true</extension>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

I have no problems resolving and proxying quickr and j4j dependencies,
but I get the following error for the jaxb2 maven plugin:

$ mvn clean package
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building Unnamed - archiva-test:archiva-test:jar:0.0.1-SNAPSHOT
[INFO]    task-segment: [clean, package]
[INFO]
------------------------------------------------------------------------
[INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking
for updates from proxied
[INFO] artifact org.jvnet.jaxb2.maven2:maven-jaxb2-plugin: checking for
updates from proxied
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The plugin 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin' does not
exist or no valid version could be found
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Tue Jan 29 09:38:40 EST 2008
[INFO] Final Memory: 1M/254M
[INFO]
------------------------------------------------------------------------


Any suggestions?  Thanks in advance.

Eric

Re: proxied repositories -- plugin question

Posted by Eric Miles <er...@kronos.com>.
The one in the Dev Java Net repo looks like this:
<metadata>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.1</version>
	<versioning>
<latest>0.5</latest>
<release>0.5</release>
	<versions>
<version>0.1</version>
<version>0.2</version>
<version>0.4</version>
<version>0.4.M1</version>
<version>0.4.M2</version>
<version>0.4.M3</version>
<version>0.5</version>
</versions>
<lastUpdated>20071215123957</lastUpdated>
</versioning>
</metadata>

The one in archiva looks like this:
<metadata>
<groupId>org.jvnet.jaxb2</groupId>
<artifactId>maven2</artifactId>
<version>maven-jaxb2-plugin</version>
<versioning>
<lastUpdated>20071215123957</lastUpdated>
</versioning>
</metadata>

On Tue, 2008-01-29 at 13:51 -0700, Wendy Smoak wrote:
> On Jan 29, 2008 1:44 PM, Eric Miles <er...@kronos.com> wrote:
> > Figured out my problem although not sure why it's NOT a problem when I
> > don't use Archiva.  This particular plugin (and no others) requires that
> > I specify the version in order for the dependency to be downloaded.
> > This isn't desirable as I'd like to have the upgrades to the plugins
> > when they happen, however this is a workaround.
> >
> > Is this particular plugin deployed incorrectly?  Is that why
> > archiva/maven can not find the correct current version information?
> 
> I'm curious, what does the maven-metadata.xml file look like through
> Archiva?  Does it match what you see in the remote repo?
> 
> (If it's missing the 'latest' and/or 'release' elements for a plugin,
> Maven will complain.)
> 
> FWIW, specifying the plugin version is a best practice to help ensure
> reproducible builds.
> 

Re: proxied repositories -- plugin question

Posted by Wendy Smoak <ws...@gmail.com>.
On Jan 29, 2008 1:44 PM, Eric Miles <er...@kronos.com> wrote:
> Figured out my problem although not sure why it's NOT a problem when I
> don't use Archiva.  This particular plugin (and no others) requires that
> I specify the version in order for the dependency to be downloaded.
> This isn't desirable as I'd like to have the upgrades to the plugins
> when they happen, however this is a workaround.
>
> Is this particular plugin deployed incorrectly?  Is that why
> archiva/maven can not find the correct current version information?

I'm curious, what does the maven-metadata.xml file look like through
Archiva?  Does it match what you see in the remote repo?

(If it's missing the 'latest' and/or 'release' elements for a plugin,
Maven will complain.)

FWIW, specifying the plugin version is a best practice to help ensure
reproducible builds.

-- 
Wendy

Re: proxied repositories -- plugin question

Posted by Eric Miles <er...@kronos.com>.
Figured out my problem although not sure why it's NOT a problem when I
don't use Archiva.  This particular plugin (and no others) requires that
I specify the version in order for the dependency to be downloaded.
This isn't desirable as I'd like to have the upgrades to the plugins
when they happen, however this is a workaround.

Is this particular plugin deployed incorrectly?  Is that why
archiva/maven can not find the correct current version information?

Thanks!
Eric
On Tue, 2008-01-29 at 10:00 -0500, Eric Miles wrote:
> I have a managed repository that I intend to use as a proxy for several
> remote repositories.  I'm doing a test and can't get the proxy to
> resolve a plugin dependency to save my life.  It will however resolve
> regular dependencies to same remote repository.  I am attempting to
> proxy the Dev Java Net remote repoistory.
> 
> Here is my pom:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> 	<modelVersion>4.0.0</modelVersion>
> 	<groupId>archiva-test</groupId>
> 	<artifactId>archiva-test</artifactId>
> 	<version>0.0.1-SNAPSHOT</version>
> 	<description></description>
> 	<dependencies>
> 		<dependency>
> 			<groupId>org.j4j</groupId>
> 			<artifactId>j4j</artifactId>
> 			<version>1.0</version>
> 		</dependency>
> 		<dependency>
> 			<groupId>javax.xml.bind</groupId>
> 			<artifactId>jaxb-api</artifactId>
> 			<version>2.1</version>
> 			<scope>compile</scope>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.jtb</groupId>
> 			<artifactId>quickr</artifactId>
> 			<version>0.8</version>
> 		</dependency>
> 	</dependencies>
> 	<repositories>
> 		<repository>
> 			<id>proxied</id>
> 			<url>
> 				http://myproxyserver/archiva/repository/proxied
> 			</url>
> 		</repository>
> 	</repositories>
> 	<pluginRepositories>
> 		<pluginRepository>
> 			<id>proxied</id>
> 			<url>
> 				http://myproxyserver/archiva/repository/proxied
> 			</url>
> 		</pluginRepository>
> 	</pluginRepositories>
> 	<build>
> 		<resources>
> 			<resource>
> 				<filtering>true</filtering>
> 				<directory>src/main/resources</directory>
> 			</resource>
> 		</resources>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.jvnet.jaxb2.maven2</groupId>
> 				<artifactId>maven-jaxb2-plugin</artifactId>
> 				<executions>
> 					<execution>
> 						<goals>
> 							<goal>generate</goal>
> 						</goals>
> 					</execution>
> 				</executions>
> 				<configuration>
> 					<schemaIncludes>
> 						<schemaInclude>**/*.xsd</schemaInclude>
> 					</schemaIncludes>
> 					<extension>true</extension>
> 				</configuration>
> 			</plugin>
> 		</plugins>
> 	</build>
> </project>
> 
> I have no problems resolving and proxying quickr and j4j dependencies,
> but I get the following error for the jaxb2 maven plugin:
> 
> $ mvn clean package
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Unnamed - archiva-test:archiva-test:jar:0.0.1-SNAPSHOT
> [INFO]    task-segment: [clean, package]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking
> for updates from proxied
> [INFO] artifact org.jvnet.jaxb2.maven2:maven-jaxb2-plugin: checking for
> updates from proxied
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin' does not
> exist or no valid version could be found
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Tue Jan 29 09:38:40 EST 2008
> [INFO] Final Memory: 1M/254M
> [INFO]
> ------------------------------------------------------------------------
> 
> 
> Any suggestions?  Thanks in advance.
> 
> Eric