[jira] [Commented] (MNG-5868) Adding serval times the same artifact via MavenProjectHelper (attachArtifact) does not produce a failure
[ https://issues.apache.org/jira/browse/MNG-5868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15936467#comment-15936467 ] Knut Vidar Siem commented on MNG-5868: -- [~schulte77], when you say "this is not a Maven core issue" I assume you're referring to Maven Shade Plugin's use of "java-source" as source artifact type vs "jar" in Maven Source Plugin. Commit [5f048234ff44dbf70fcad9f17834c64866f452e1|https://git-wip-us.apache.org/repos/asf?p=maven.git;a=commitdiff;h=5f048234ff44dbf70fcad9f17834c64866f452e1] or something to that effect _is_ coming to 3.5.1, right? {noformat:title=Commit 5f048234ff44dbf70fcad9f17834c64866f452e1} [MNG-5868] Adding serval times the same artifact via MavenProjectHelper (attachArtifact) does not produce a failure o Updated to restore the behaviour consensus had been reached in MNG-5387. o Kept 'MavenProject.getAttachedArtifacts' to return an unmodifiable list. {noformat} > Adding serval times the same artifact via MavenProjectHelper (attachArtifact) > does not produce a failure > - > > Key: MNG-5868 > URL: https://issues.apache.org/jira/browse/MNG-5868 > Project: Maven > Issue Type: Bug > Components: core >Affects Versions: 3.2.3 >Reporter: Karl Heinz Marbaise >Assignee: Karl Heinz Marbaise > Fix For: 3.5.1 > > > During the check of an issue MSHADE-195 i stumbled over several things... > If you take a look here and the log output excerpt: > {noformat} > INFO] Minimized 2341 -> 1293 > [INFO] Minimized 3282 -> 2234 > [INFO] Replacing original artifact with shaded artifact. > [INFO] Replacing > /Users/kama/ws-git/apache/mshade/mshade-195/target/MSHADE-195-example-1-SNAPSHOT.jar > with > /Users/kama/ws-git/apache/mshade/mshade-195/target/MSHADE-195-example-1-SNAPSHOT-shaded.jar > [INFO] Replacing original source artifact with shaded source artifact. > [INFO] Replacing > /Users/kama/ws-git/apache/mshade/mshade-195/target/MSHADE-195-example-1-SNAPSHOT-sources.jar > with > /Users/kama/ws-git/apache/mshade/mshade-195/target/MSHADE-195-example-1-SNAPSHOT-shaded-sources.jar > [INFO] Dependency-reduced POM written at: > /Users/kama/ws-git/apache/mshade/mshade-195/dependency-reduced-pom.xml > [INFO] > [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ > MSHADE-195-example --- > [INFO] Installing > /Users/kama/ws-git/apache/mshade/mshade-195/target/MSHADE-195-example-1-SNAPSHOT.jar > to > /Users/kama/.m2/repository/com/example/MSHADE-195-example/1-SNAPSHOT/MSHADE-195-example-1-SNAPSHOT.jar > [INFO] Installing > /Users/kama/ws-git/apache/mshade/mshade-195/dependency-reduced-pom.xml to > /Users/kama/.m2/repository/com/example/MSHADE-195-example/1-SNAPSHOT/MSHADE-195-example-1-SNAPSHOT.pom > [INFO] Installing > /Users/kama/ws-git/apache/mshade/mshade-195/target/MSHADE-195-example-1-SNAPSHOT-sources.jar > to > /Users/kama/.m2/repository/com/example/MSHADE-195-example/1-SNAPSHOT/MSHADE-195-example-1-SNAPSHOT-sources.jar > [INFO] Installing > /Users/kama/ws-git/apache/mshade/mshade-195/target/MSHADE-195-example-1-SNAPSHOT-sources.jar > to > /Users/kama/.m2/repository/com/example/MSHADE-195-example/1-SNAPSHOT/MSHADE-195-example-1-SNAPSHOT-sources.jar > [INFO] > {noformat} > Install plugin tries to install two identical artifacts which will work for > maven-install-plugin but would fail a deploy to repository manager (for > releases) etc. > So after diving into the problem i found the following code in maven-core > (MavenProject.java): > {code:java} > /** > * Add or replace an artifact. This method is now deprecated. Use the > @{MavenProjectHelper} to attach artifacts to a > * project. In spite of the 'throws' declaration on this API, this method > has never thrown an exception since Maven > * 3.0.x. Historically, it logged and ignored a second addition of the > same g/a/v/c/t. Now it replaces the file for > * the artifact, so that plugins (e.g. shade) can change the pathname of > the file for a particular set of > * coordinates. > * > * @param artifact the artifact to add or replace. > * @throws DuplicateArtifactAttachmentException > */ > public void addAttachedArtifact( Artifact artifact ) > throws DuplicateArtifactAttachmentException > { > getAttachedArtifacts().add( artifact ); > } > public List getAttachedArtifacts() > { > if ( attachedArtifacts == null ) > { > attachedArtifacts = new ArrayList<>(); > } > return attachedArtifacts; > } > {code} > So taking a look into MavenProjectHelper.java and the implementation > (DefaultMavenProjectHelper.java). > {code:java} > /** > * Add an attached artifact or replace the f
[jira] Commented: (MWAR-100) War overlay with merged web.xml
[ https://jira.codehaus.org/browse/MWAR-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=277450#comment-277450 ] Knut Vidar Siem commented on MWAR-100: -- >From the [Cactus project page|http://jakarta.apache.org/cactus/]: {quote} 2011/08/05 - Jakarta Cactus has been retired. {quote} I would like to see this issue resolved as well. Meanwhile, alternatives include: * [Cargo Maven2 Plugin|http://cargo.codehaus.org/Maven2+plugin] - [Merging WAR files|http://cargo.codehaus.org/Merging+WAR+files] * [XML Maven Plugin|http://mojo.codehaus.org/xml-maven-plugin/] - [XSL Transformation|http://mojo.codehaus.org/xml-maven-plugin/examples/transform-basic.html] This thread from StackOverflow.com could also be of interest: [Maven: Customize web.xml of web-app project|http://stackoverflow.com/questions/3298763/maven-customize-web-xml-of-web-app-project] > War overlay with merged web.xml > --- > > Key: MWAR-100 > URL: https://jira.codehaus.org/browse/MWAR-100 > Project: Maven 2.x WAR Plugin > Issue Type: Wish > Components: overlay >Affects Versions: 2.0 >Reporter: Anders Romin > Attachments: merge-web.xml.xslt > > > I'm looking for a way to use the war overlay feature and have the web.xml > merged with the content of both the parent war and the child war. > For example, we have two wars A and B, and B is depending on A using the > overlay feature. Now, I'd like all filters, servlets etc that are configured > in A to be available in the resulting war, as well as all filters, servlets > etc from B. If the id attributes clash, then the objects from B should be > used. > Any ideas how this could be accomplished? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MRELEASE-729) release:branch makes pom changes for branch in 'master' before branching
[ https://jira.codehaus.org/browse/MRELEASE-729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=310021#comment-310021 ] Knut Vidar Siem commented on MRELEASE-729: -- Isn't this the same problem as the one described in [MRELEASE-335|http://jira.codehaus.org/browse/MRELEASE-335]? I don't know if this aspect of the plugin varies between SCMs, but if not, the following property quadruple should at least let you branch without committing to the current branch/checkout/working copy. {{-DupdateBranchVersions=true -DupdateWorkingCopyVersions=false -DsuppressCommitBeforeBranch=true -DremoteTagging}}. (I have only tried this with Subversion.) > release:branch makes pom changes for branch in 'master' before branching > > > Key: MRELEASE-729 > URL: https://jira.codehaus.org/browse/MRELEASE-729 > Project: Maven 2.x Release Plugin > Issue Type: Bug > Components: branch, Git >Affects Versions: 2.2.2 >Reporter: Joseph Walton > > {{release:branch}} makes the change for the branch version before branching. > This means the version change is seen in the trunk's history. > If master is currently '1-SNAPSHOT': > {code} > * 1-SNAPSHOT [master] > {code} > and I create a new 'branch-with-hacks' branch as '1.hacks-SNAPSHOT' then I'll > see this in my log: > {code} > * 1-SNAPSHOT [master] > | > * 1.hacks-SNAPSHOT [branch-with-hacks] > | > * 1-SNAPSHOT > {code} > with a commit and a revert on master where I would expect: > {code} > * 1.hacks-SNAPSHOT [branch-with-hacks] > | > * 1-SNAPSHOT [master] > {code} > with 'master' remaining unaffected. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MNG-4099) Password encryption CLI switches should prompt for password if missing
[ https://jira.codehaus.org/browse/MNG-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=312502#comment-312502 ] Knut Vidar Siem commented on MNG-4099: -- As far as I can tell, the password collection is implemented in [org.apache.maven.cli.MavenCli#encryption(CliRequest)|http://maven.apache.org/ref/3.0.4/maven-embedder/xref/org/apache/maven/cli/MavenCli.html#483] using [commons-cli|http://commons.apache.org/cli/]. A straight-forward implementation prompting for the password while not echoing it would be to use [java.io.Console#readPassword()|http://docs.oracle.com/javase/6/docs/api/java/io/Console.html#readPassword()] from JDK6 if possible. Suggested pre-JDK6 solutions seem surprisingly complex, such as [concurrently sending backspace characters|http://web.archive.org/web/20110604072946/http://java.sun.com/developer/technicalArticles/Security/pwordmask/], or non-portable (JNI). There is a comment in the code suggesting that this functionality should be moved to a separate tool. Why is that and what kind of tool would that be, a plugin or a completely separate utility? > Password encryption CLI switches should prompt for password if missing > -- > > Key: MNG-4099 > URL: https://jira.codehaus.org/browse/MNG-4099 > Project: Maven 2 & 3 > Issue Type: Improvement > Components: Command Line >Affects Versions: 2.1.0 >Reporter: Mark Hobson >Priority: Trivial > Fix For: 3.x / Backlog > > > The -emp and -ep CLI switches should prompt for a password if the user omits > it. This would help to avoid having to escape shell characters in strong > passwords. > Note that the docs mention that these switches prompt for a password when > they do not: > http://maven.apache.org/guides/mini/guide-encryption.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira