Weird problem downloading snapshots with Nexus
Hello, This morning, I updated our Nexus version from 1.3.1.1 to 1.3.2. After that my builds did not run because they failed to download snapshot dependencies from a hosted repository. As yesterday everything was still fine, I suspected a regression in Nexus, went back to 1.3.1.1, but the problem persisted. Investigating further, I noticed that Maven tried to download unique snapshots versions instead of the timestamped ones. This explained why the snapshots would not be found. So, something must have messed up my local repository. Next, I tried mvn dependency:purge-local-repository but that did not work either because it would also try to download the unique version. So, I eventually purged my local repo manually, and the problem was gone. I'd appreciate any insight into what was going on here. Did I do anything wrong? Did metadata get messed up somehow? Thanks, Reinhard - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Weird problem downloading snapshots with Nexus
Whenever you see Maven making requests for -SNAPSHOT (and you don't have it configured with useUnique = false) it always means that the maven-metadata.xml file for that snapshot is wrong or couldn't be found. It's hard to say why that could have happened, but this often happens if you do a build offline (or while the repo is offline) and then Maven remembers this missing data. Reinhard Nägele wrote: Hello, This morning, I updated our Nexus version from 1.3.1.1 to 1.3.2. After that my builds did not run because they failed to download snapshot dependencies from a hosted repository. As yesterday everything was still fine, I suspected a regression in Nexus, went back to 1.3.1.1, but the problem persisted. Investigating further, I noticed that Maven tried to download unique snapshots versions instead of the timestamped ones. This explained why the snapshots would not be found. So, something must have messed up my local repository. Next, I tried mvn dependency:purge-local-repository but that did not work either because it would also try to download the unique version. So, I eventually purged my local repo manually, and the problem was gone. I'd appreciate any insight into what was going on here. Did I do anything wrong? Did metadata get messed up somehow? Thanks, Reinhard - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with snapshots
I have identified some more things in my confiaguration, maybe someone will have any other ideas as to what could be wrong? 1. When I deploy my snapshot onto my local repository with this command: mvn install:install-file -Dfile=Project.jar -DgroupId=com.company.project -DartifactId=project -Dversion=2.2-SNAPSHOT -Dpackaging=jar -DgeneratePom=true what happens is that the project-2.2-SNAPSHOT.jar gets overwritten with the new file and then as before, this file is used for the compiled war. 2. I also run automated builds on the same machine where I have the archiva repository. What is strange there is that it always picks up the most recent version of the snapshot for the compiled version. So for some reason my problem only occurs on local builds, and not on the continuous integration build on my build machine. Could that be because there's a difference in the metadata xmls between my internal repo and the local repo? This is my maven-metadata-local.xml file from the com/company/project/project folder: ?xml version=1.0 encoding=UTF-8 ? metadata groupIdcom.company.project/groupId artifactIdproject/artifactId version2.2-SNAPSHOT/version versioning versions version2.2-SNAPSHOT/version /versions lastUpdated20080312101739/lastUpdated /versioning /metadata And this is the one from my Archiva repo: ?xml version=1.0 encoding=UTF-8 ? metadata groupIdcom.company.project/groupId artifactIdproject/artifactId versioning latest2.2-SNAPSHOT/latest versions version2.2-SNAPSHOT/version /versions /versioning /metadata Now these are the respective files from the com/company/project/project/2.2-SNAPSHOT folder: 1. local repository: ?xml version=1.0 encoding=UTF-8 ? metadata groupIdcom.company.project/groupId artifactIdproject/artifactId version2.2-SNAPSHOT/version versioning snapshot localCopytrue/localCopy /snapshot lastUpdated20080312101739/lastUpdated /versioning /metadata 2. archiva: ?xml version=1.0 encoding=UTF-8? metadata groupIdcom.company.project/groupId artifactIdproject/artifactId version2.2-SNAPSHOT/version versioning snapshot buildNumber19/buildNumber timestamp20080311.132319/timestamp /snapshot lastUpdated20080311132319/lastUpdated /versioning /metadata -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p16001438.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
amit kumar-18 wrote: You mean even from the local repository the maven is not able to pick up the latest of the jars? Yes, that's the problem - I can see that the latest jars are downloaded to my local repository, but they aren't used for the compiled war and ear files. Cheers, Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15848863.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
Owing to amateurism I have configured the repository with snapshots at two places, in the pom.xml and in settings.xml. It has been working fine for me. Will try playing around with it and let you know. Regards, Amit Kumar On Wed, Mar 5, 2008 at 6:20 AM, Papapara Tudu [EMAIL PROTECTED] wrote: amit kumar-18 wrote: You mean even from the local repository the maven is not able to pick up the latest of the jars? Yes, that's the problem - I can see that the latest jars are downloaded to my local repository, but they aren't used for the compiled war and ear files. Cheers, Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15848863.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
I just wanted to bring this topic up again as I still don't know what the reason for my problem is. Does anyone have any other ideas? Thanks! Cheers, Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15824504.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
Can you submit your output with -X option ? Jeff MAURY On Tue, Mar 4, 2008 at 11:35 AM, Papapara Tudu [EMAIL PROTECTED] wrote: I just wanted to bring this topic up again as I still don't know what the reason for my problem is. Does anyone have any other ideas? Thanks! Cheers, Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15824504.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- La mélancolie c'est communiste Tout le monde y a droit de temps en temps La mélancolie n'est pas capitaliste C'est même gratuit pour les perdants La mélancolie c'est pacifiste On ne lui rentre jamais dedans La mélancolie oh tu sais ça existe Elle se prend même avec des gants La mélancolie c'est pour les syndicalistes Il faut juste sa carte de permanent Miossec (2006) http://www.jeffmaury.com http://riadiscuss.jeffmaury.com
Re: Problem with snapshots
Well I faced a similar problem but configuring my remote repository for snapshots worked for me. I had to add the below to my repository repository idmy-internal-site/id urlfile:///192.168.x.x/Repository/url snapshots enabledtrue/enabled updatePolicyalways/updatePolicy checksumPolicywarn/checksumPolicy /snapshots /repository I started getting latest of the jars present under the project-SNAPSHOT folder in the repository. Hope this works for you as well. Regards, Amit Kumar 2008/3/4 Jeff MAURY [EMAIL PROTECTED]: Can you submit your output with -X option ? Jeff MAURY On Tue, Mar 4, 2008 at 11:35 AM, Papapara Tudu [EMAIL PROTECTED] wrote: I just wanted to bring this topic up again as I still don't know what the reason for my problem is. Does anyone have any other ideas? Thanks! Cheers, Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15824504.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- La mélancolie c'est communiste Tout le monde y a droit de temps en temps La mélancolie n'est pas capitaliste C'est même gratuit pour les perdants La mélancolie c'est pacifiste On ne lui rentre jamais dedans La mélancolie oh tu sais ça existe Elle se prend même avec des gants La mélancolie c'est pour les syndicalistes Il faut juste sa carte de permanent Miossec (2006) http://www.jeffmaury.com http://riadiscuss.jeffmaury.com
Re: Problem with snapshots
Jeff MAURY wrote: Can you submit your output with -X option ? Jeff MAURY Maven produced 200 kB of logs, so I'll skip the rest, to me the most relevant seem to be these few lines: [INFO] snapshot com.company.project:project:2.2-SNAPSHOT: checking for updates from myRepository [DEBUG] Skipping disabled repository central [DEBUG] project: resolved to version 2.2-20080304.145740-2 from repository myRepository [DEBUG] com.company.project:project:jar:2.2-SNAPSHOT:compile (selected for compile) So Maven does see and download the new snapshot, but then it still uses the old one for compilation. Shouldn't the new snapshot (project-2.2-20080304.145740-2.jar) instantly replace the old project-2.2-SNAPSHOT.jar file when it's downloaded from Archiva? Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15829461.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
amit kumar-18 wrote: Well I faced a similar problem but configuring my remote repository for snapshots worked for me. I had to add the below to my repository repository idmy-internal-site/id urlfile:///192.168.x.x/Repository/url snapshots enabledtrue/enabled updatePolicyalways/updatePolicy checksumPolicywarn/checksumPolicy /snapshots /repository I started getting latest of the jars present under the project-SNAPSHOT folder in the repository. I tried two configurations: 1. using my local repository both for releases and snapshots 2. having a separate local repo for releases and a separate one for snapshots. Both results were identical though :( Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15829527.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
You mean even from the local repository the maven is not able to pick up the latest of the jars? Regards, Amit On Tue, Mar 4, 2008 at 8:50 PM, Papapara Tudu [EMAIL PROTECTED] wrote: amit kumar-18 wrote: Well I faced a similar problem but configuring my remote repository for snapshots worked for me. I had to add the below to my repository repository idmy-internal-site/id urlfile:///192.168.x.x/Repository/url snapshots enabledtrue/enabled updatePolicyalways/updatePolicy checksumPolicywarn/checksumPolicy /snapshots /repository I started getting latest of the jars present under the project-SNAPSHOT folder in the repository. I tried two configurations: 1. using my local repository both for releases and snapshots 2. having a separate local repo for releases and a separate one for snapshots. Both results were identical though :( Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15829527.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
This is because the file name with the timestamp is something internal to the repository. When the dependency is resolved to your WAR, the original file name is restored based on the artifactId and the version you mention in your POM. Maybe if you put Maven in debug mode, you could see that the file retrieved from your local repository is the one with the timestamp. Regards Jeff MAURY On Wed, Feb 27, 2008 at 10:53 AM, Papapara Tudu [EMAIL PROTECTED] wrote: Hello, maybe I misunderstand something about snapshots, but I have the following problem: 1. I have a non-Maven project which I export into a jar file and then install as a snapshot onto my local repository running on Archiva with this command: mvn deploy:deploy-file -Dfile=Project.jar -DgroupId=com.company.project -DartifactId=project -Dversion=2.2-SNAPSHOT -Dpackaging=jar -DgeneratePom=true -Durl=http://[someip]/archiva/repository/myRepository -DrepositoryId=archiva.default 2. The very first version of that jar that was deployed onto the repository is saved as project-2.2-SNAPSHOT.jar. 3. As expected, any further jars that I deploy onto the local repository get saved as e.g. project-2.2-20080226.143100-1.jar 4. The problem is that when I reference that jar in any other project, when I build the other project, only the project-2.2-SNAPSHOT.jar version (the very first one that was installed) is picked up in the output war and ear files. 5. I can see that the actual snapshots, e.g. project-2.2-20080226.143100-1.jar do get downloaded from the internal repository and installed onto my local repository, but they're never used by referencing projects. 6. I'm using the Maven Plugin for Eclipse and what is strange is that in the Maven Dependencies tree in all referencing projects, I see the project-2.2-SNAPSHOT.jar file, but in the plugin logs on the Console I can see this: project: resolved to version project-2.2-20080226.143100-1 from repository myRepository 7. I reference this jar in other projects as: dependency groupIdcom.company.project/groupId artifactIdproject/artifactId version[2,)/version /dependency (I also tried this configuration: dependency groupIdcom.company.project/groupId artifactIdproject/artifactId version2.2-SNAPSHOT/version /dependency but it had exactly the same results) 8. My pom.xml config is: distributionManagement snapshotRepository idmyRepository/id url dav:http://[someip]/archiva/repository/myRepository/ /url /snapshotRepository /distributionManagement pluginRepositories pluginRepository idmyRepository/id url dav:http://[someip]/archiva/repository/myRepository/ /url /pluginRepository /pluginRepositories repositories repository idmyRepository/id namemyRepository/name urlhttp://[someip]/archiva/repository/myRepository/url releases enabledtrue/enabled /releases snapshots enabledtrue/enabled /snapshots /repository /repositories I wonder what I am doing wrong. Thanks in advance for the help. Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15709789.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- La mélancolie c'est communiste Tout le monde y a droit de temps en temps La mélancolie n'est pas capitaliste C'est même gratuit pour les perdants La mélancolie c'est pacifiste On ne lui rentre jamais dedans La mélancolie oh tu sais ça existe Elle se prend même avec des gants La mélancolie c'est pour les syndicalistes Il faut juste sa carte de permanent Miossec (2006) http://www.jeffmaury.com http://riadiscuss.jeffmaury.com
Problem with snapshots
Hello, maybe I misunderstand something about snapshots, but I have the following problem: 1. I have a non-Maven project which I export into a jar file and then install as a snapshot onto my local repository running on Archiva with this command: mvn deploy:deploy-file -Dfile=Project.jar -DgroupId=com.company.project -DartifactId=project -Dversion=2.2-SNAPSHOT -Dpackaging=jar -DgeneratePom=true -Durl=http://[someip]/archiva/repository/myRepository -DrepositoryId=archiva.default 2. The very first version of that jar that was deployed onto the repository is saved as project-2.2-SNAPSHOT.jar. 3. As expected, any further jars that I deploy onto the local repository get saved as e.g. project-2.2-20080226.143100-1.jar 4. The problem is that when I reference that jar in any other project, when I build the other project, only the project-2.2-SNAPSHOT.jar version (the very first one that was installed) is picked up in the output war and ear files. 5. I can see that the actual snapshots, e.g. project-2.2-20080226.143100-1.jar do get downloaded from the internal repository and installed onto my local repository, but they're never used by referencing projects. 6. I'm using the Maven Plugin for Eclipse and what is strange is that in the Maven Dependencies tree in all referencing projects, I see the project-2.2-SNAPSHOT.jar file, but in the plugin logs on the Console I can see this: project: resolved to version project-2.2-20080226.143100-1 from repository myRepository 7. I reference this jar in other projects as: dependency groupIdcom.company.project/groupId artifactIdproject/artifactId version[2,)/version /dependency (I also tried this configuration: dependency groupIdcom.company.project/groupId artifactIdproject/artifactId version2.2-SNAPSHOT/version /dependency but it had exactly the same results) 8. My pom.xml config is: distributionManagement snapshotRepository idmyRepository/id url dav:http://[someip]/archiva/repository/myRepository/ /url /snapshotRepository /distributionManagement pluginRepositories pluginRepository idmyRepository/id url dav:http://[someip]/archiva/repository/myRepository/ /url /pluginRepository /pluginRepositories repositories repository idmyRepository/id namemyRepository/name urlhttp://[someip]/archiva/repository/myRepository/url releases enabledtrue/enabled /releases snapshots enabledtrue/enabled /snapshots /repository /repositories I wonder what I am doing wrong. Thanks in advance for the help. Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15709789.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
Hi, The problem is that maven assumes that the -SNAPSHOT is the newest, not the oldest version available. You obviously have projects that declare dependencies on just -SNAPSHOT, but want the latest *dated* version to be used. So I suggest you delete the original -SNAPSHOT version, or rename it to have an appropriate date suffix. Regards, Simon Papapara Tudu schrieb: Hello, maybe I misunderstand something about snapshots, but I have the following problem: 1. I have a non-Maven project which I export into a jar file and then install as a snapshot onto my local repository running on Archiva with this command: mvn deploy:deploy-file -Dfile=Project.jar -DgroupId=com.company.project -DartifactId=project -Dversion=2.2-SNAPSHOT -Dpackaging=jar -DgeneratePom=true -Durl=http://[someip]/archiva/repository/myRepository -DrepositoryId=archiva.default 2. The very first version of that jar that was deployed onto the repository is saved as project-2.2-SNAPSHOT.jar. 3. As expected, any further jars that I deploy onto the local repository get saved as e.g. project-2.2-20080226.143100-1.jar 4. The problem is that when I reference that jar in any other project, when I build the other project, only the project-2.2-SNAPSHOT.jar version (the very first one that was installed) is picked up in the output war and ear files. 5. I can see that the actual snapshots, e.g. project-2.2-20080226.143100-1.jar do get downloaded from the internal repository and installed onto my local repository, but they're never used by referencing projects. 6. I'm using the Maven Plugin for Eclipse and what is strange is that in the Maven Dependencies tree in all referencing projects, I see the project-2.2-SNAPSHOT.jar file, but in the plugin logs on the Console I can see this: project: resolved to version project-2.2-20080226.143100-1 from repository myRepository 7. I reference this jar in other projects as: dependency groupIdcom.company.project/groupId artifactIdproject/artifactId version[2,)/version /dependency (I also tried this configuration: dependency groupIdcom.company.project/groupId artifactIdproject/artifactId version2.2-SNAPSHOT/version /dependency but it had exactly the same results) 8. My pom.xml config is: distributionManagement snapshotRepository idmyRepository/id url dav:http://[someip]/archiva/repository/myRepository/ /url /snapshotRepository /distributionManagement pluginRepositories pluginRepository idmyRepository/id url dav:http://[someip]/archiva/repository/myRepository/ /url /pluginRepository /pluginRepositories repositories repository idmyRepository/id namemyRepository/name urlhttp://[someip]/archiva/repository/myRepository/url releases enabledtrue/enabled /releases snapshots enabledtrue/enabled /snapshots /repository /repositories I wonder what I am doing wrong. Thanks in advance for the help. Papapara Tudu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
[EMAIL PROTECTED] wrote: The problem is that maven assumes that the -SNAPSHOT is the newest, not the oldest version available. You obviously have projects that declare dependencies on just -SNAPSHOT, but want the latest *dated* version to be used. So I suggest you delete the original -SNAPSHOT version, or rename it to have an appropriate date suffix. The problem is that when I install new versions of that jar, they don't get picked up by the build - although the -SNAPHSOT version is NOT the newest anymore then. And this all has to work without deleting anything from the internal or local repositories - otherwise the problem will reoccur whenever new snapshots are created. I believe my understanding is correct: here's a quote from the Better builds with Maven book: You'll see that it is treated differently than when it was installed in the local repository. The filename that is used is similar to proficio-api-1.0-20060211.131114-1.jar. In this case, the version used is the time that it was deployed (in the UTC timezone) and the build number. If you were to deploy again, the time stamp would change and the build number would increment to 2. This technique allows you to continue using the latest version by declaring a dependency on 1.0- SNAPSHOT, or to lock down a stable version by declaring the dependency version to be the specific equivalent such as 1.0-20060211.131114-1. Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15711423.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with snapshots
Jeff MAURY wrote: This is because the file name with the timestamp is something internal to the repository. When the dependency is resolved to your WAR, the original file name is restored based on the artifactId and the version you mention in your POM. Maybe if you put Maven in debug mode, you could see that the file retrieved from your local repository is the one with the timestamp. OK but I believe it should still work in the following way: when I build a referencing project, it takes the latest version of the jar (so that will be the project-2.2-20080226.143100-1.jar and not project-2.2-SNAPSHOT.jar) and puts it in the output war file. What it does though is it just takes the project-2.2-SNAPSHOT.jar file and puts it in the output war file. Papapara Tudu -- View this message in context: http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15711493.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem deploying snapshots
is andromda-spring-cartridge-3.3-SNAPSHOT-20070927.154235-1.jar Whats happening with the snapshot suffix? Thanks a lot -- View this message in context: http://www.nabble.com/problem-deploying-snapshots-tf4529303s177.html#a12924327 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem deploying snapshots
] [INFO] Total time: 11 seconds [INFO] Finished at: Thu Sep 27 17:42:38 CEST 2007 [INFO] Final Memory: 14M/254M [INFO] Why is the plugin deploying this file andromda-spring-cartridge-3.3-20070927.154235-1.jar when in Reality is andromda-spring-cartridge-3.3-SNAPSHOT-20070927.154235-1.jar Whats happening with the snapshot suffix? Thanks a lot -- View this message in context: http://www.nabble.com/problem-deploying-snapshots-tf4529303s177.html#a12924327 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- (o_ \* / / ) | / \ / | O | v v
Re: problem deploying snapshots
Hello, This is normal maven behavior for snapshots deployment: each snapshot is deployed with a unique version number. The metadata reflects this and defines the lates snapshot so that when you ask for foo:bar:1.0-SNAPSHOT you really get foo:bar:1.0-2342344234665.2423. I think you can change this behavior by setting uniqueVersionfalse in the snapshotRepository section of you distributionManagement. See http://maven.apache.org/ref/current/maven-model/maven.html#class_snapshotRepository BTW, this question as been asked and answered already today... HTH -- OQube software engineering \ génie logiciel Arnaud Bailly, Dr. \web http://www.oqube.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] problem with snapshots and Maven 2.0.2 Tasks for Ant
We are trying out using ant/m2 tasks for ant to assemble an legacy application. When using the dependencies task it will download the specified snapshot dependencies but they are not included in fileset when copying. It works nice if the snapshots were built on the same machine. Is it broken? Or am I :-) Is this the wrong forum? /Konstantin Here are some output when using snapshots built locally: dist-deps-cp: [dependencies] [INFO] snapshot se.posten.pse.weblogic:authprovider:1.0-SNAPSHOT: checking for updates from central [copy] Copying 14 files to F:\build\config\copy-files\lib -- 14 files [echo] libbar: (cut this section not relevant) se\posten\pse\weblogic\authprovider\1.0-SNAPSHOT\authprovider-1 .0-SNAPSHOT.jar;se\posten\ta\ta\1.0\ta-1.0.jar and here when snapshot is not available on local machine but downloaded: dist-deps-cp: [dependencies] [INFO] snapshot se.posten.pse.weblogic:authprovider:1.0-SNAPSHOT: checking for updates from snapshots [dependencies] [INFO] snapshot se.posten.pse.weblogic:authprovider:1.0-SNAPSHOT: checking for updates from central [dependencies] Downloading: se/posten/pse/weblogic/authprovider/1.0-SNAPSHOT/authprovider-1.0-20060126.163957-2.pom [dependencies] Transferring 1K [dependencies] Downloading: se/posten/pse/weblogic/authprovider/1.0-SNAPSHOT/authprovider-1.0-20060126.163957-2.jar [dependencies] Transferring 23K [copy] Copying 13 files to F:\build\config\copy-files\lib -- 13 files [echo] libbar: (cut this section not relevant) se\posten\ta\ta\1.0\ta-1.0.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [m2] problem with snapshots and Maven 2.0.2 Tasks for Ant
Hello, we have exactly the same problem. There is already a Jira filed for this issue: http://jira.codehaus.org/browse/MNG-1408. A patch is attached to the jira, but I never tried it. Our current workaround for legacy builds is to use maven-artifact-ant-2.0-beta-3-dep.jar and to call the dependencies-task twice. artifact:dependencies verbose=false pom refid=launcher.project/ /artifact:dependencies artifact:dependencies filesetId=as-launcher.filesetId pathId=as-launcher.classpath verbose=true pom refid=launcher.project/ /artifact:dependencies But using such an old maven-artifact-ant might introduce other problems as well - works for us though... Regards Ingo -Original Message- From: Konstantin Polyzois [mailto:[EMAIL PROTECTED] Sent: Friday, January 27, 2006 10:25 AM To: Maven Users List Subject: [m2] problem with snapshots and Maven 2.0.2 Tasks for Ant We are trying out using ant/m2 tasks for ant to assemble an legacy application. When using the dependencies task it will download the specified snapshot dependencies but they are not included in fileset when copying. It works nice if the snapshots were built on the same machine. Is it broken? Or am I :-) Is this the wrong forum? /Konstantin Here are some output when using snapshots built locally: dist-deps-cp: [dependencies] [INFO] snapshot se.posten.pse.weblogic:authprovider:1.0-SNAPSHOT: checking for updates from central [copy] Copying 14 files to F:\build\config\copy-files\lib -- 14 files [echo] libbar: (cut this section not relevant) se\posten\pse\weblogic\authprovider\1.0-SNAPSHOT\authprovider-1 .0-SNAPSHOT.jar;se\posten\ta\ta\1.0\ta-1.0.jar and here when snapshot is not available on local machine but downloaded: dist-deps-cp: [dependencies] [INFO] snapshot se.posten.pse.weblogic:authprovider:1.0-SNAPSHOT: checking for updates from snapshots [dependencies] [INFO] snapshot se.posten.pse.weblogic:authprovider:1.0-SNAPSHOT: checking for updates from central [dependencies] Downloading: se/posten/pse/weblogic/authprovider/1.0-SNAPSHOT/authprovider- 1.0-20060126.163957-2.pom [dependencies] Transferring 1K [dependencies] Downloading: se/posten/pse/weblogic/authprovider/1.0-SNAPSHOT/authprovider- 1.0-20060126.163957-2.jar [dependencies] Transferring 23K [copy] Copying 13 files to F:\build\config\copy-files\lib -- 13 files [echo] libbar: (cut this section not relevant) se\posten\ta\ta\1.0\ta-1.0.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem using snapshots in JAR override
Hello, In our organization we want to use snapshot versions of some of our libraries, during developing. Normally, this would be done by stating the version number for the library as SNAPSHOT in project.xml But this practice is not allowed by our build managers, they only want references to officially released versions in project.xml So, I tried the JAR override feature and added the following to build.properties (since this file is not in version control, the content is no problem for the build managers) : maven.jar.override=on maven.jar.mylibrary=SNAPSHOT This does not work as I expected, what happens is that the snapshot dependency is downloaded, but to the home directory of the project, with filename Snapshot. Also when building an EAR, the library ends up with filename Snapshot. Besides that this is not the correct name, it will definitely not work if there are more than one snapshot dependency in the project. Does any one know how to solve this ? Marcel Vehof --- This message is confidential and may be privileged. Any review, retransmission, dissemination or other use of, or taking any action with reference to this information by persons other than the intended recipient is prohibited. If you received this message in error, please notify the sender by reply e-mail and delete this message from all computers. Please note that e-mails are susceptible to change. The sender will not accept liability for the improper or incomplete transmission of the information contained in this message.
RE: problem using snapshots in JAR override
Hi, You must specify the full name of the file maven.jar.mylibrary=path_to_file/mylibrary-SNAPSHOT.jar This is designed to use different file names, what you're doing using different versions is a *very bad* idea. Regards Carlos Sanchez A Coruña, Spain Oness Project http://oness.sourceforge.net -Original Message- From: Marcel Vehof [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 10:45 AM To: '[EMAIL PROTECTED]' Subject: problem using snapshots in JAR override Hello, In our organization we want to use snapshot versions of some of our libraries, during developing. Normally, this would be done by stating the version number for the library as SNAPSHOT in project.xml But this practice is not allowed by our build managers, they only want references to officially released versions in project.xml So, I tried the JAR override feature and added the following to build.properties (since this file is not in version control, the content is no problem for the build managers) : maven.jar.override=on maven.jar.mylibrary=SNAPSHOT This does not work as I expected, what happens is that the snapshot dependency is downloaded, but to the home directory of the project, with filename Snapshot. Also when building an EAR, the library ends up with filename Snapshot. Besides that this is not the correct name, it will definitely not work if there are more than one snapshot dependency in the project. Does any one know how to solve this ? Marcel Vehof --- This message is confidential and may be privileged. Any review, retransmission, dissemination or other use of, or taking any action with reference to this information by persons other than the intended recipient is prohibited. If you received this message in error, please notify the sender by reply e-mail and delete this message from all computers. Please note that e-mails are susceptible to change. The sender will not accept liability for the improper or incomplete transmission of the information contained in this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem using snapshots in JAR override
In the Maven User Guide http://maven.apache.org/reference/user-guide.html#Overriding_Stated_Dependen cies it is stated that you can do maven.jar.artifactId = [version] eg. maven.jar.classworlds = 1.0-beta-1 So that's the reason I tried to use SNAPSHOT as a version. Besides when I specify any version number other than SNAPSHOT, the JAR override works perfectly. Please explain to me why you consider using different version numbers a very bad idea. -Original Message- From: Carlos Sanchez [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 11:38 AM To: 'Maven Users List' Subject: RE: problem using snapshots in JAR override Hi, You must specify the full name of the file maven.jar.mylibrary=path_to_file/mylibrary-SNAPSHOT.jar This is designed to use different file names, what you're doing using different versions is a *very bad* idea. Regards Carlos Sanchez A Coruña, Spain Oness Project http://oness.sourceforge.net -Original Message- From: Marcel Vehof [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 10:45 AM To: '[EMAIL PROTECTED]' Subject: problem using snapshots in JAR override Hello, In our organization we want to use snapshot versions of some of our libraries, during developing. Normally, this would be done by stating the version number for the library as SNAPSHOT in project.xml But this practice is not allowed by our build managers, they only want references to officially released versions in project.xml So, I tried the JAR override feature and added the following to build.properties (since this file is not in version control, the content is no problem for the build managers) : maven.jar.override=on maven.jar.mylibrary=SNAPSHOT This does not work as I expected, what happens is that the snapshot dependency is downloaded, but to the home directory of the project, with filename Snapshot. Also when building an EAR, the library ends up with filename Snapshot. Besides that this is not the correct name, it will definitely not work if there are more than one snapshot dependency in the project. Does any one know how to solve this ? Marcel Vehof --- This message is confidential and may be privileged. Any review, retransmission, dissemination or other use of, or taking any action with reference to this information by persons other than the intended recipient is prohibited. If you received this message in error, please notify the sender by reply e-mail and delete this message from all computers. Please note that e-mails are susceptible to change. The sender will not accept liability for the improper or incomplete transmission of the information contained in this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- This message is confidential and may be privileged. Any review, retransmission, dissemination or other use of, or taking any action with reference to this information by persons other than the intended recipient is prohibited. If you received this message in error, please notify the sender by reply e-mail and delete this message from all computers. Please note that e-mails are susceptible to change. The sender will not accept liability for the improper or incomplete transmission of the information contained in this message.
RE: problem using snapshots in JAR override
IMO what you are trying to do is no more no less then cheat your build managers :) If they dislike the idea of SNAPSHOT artifacts - its better not to use them or explain to them what for you need to use them. You may also consider using currentVersion2.1-SNAPSHOT/currentVersion dependency version2.1-SNAPSHOT/version dependency this is what will be soon a default and recommended way of doing (this allows to have snapshot per version (branch)) In m2 we have already one single install goal which is smart enough to check project's type and version . It means that soon you will be able to do: maven install and this will do what (depending of the context) what jar:install, jar:install-snapshot, war:install, ejb:install, ejb:install-snapshot etc goals used to do. Michal -Original Message- From: Marcel Vehof [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 10:45 AM To: '[EMAIL PROTECTED]' Subject: problem using snapshots in JAR override Hello, In our organization we want to use snapshot versions of some of our libraries, during developing. Normally, this would be done by stating the version number for the library as SNAPSHOT in project.xml But this practice is not allowed by our build managers, they only want references to officially released versions in project.xml So, I tried the JAR override feature and added the following to build.properties (since this file is not in version control, the content is no problem for the build managers) : maven.jar.override=on maven.jar.mylibrary=SNAPSHOT This does not work as I expected, what happens is that the snapshot dependency is downloaded, but to the home directory of the project, with filename Snapshot. Also when building an EAR, the library ends up with filename Snapshot. Besides that this is not the correct name, it will definitely not work if there are more than one snapshot dependency in the project. Does any one know how to solve this ? Marcel Vehof --- This message is confidential and may be privileged. Any review, retransmission, dissemination or other use of, or taking any action with reference to this information by persons other than the intended recipient is prohibited. If you received this message in error, please notify the sender by reply e-mail and delete this message from all computers. Please note that e-mails are susceptible to change. The sender will not accept liability for the improper or incomplete transmission of the information contained in this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem using snapshots in JAR override
Mmm, you should raise an issue to JIRA. It's a very bad idea because you are trying to cheat your build managers. -Original Message- From: Marcel Vehof [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 11:45 AM To: 'Maven Users List' Subject: RE: problem using snapshots in JAR override In the Maven User Guide http://maven.apache.org/reference/user-guide.html#Overriding_S tated_Dependen cies it is stated that you can do maven.jar.artifactId = [version] eg. maven.jar.classworlds = 1.0-beta-1 So that's the reason I tried to use SNAPSHOT as a version. Besides when I specify any version number other than SNAPSHOT, the JAR override works perfectly. Please explain to me why you consider using different version numbers a very bad idea. -Original Message- From: Carlos Sanchez [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 11:38 AM To: 'Maven Users List' Subject: RE: problem using snapshots in JAR override Hi, You must specify the full name of the file maven.jar.mylibrary=path_to_file/mylibrary-SNAPSHOT.jar This is designed to use different file names, what you're doing using different versions is a *very bad* idea. Regards Carlos Sanchez A Coruña, Spain Oness Project http://oness.sourceforge.net -Original Message- From: Marcel Vehof [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 10:45 AM To: '[EMAIL PROTECTED]' Subject: problem using snapshots in JAR override Hello, In our organization we want to use snapshot versions of some of our libraries, during developing. Normally, this would be done by stating the version number for the library as SNAPSHOT in project.xml But this practice is not allowed by our build managers, they only want references to officially released versions in project.xml So, I tried the JAR override feature and added the following to build.properties (since this file is not in version control, the content is no problem for the build managers) : maven.jar.override=on maven.jar.mylibrary=SNAPSHOT This does not work as I expected, what happens is that the snapshot dependency is downloaded, but to the home directory of the project, with filename Snapshot. Also when building an EAR, the library ends up with filename Snapshot. Besides that this is not the correct name, it will definitely not work if there are more than one snapshot dependency in the project. Does any one know how to solve this ? Marcel Vehof --- This message is confidential and may be privileged. Any review, retransmission, dissemination or other use of, or taking any action with reference to this information by persons other than the intended recipient is prohibited. If you received this message in error, please notify the sender by reply e-mail and delete this message from all computers. Please note that e-mails are susceptible to change. The sender will not accept liability for the improper or incomplete transmission of the information contained in this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- This message is confidential and may be privileged. Any review, retransmission, dissemination or other use of, or taking any action with reference to this information by persons other than the intended recipient is prohibited. If you received this message in error, please notify the sender by reply e-mail and delete this message from all computers. Please note that e-mails are susceptible to change. The sender will not accept liability for the improper or incomplete transmission of the information contained in this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem using snapshots in JAR override
On Jul 23, 2004, at 04:51, Maczka Michal wrote: In m2 we have already one single install goal which is smart enough to check project's type and version . It means that soon you will be able to do: maven install and this will do what (depending of the context) what jar:install, jar:install-snapshot, war:install, ejb:install, ejb:install-snapshot etc goals used to do. /me cheers I was afraid the enhancement I had raised in JIRA had been swept under the rug. :-) -- Craig S. Cottingham [EMAIL PROTECTED] OpenPGP key available from: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x7977F79C - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]