[jira] Commented: (MNG-2426) Artifact copied to local repository with wrong file extension when using jboss-packaging plugin

2009-05-29 Thread Johannes Becker (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-2426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=178550#action_178550
 ] 

Johannes Becker commented on MNG-2426:
--

Jason, 

another workaround is you reference your ArtifactHandler directly as component. 
Supposed you defined an ArtifactHandler like this in components.xml:

component
roleorg.apache.maven.artifact.handler.ArtifactHandler/role
role-hintproduct/role-hint

implementationorg.apache.maven.artifact.handler.DefaultArtifactHandler/implementation
configuration
typeproduct/type
includesDependenciestrue/includesDependencies
languagejava/language
extensionzip/extension
addedToClasspathfalse/addedToClasspath
/configuration
/component

then you can reference it from your Mojo with:

/**
 * @component roleHint=product
 */
private ArtifactHandler artifactHandler;

And set it to the artifact with:

project.getArtifact().setArtifactHandler(artifactHandler);





 Artifact copied to local repository with wrong file extension when using 
 jboss-packaging plugin
 ---

 Key: MNG-2426
 URL: http://jira.codehaus.org/browse/MNG-2426
 Project: Maven 2
  Issue Type: Bug
  Components: Artifacts and Repositories
Affects Versions: 2.0.4
 Environment: jdk 1.5.0_06, maven 2.0.4, jboss-package-maven-plugin 
 2.0-SNAPSHOT (from mojo-sandbox SVN r2088)
Reporter: Fredrik Vraalsen
 Fix For: 2.2.x

 Attachments: bug.zip, FrigExtensionMojo.java


 When using the jboss-packaging plugin and setting packaging to jboss-sar in 
 my pom, the artifact is copied into the local repository with the wrong file 
 extension (.jboss-sar instead of .sar).  The jboss-packaging components.xml 
 has extension set to sar.  The file in the build target directory has the 
 correct .sar extension.
 Here's the relevant excerpt from my pom.xml:
 packagingjboss-sar/packaging
 ...
 build
 plugins
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdjboss-packaging-maven-plugin/artifactId
 version2.0-SNAPSHOT/version
 extensionstrue/extensions
 ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MNG-2426) Artifact copied to local repository with wrong file extension when using jboss-packaging plugin

2009-05-04 Thread James Roper (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-2426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=175095#action_175095
 ] 

James Roper commented on MNG-2426:
--

This bug can be worked around in any plugins that experience this problem, by 
adding something like this (I found this code in the Felix bundle plugin):

{code:java}
Artifact mainArtifact = currentProject.getArtifact();

// workaround for MNG-1682: force maven to install artifact using 
the jar handler
mainArtifact.setArtifactHandler( 
m_artifactHandlerManager.getArtifactHandler( jar ) );
{code}


 Artifact copied to local repository with wrong file extension when using 
 jboss-packaging plugin
 ---

 Key: MNG-2426
 URL: http://jira.codehaus.org/browse/MNG-2426
 Project: Maven 2
  Issue Type: Bug
  Components: Artifacts and Repositories
Affects Versions: 2.0.4
 Environment: jdk 1.5.0_06, maven 2.0.4, jboss-package-maven-plugin 
 2.0-SNAPSHOT (from mojo-sandbox SVN r2088)
Reporter: Fredrik Vraalsen
 Fix For: 2.2.x

 Attachments: bug.zip, FrigExtensionMojo.java


 When using the jboss-packaging plugin and setting packaging to jboss-sar in 
 my pom, the artifact is copied into the local repository with the wrong file 
 extension (.jboss-sar instead of .sar).  The jboss-packaging components.xml 
 has extension set to sar.  The file in the build target directory has the 
 correct .sar extension.
 Here's the relevant excerpt from my pom.xml:
 packagingjboss-sar/packaging
 ...
 build
 plugins
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdjboss-packaging-maven-plugin/artifactId
 version2.0-SNAPSHOT/version
 extensionstrue/extensions
 ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MNG-2426) Artifact copied to local repository with wrong file extension when using jboss-packaging plugin

2009-05-04 Thread Jason Chaffee (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-2426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=175096#action_175096
 ] 

Jason Chaffee commented on MNG-2426:


James,

How does this work with custom packaging and custom types declared in the 
component.xml?  For example, 

extensionbin/extension
typebin/type
packagingbin-bundle/packaging

Do I replace jar in the above example with bin or with bin-bundle?

 Artifact copied to local repository with wrong file extension when using 
 jboss-packaging plugin
 ---

 Key: MNG-2426
 URL: http://jira.codehaus.org/browse/MNG-2426
 Project: Maven 2
  Issue Type: Bug
  Components: Artifacts and Repositories
Affects Versions: 2.0.4
 Environment: jdk 1.5.0_06, maven 2.0.4, jboss-package-maven-plugin 
 2.0-SNAPSHOT (from mojo-sandbox SVN r2088)
Reporter: Fredrik Vraalsen
 Fix For: 2.2.x

 Attachments: bug.zip, FrigExtensionMojo.java


 When using the jboss-packaging plugin and setting packaging to jboss-sar in 
 my pom, the artifact is copied into the local repository with the wrong file 
 extension (.jboss-sar instead of .sar).  The jboss-packaging components.xml 
 has extension set to sar.  The file in the build target directory has the 
 correct .sar extension.
 Here's the relevant excerpt from my pom.xml:
 packagingjboss-sar/packaging
 ...
 build
 plugins
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdjboss-packaging-maven-plugin/artifactId
 version2.0-SNAPSHOT/version
 extensionstrue/extensions
 ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MNG-2426) Artifact copied to local repository with wrong file extension when using jboss-packaging plugin

2009-02-25 Thread Nigel Magnay (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-2426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=167041#action_167041
 ] 

Nigel Magnay commented on MNG-2426:
---

I just ran into this same issue with maven-2.0.10

 Artifact copied to local repository with wrong file extension when using 
 jboss-packaging plugin
 ---

 Key: MNG-2426
 URL: http://jira.codehaus.org/browse/MNG-2426
 Project: Maven 2
  Issue Type: Bug
  Components: Artifacts and Repositories
Affects Versions: 2.0.4
 Environment: jdk 1.5.0_06, maven 2.0.4, jboss-package-maven-plugin 
 2.0-SNAPSHOT (from mojo-sandbox SVN r2088)
Reporter: Fredrik Vraalsen
 Fix For: 2.0.x


 When using the jboss-packaging plugin and setting packaging to jboss-sar in 
 my pom, the artifact is copied into the local repository with the wrong file 
 extension (.jboss-sar instead of .sar).  The jboss-packaging components.xml 
 has extension set to sar.  The file in the build target directory has the 
 correct .sar extension.
 Here's the relevant excerpt from my pom.xml:
 packagingjboss-sar/packaging
 ...
 build
 plugins
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdjboss-packaging-maven-plugin/artifactId
 version2.0-SNAPSHOT/version
 extensionstrue/extensions
 ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MNG-2426) Artifact copied to local repository with wrong file extension when using jboss-packaging plugin

2009-02-25 Thread Nigel Magnay (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-2426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=167045#action_167045
 ] 

Nigel Magnay commented on MNG-2426:
---

I've also now tested it on 2.1.0-M1 - and that disappointingly also fails.
3.0-alpha-2 also fails (hard - it doesn't even create any artifacts at all) - 
but the 'alpha-2' is the hint here :-)

