Re: AW: dependency:unpack doesn't work correctly with Nexus, SNAPSHOT and classifier?
It could be that you hit https://jira.codehaus.org/browse/MNG-5324 Robert Op Fri, 26 Oct 2012 08:53:51 +0200 schreef Lewis, Eric eric.le...@ipi.ch: Anyone? :-) -Ursprüngliche Nachricht- Von: Lewis, Eric [mailto:eric.le...@ipi.ch] Gesendet: Dienstag, 23. Oktober 2012 16:53 An: users@maven.apache.org Betreff: dependency:unpack doesn't work correctly with Nexus, SNAPSHOT and classifier? Hi First of all I'd like to ask you to be gentle with me :-) The solution I'm talking about is one big hack and will have to be migrated one day. But for the time being, here's the issue: We have a WAR from an old Ant build which is built in a stage-dependent way (one WAR for local use, one for development, one for production etc.). The old build was coaxed into deploying the WAR into our Nexus with a classifier representing the stage, e.g. ch.ige:wdlbrowserzk:local:3.3.0-SNAPSHOT:war This works well, and I can see the different WARs with their build date. To deploy the WAR, I rebuild it with a Maven build. First, I use dependency:unpack to get the WAR and unpack it. Later on, since the Maven project is a war project, the WAR is rebuilt and deployed. Now, my problem is that dependency:unpack always unpacks from the local repo. It downloads the metadata from Nexus and then assumes that the local WAR is the same as on Nexus - which it isn't! The classifier is given to the plugin's configuration by using a profile. The only bug I can imagine is that the plugin downloads the metadata, sees no difference between the local repo and Nexus (since it seems to ignore the classifier) and then proceeds with the local repo. Does the plugin use a different dependency resolution? Or is my approach wrong? (I mean, apart from the obviously hacky way of doing it) Here's the configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-wdl-war/id phaseprepare-package/phase goals goalunpack/goal /goals configuration artifactItems !-- Note: This works only if a stage-dependent profile is active! -- artifactItem groupIdch.ige/groupId artifactIdwdlbrowserzk/artifactId version${wdlbrowserzk.version}/version typewar/type classifier${profile.id}/classifier overWritetrue/overWrite /artifactItem /artifactItems outputDirectory${webapp.directory}/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots /configuration /execution /executions /plugin And here's the console output: [INFO] --- maven-dependency-plugin:2.5.1:unpack (unpack-wdl-war) @ etrademark-nt-wdl-web --- [INFO] Configured Artifact: ch.ige:wdlbrowserzk:local:3.3.0-SNAPSHOT:war Downloading: http://myrepo.com/content/groups/public/ch/ige/wdlbrowserzk/3.3.0-SNAPSHOT/maven-metadata.xml Downloaded: http://myrepo.com/content/groups/public/ch/ige/wdlbrowserzk/3.3.0-SNAPSHOT/maven-metadata.xml (264 B at 7.2 KB/sec) [INFO] Unpacking C:\jp\maven-repository\ch\ige\wdlbrowserzk\3.3.0-SNAPSHOT\wdlbrowserzk-3.3.0-SNAPSHOT-local.war to C:\jp\esv-projects\etrademark-nt\etrademark-nt-wdl-web\target\wdl with includes and excludes Any hint is appreciated! Best regards, Eric - 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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: AW: dependency:unpack doesn't work correctly with Nexus, SNAPSHOT and classifier?
Robert can anton commit his 2 patches (with the Testcase) and get this resolved? Thanks! Martin Gainty __ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. To: users@maven.apache.org Subject: Re: AW: dependency:unpack doesn't work correctly with Nexus, SNAPSHOT and classifier? Date: Fri, 26 Oct 2012 14:38:29 +0200 From: rfscho...@apache.org It could be that you hit https://jira.codehaus.org/browse/MNG-5324 Robert Op Fri, 26 Oct 2012 08:53:51 +0200 schreef Lewis, Eric eric.le...@ipi.ch: Anyone? :-) -Ursprüngliche Nachricht- Von: Lewis, Eric [mailto:eric.le...@ipi.ch] Gesendet: Dienstag, 23. Oktober 2012 16:53 An: users@maven.apache.org Betreff: dependency:unpack doesn't work correctly with Nexus, SNAPSHOT and classifier? Hi First of all I'd like to ask you to be gentle with me :-) The solution I'm talking about is one big hack and will have to be migrated one day. But for the time being, here's the issue: We have a WAR from an old Ant build which is built in a stage-dependent way (one WAR for local use, one for development, one for production etc.). The old build was coaxed into deploying the WAR into our Nexus with a classifier representing the stage, e.g. ch.ige:wdlbrowserzk:local:3.3.0-SNAPSHOT:war This works well, and I can see the different WARs with their build date. To deploy the WAR, I rebuild it with a Maven build. First, I use dependency:unpack to get the WAR and unpack it. Later on, since the Maven project is a war project, the WAR is rebuilt and deployed. Now, my problem is that dependency:unpack always unpacks from the local repo. It downloads the metadata from Nexus and then assumes that the local WAR is the same as on Nexus - which it isn't! The classifier is given to the plugin's configuration by using a profile. The only bug I can imagine is that the plugin downloads the metadata, sees no difference between the local repo and Nexus (since it seems to ignore the classifier) and then proceeds with the local repo. Does the plugin use a different dependency resolution? Or is my approach wrong? (I mean, apart from the obviously hacky way of doing it) Here's the configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-wdl-war/id phaseprepare-package/phase goals goalunpack/goal /goals configuration artifactItems !-- Note: This works only if a stage-dependent profile is active! -- artifactItem groupIdch.ige/groupId artifactIdwdlbrowserzk/artifactId version${wdlbrowserzk.version}/version typewar/type classifier${profile.id}/classifier overWritetrue/overWrite /artifactItem /artifactItems outputDirectory${webapp.directory}/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots /configuration /execution /executions /plugin And here's the console output: [INFO] --- maven-dependency-plugin:2.5.1:unpack (unpack-wdl-war) @ etrademark-nt-wdl-web --- [INFO] Configured Artifact: ch.ige:wdlbrowserzk:local:3.3.0-SNAPSHOT:war Downloading: http://myrepo.com/content/groups/public/ch/ige/wdlbrowserzk/3.3.0-SNAPSHOT/maven-metadata.xml Downloaded: http://myrepo.com/content/groups/public/ch/ige/wdlbrowserzk/3.3.0-SNAPSHOT/maven-metadata.xml (264 B at 7.2 KB/sec) [INFO] Unpacking C:\jp\maven-repository\ch\ige\wdlbrowserzk\3.3.0-SNAPSHOT\wdlbrowserzk-3.3.0-SNAPSHOT-local.war to C:\jp\esv-projects\etrademark-nt\etrademark-nt-wdl-web\target\wdl with includes and excludes Any hint is appreciated! Best regards, Eric - 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
Re: AW: dependency:unpack doesn't work correctly with Nexus, SNAPSHOT and classifier?
Martin, I've managed to write a test, but wasn't able to reproduce the issue. The fix from Anton translates the uniqueVersion back to the nonUnique version, so Aether is responsible for resolving it back to the right version. The real cause happened already somewhere earlier, we need to find that spot. Robert Op Fri, 26 Oct 2012 15:05:18 +0200 schreef Martin Gainty mgai...@hotmail.com: Robert can anton commit his 2 patches (with the Testcase) and get this resolved? Thanks! Martin Gainty __ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. To: users@maven.apache.org Subject: Re: AW: dependency:unpack doesn't work correctly with Nexus, SNAPSHOT and classifier? Date: Fri, 26 Oct 2012 14:38:29 +0200 From: rfscho...@apache.org It could be that you hit https://jira.codehaus.org/browse/MNG-5324 Robert Op Fri, 26 Oct 2012 08:53:51 +0200 schreef Lewis, Eric eric.le...@ipi.ch: Anyone? :-) -Ursprüngliche Nachricht- Von: Lewis, Eric [mailto:eric.le...@ipi.ch] Gesendet: Dienstag, 23. Oktober 2012 16:53 An: users@maven.apache.org Betreff: dependency:unpack doesn't work correctly with Nexus, SNAPSHOT and classifier? Hi First of all I'd like to ask you to be gentle with me :-) The solution I'm talking about is one big hack and will have to be migrated one day. But for the time being, here's the issue: We have a WAR from an old Ant build which is built in a stage-dependent way (one WAR for local use, one for development, one for production etc.). The old build was coaxed into deploying the WAR into our Nexus with a classifier representing the stage, e.g. ch.ige:wdlbrowserzk:local:3.3.0-SNAPSHOT:war This works well, and I can see the different WARs with their build date. To deploy the WAR, I rebuild it with a Maven build. First, I use dependency:unpack to get the WAR and unpack it. Later on, since the Maven project is a war project, the WAR is rebuilt and deployed. Now, my problem is that dependency:unpack always unpacks from the local repo. It downloads the metadata from Nexus and then assumes that the local WAR is the same as on Nexus - which it isn't! The classifier is given to the plugin's configuration by using a profile. The only bug I can imagine is that the plugin downloads the metadata, sees no difference between the local repo and Nexus (since it seems to ignore the classifier) and then proceeds with the local repo. Does the plugin use a different dependency resolution? Or is my approach wrong? (I mean, apart from the obviously hacky way of doing it) Here's the configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-wdl-war/id phaseprepare-package/phase goals goalunpack/goal /goals configuration artifactItems !-- Note: This works only if a stage-dependent profile is active! -- artifactItem groupIdch.ige/groupId artifactIdwdlbrowserzk/artifactId version${wdlbrowserzk.version}/version typewar/type classifier${profile.id}/classifier overWritetrue/overWrite /artifactItem /artifactItems outputDirectory${webapp.directory}/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots /configuration /execution /executions /plugin And here's the console output: [INFO] --- maven-dependency-plugin:2.5.1:unpack (unpack-wdl-war) @ etrademark-nt-wdl-web --- [INFO] Configured Artifact: ch.ige:wdlbrowserzk:local:3.3.0-SNAPSHOT:war Downloading: http://myrepo.com/content/groups/public/ch/ige/wdlbrowserzk/3.3.0-SNAPSHOT/maven-metadata.xml Downloaded: http://myrepo.com/content/groups/public/ch/ige/wdlbrowserzk/3.3.0-SNAPSHOT/maven-metadata.xml (264 B at 7.2 KB/sec) [INFO] Unpacking C:\jp\maven-repository\ch\ige\wdlbrowserzk\3.3.0-SNAPSHOT\wdlbrowserzk-3.3.0-SNAPSHOT-local.war to C:\jp\esv-projects\etrademark-nt\etrademark-nt-wdl-web\target\wdl with includes and excludes Any hint is appreciated! Best regards, Eric