Re: Maven Assembly Plugin renaming jar

2017-11-24 Thread Sam Wilson
Oh, I should mention that I've tried this with maven-assembly-plugin 2.4
and 3.1.0.

Sam

On 11/24/2017 11:07 AM, Wilson, Sam wrote:
> Hey!
> 
> Hopefully you can help me out. Maven assembly plugin seems to be renaming a 
> jar file without being told to, and it’s messing up my MANIFEST.MF classpath.
> 
> You notice in the snippet of mvn -X below the assembly plugin seems to be 
> getting version 8.0.2, but it renames it to 8.0.0.
> 
> Thanks,
> Sam
> 
> ---
> mvn -X package
> --
> 
> […]
> [DEBUG] Adding dependency artifact com.example:MyArtifact:jar:8.0.0.
> [DEBUG] Adding artifact: com.example:MyArtifact:jar:8.0.0 with file: 
> /Users/me/.m2/repository/com/example/MyArtifact/8.0.2/MyArtifact-8.0.2.jar to 
> assembly location: lib/MyArtifact-8.0.0.jar.
> [DEBUG] Adding file: 
> /Users/me/.m2/repository/com/example/MyArtifact/8.0.2/MyArtifact-8.0.2.jar to 
> archive location: Project/lib/MyArtifact-8.0.0.jar
> […]
> 
> ---
> Project/pom.xml
> ---
> 
> 
> 
> 
> 
> 
> com.example
> MyArtifact
> [8.0.0-SNAPSHOT,9.0.0-SNAPSHOT)
> 
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-jar-plugin
> 2.4
> 
> 
> 
> true
> lib/
> com.example.MainClass
> 
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-assembly-plugin
> 2.2
> 
> 
> package
> 
> single
> 
> 
> 
> ${project.artifactId}
> 
> 
> false
> 
> 
> src/assembly/bin.xml
> 
> false
> 
> 
> 
> 
> 
> 
> ---
> Project/src/assembly/bin.xml
> ---
> 
>  
> xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> 
> xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
>  http://maven.apache.org/xsd/assembly-1.1.0.xsd;>
> bin
> ${artifactId}
> 
> tar.gz
> dir
> 
> 
> 
> false
> false
> runtime
> lib
> 
> 
> 
> 
> 
> target/${artifactId}-${version}.${packaging}
> /
> ${artifactId}.${packaging}
> 
> 
> 
> src/main/resources/ProjectConfiguration.properties
> ${artifactId}.properties
> /
> 
> 
> log4j2.xml
> /
> 
> 
> 
> 

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Run plugin after modules complete in multi-module project

2008-09-24 Thread Sam Wilson
Hello List,

I am putting together a multi-module project that I would like, at the end,
to bundle up two or three of the sub-modules into a .tar.gz with
accompanying documentation (app consists of multiple components that are
deployed separately).

I had started out with the idea of include a meta-module that would
execute last. This module would contain the documentation as well as the
maven-assembly plugin configuration to combine everything into the final
archive.

However, upon review of the maven-assembly plugin's descriptor doc I noticed
that it has built-in support for packaging sub-modules through the
moduleSets element.

I liked this idea better because it makes sense that the parent project
wraps up the child projects. It also means one fewer POM to keep around and
maintain.

Unfortunately it does not seem as though there is a way to attach this
assembly plugin to the root-pom project's lifecycle in such a way that it
will be run after all the child modules have been produced. So I am stuck
having to run this as a separate goal on the command-line. That's not a
terrible issue, but it just feels unclean.

I've done some searching and haven't found a way to do this. Have I missed
something? If not, does this make sense as something I should submit as a
feature request?

My thinking is that there should be some additional phases for multi-module
projects. For example: pre-modules and post-modules. Basically these would
be executed before/after all the submodules are addressed.

Thanks for your feedback.

Sam Wilson


RE: Antwort: RE: Proxy settings

2006-12-04 Thread Sam Wilson
I completely agree with both statements:

1) snapshot dependency that you can not control is a mess, in 
a customer project ... build the plugin from source with your custom
artifactId and deploy it to your repository

and

2) A released plugin should not have a repository entry in his pom.xml

I ran into this recently when people.apache.org was down during a data
center move. I was just setting up my repository the day before so I got
caught in the maelstrom before I could take corrective action. 

However, a fair number of released plugins had references to
people.apache.org that should not have been there. This tends to be a
real problem with codehaus projects.

At the very least, snapshot and release repositories should be properly
labeled as such if they are going to be included.

sw

-Original Message-
From: Mohni, Daniel [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 04, 2006 9:15 AM
To: archiva-users@maven.apache.org
Subject: RE: Antwort: RE: Proxy settings

Hello again

all I can say about this is that a lot of the current maven2 plugins
are still in development and not in release state. this is
also why they have this snapshot repositories in their pom...

but they are going to be stable quite soon, hopefully...

using snapshot dependency that you can not control is a mess, in 
a customer project.

If you realy need a snapshot version for your project, then the
workaround is to build the plugin from source with your custom
artifactId and deploy it to your repository. it's not very nice
but in this case you have control over the used version in your project
until the plugin is stable.

A released plugin should not have a repository entry in his pom.xml !!!
that's my opinion, but maybe it's wrong... 

Maybe someone else can help you out

sorry

Daniel
 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Monday, December 04, 2006 2:51 PM
 To: archiva-users@maven.apache.org
 Subject: Antwort: RE: Proxy settings
 
 Hi Daniel,
 
 What do I do if POM.xml of a plugin says this:
 
 repositories
 repository
 idapache-snapshots/id
 nameSnapshot repository/name
 urlhttp://people.apache.org/maven-snapshot-repository//url
 /repository
 /repositories
 
 but the plugin cannot be found in this repository? Like in the JSP 
 compiler maven plugin from codehaus.
 
 My problem is the id. Every project defines their own id. 
 For some, it's 
 codehaus, for others it's codehaus.org. For another 
 group, codehaus 
 is for releases, while codehaus.org is for snapshots.
 
 This means the id *cannot* be used to map mirrors to URLs.
 
 Therefore, I need a solution in archiva which I can feed with 
 arbitrary 
 URLs and which either goes to a stable inhouse repository or 
 downloads the 
 resource from the URL and caches it.
 
 Having users define proxied repositories manually and map 
 them to managed 
 repositories is not the solution, it's another layer of 
 problems. Archia 
 should support a generic proxy/cache which just stores a 
 resource under an 
 URL. So when I ask for apache.org/.../plugin-1.3.pom and for 
 codehaus.org/.../plugin-1.3.pom, I should get two different 
 files if they 
 are different on the respective servers.
 
 On disk, you can just use the hostname as the first item in 
 the path to 
 distinguish between the different artefacts.
 
 In the webapp, it should be possible to freeze certain URLs (for 
 example, if the files on the web are broken or I'm using a 
 patched version 
 inhouse).
 
 With this solution, I could use the Maven proxy settings 
 (instead of the 
 broken mirror stuff) to download artefacts for my development 
 team *once*.
 
 Regards,
 
 -- 
 Aaron Digulla
 
 Mohni, Daniel [EMAIL PROTECTED] schrieb am 04.12.2006 
 11:31:28:
 
  Hello Aaron
  
  this can be done setting the mirror in settings.xml
  
   mirrors
 mirror
   idproxy.central/id
 mirrorOfcentral/mirrorOf
  nameInternal Mirror of central./name
 urlhttp://archiva/proxy/maven_release/url
  /mirror
/mirrors
  
  - if you use proxy in the url then archiva will try to download
 missing artefacts from the proxied repo setup in archiva
  
 http://archiva/proxy/maven_release
  
  - if you use repository in the url then archiva will only be
 a cache provider for your already downloaded artefacts
  
 http://archiva/repository/maven_release
  
  maven_release is our internal proxy repository...
  
  I don't know if this is still like this in the current daily build
  as I didn't tried it...
  
  hth
  
  Daniel
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
   Sent: Monday, December 04, 2006 11:19 AM
   To: archiva-users@maven.apache.org
   Subject: Proxy settings
   
   Hello,
   
   We're using maven for internal development. Since the 
   internet as a whole 
   and our connection to it especially are not always reliable 
   (for example, 
   a new version of a