This is similar to the behaviour I saw in MNG-1682 way back in Nov 2005 (though 
this bug is getting pretty close to it's 3rd birthday too...) - but I think 
then it could be produced with only 1 plugin-with-extensions, rather than the 2 
here. It's a particularly nasty one, as it's come back to bite after lying 
dormant because we recently switched to flex-mojos which seems to have 
re-ignited this bug in our build. It took a few hours to track down why all of 
a sudden our artefacts were containing old build items (reason - the new ones 
had the wrong names in the repo, and those artifacts are later re-used in other 
artifacts further on).



 Artifact copied to local repository with wrong file extension when using 
 jboss-packaging plugin
 ---

 Key: MNG-2426
 URL: http://jira.codehaus.org/browse/MNG-2426
 Project: Maven 2
  Issue Type: Bug
  Components: Artifacts and Repositories
Affects Versions: 2.0.4
 Environment: jdk 1.5.0_06, maven 2.0.4, jboss-package-maven-plugin 
 2.0-SNAPSHOT (from mojo-sandbox SVN r2088)
Reporter: Fredrik Vraalsen
 Fix For: 2.0.x

 Attachments: bug.zip


 When using the jboss-packaging plugin and setting packaging to jboss-sar in 
 my pom, the artifact is copied into the local repository with the wrong file 
 extension (.jboss-sar instead of .sar).  The jboss-packaging components.xml 
 has extension set to sar.  The file in the build target directory has the 
 correct .sar extension.
 Here's the relevant excerpt from my pom.xml:
 packagingjboss-sar/packaging
 ...
 build
 plugins
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdjboss-packaging-maven-plugin/artifactId
 version2.0-SNAPSHOT/version
 extensionstrue/extensions
 ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MNG-2426) Artifact copied to local repository with wrong file extension when using jboss-packaging plugin

2009-02-25 Thread Jason Chaffee (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-2426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=167054#action_167054
 ] 

Jason Chaffee commented on MNG-2426:


I am of the opinion that this is a bug in Plexus.  

I am really perplexed why the maven team chose to use Plexus over more popular, 
better implemented, and battled tested containers such as Spring and 
PicoContainer. 
Even Bob Lee's Guice, which is a newer entry into DI and IoC would be an 
improvement.  Other Apache projects are built on top of spring (CXF, 
ServiceMix, Camel), so not sure why maven couldn't be as well.  

 Artifact copied to local repository with wrong file extension when using 
 jboss-packaging plugin
 ---

 Key: MNG-2426
 URL: http://jira.codehaus.org/browse/MNG-2426
 Project: Maven 2
  Issue Type: Bug
  Components: Artifacts and Repositories
Affects Versions: 2.0.4
 Environment: jdk 1.5.0_06, maven 2.0.4, jboss-package-maven-plugin 
 2.0-SNAPSHOT (from mojo-sandbox SVN r2088)
Reporter: Fredrik Vraalsen
 Fix For: 2.0.x

 Attachments: bug.zip


 When using the jboss-packaging plugin and setting packaging to jboss-sar in 
 my pom, the artifact is copied into the local repository with the wrong file 
 extension (.jboss-sar instead of .sar).  The jboss-packaging components.xml 
 has extension set to sar.  The file in the build target directory has the 
 correct .sar extension.
 Here's the relevant excerpt from my pom.xml:
 packagingjboss-sar/packaging
 ...
 build
 plugins
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdjboss-packaging-maven-plugin/artifactId
 version2.0-SNAPSHOT/version
 extensionstrue/extensions
 ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MNG-2426) Artifact copied to local repository with wrong file extension when using jboss-packaging plugin

2009-02-05 Thread Jason Chaffee (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-2426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=164151#action_164151
 ] 

Jason Chaffee commented on MNG-2426:


I just ran into this same issue with maven-2.0.9

 Artifact copied to local repository with wrong file extension when using 
 jboss-packaging plugin
 ---

 Key: MNG-2426
 URL: http://jira.codehaus.org/browse/MNG-2426
 Project: Maven 2
  Issue Type: Bug
  Components: Artifacts and Repositories
Affects Versions: 2.0.4
 Environment: jdk 1.5.0_06, maven 2.0.4, jboss-package-maven-plugin 
 2.0-SNAPSHOT (from mojo-sandbox SVN r2088)
Reporter: Fredrik Vraalsen
 Fix For: 2.0.x


 When using the jboss-packaging plugin and setting packaging to jboss-sar in 
 my pom, the artifact is copied into the local repository with the wrong file 
 extension (.jboss-sar instead of .sar).  The jboss-packaging components.xml 
 has extension set to sar.  The file in the build target directory has the 
 correct .sar extension.
 Here's the relevant excerpt from my pom.xml:
 packagingjboss-sar/packaging
 ...
 build
 plugins
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdjboss-packaging-maven-plugin/artifactId
 version2.0-SNAPSHOT/version
 extensionstrue/extensions
 ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MNG-2426) Artifact copied to local repository with wrong file extension when using jboss-packaging plugin

2006-07-07 Thread Kenney Westerhof (JIRA)
[ http://jira.codehaus.org/browse/MNG-2426?page=comments#action_69255 ] 

Kenney Westerhof commented on MNG-2426:
---

Actually, after the extensions are processed, the artifactHandler _is_ updated 
on the project,
except that the newly discovered artifact handler is not present in there.

some debug:

{noformat}
+ Error stacktraces are turned on.
Maven version: 2.1-SNAPSHOT
[INFO] Scanning for projects...
No artifact handler for type jboss-sar - using a default handler
java.lang.Throwable
at 
org.apache.maven.artifact.handler.manager.DefaultArtifactHandlerManager.getArtifactHandler(DefaultArtifactHandlerManager.java:42)
at 
org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:153)
at 
org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:114)
at 
org.apache.maven.artifact.factory.DefaultArtifactFactory.createArtifact(DefaultArtifactFactory.java:108)
at 
org.apache.maven.artifact.factory.DefaultArtifactFactory.createBuildArtifact(DefaultArtifactFactory.java:72)
at 
org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:903)
at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:754)
at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:425)
at 
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:194)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:580)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:512)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:412)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:338)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:171)
at 
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:689)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:372)
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:585)
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)
 EXTENSION NULL, USING TYPE: pom (classifier=null, packaging=null)
[INFO] FOUND PLUGIN COMPONENT: 
org.codehaus.mojo:jboss-packaging-maven-plugin:2.0-SNAPSHOT 
(org.codehaus.mojo:jboss-packaging-maven-plugin) 
jar:file:/home/forge/.m2/repository/org/codehaus/mojo/jboss-packaging-maven-plugin/2.0-SNAPSHOT/jboss-packaging-maven-plugin-2.0-S
NAPSHOT.jar!/META-INF/maven/plugin.xml [KEY: 
org.codehaus.mojo:jboss-packaging-maven-plugin] collector: [EMAIL PROTECTED]
[INFO] FOUND PLUGIN COMPONENT: 
org.codehaus.mojo:jboss-packaging-maven-plugin:2.0-SNAPSHOT 
(org.codehaus.mojo:jboss-packaging-maven-plugin) 
jar:file:/home/forge/.m2/repository/org/codehaus/mojo/jboss-packaging-maven-plugin/2.0-SNAPSHOT/jboss-packaging-maven-plugin-2.0-S
NAPSHOT.jar!/META-INF/maven/plugin.xml [KEY: 
org.codehaus.mojo:jboss-packaging-maven-plugin] collector: [EMAIL PROTECTED]
[INFO] Got 14 ArtifactHandlers from plugin jboss-packaging-maven-plugin
[INFO]   Handler: [EMAIL PROTECTED] (packaging: javadoc classifier=javadoc 
extension=jar)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: jar classifier=null 
extension=spring)
 EXTENSION NULL, USING TYPE: jar (classifier=null, packaging=jar)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: jar classifier=null 
extension=jar)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: ejb classifier=client 
extension=jar)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: jar classifier=tests 
extension=jar)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: java-source classifier=sources 
extension=jar)
 EXTENSION NULL, USING TYPE: ejb3 (classifier=null, packaging=ejb3)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: ejb3 classifier=null 
extension=ejb3)
 EXTENSION NULL, USING TYPE: ear (classifier=null, packaging=ear)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: ear classifier=null 
extension=ear)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: jar classifier=null 
extension=sar)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: ejb classifier=null 
extension=jar)
 EXTENSION NULL, USING TYPE: war (classifier=null, packaging=war)
[INFO]   Handler: [EMAIL PROTECTED] (packaging: war classifier=null 
extension=war)
 EXTENSION NULL, USING TYPE: par (classifier=null,