Re: Maven dependencies - best practice

2013-01-16 Thread thorsten . heit
Hi,

 I am testing the Maven dependecies. In a parent-child project 
arhitecture I
 am using many frameworks
 (log4j, xdoclet, etc) and these are installed in may local repository 
and I
 am able to use them.
 
 I created and installed a POM, called x-deps, to manage the 
dependecies:

*snip*

 
 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
 http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/xsd/maven-4.0.0.xsd;
   modelVersion4.0.0/modelVersion
   groupIdsk/groupId
   artifactIdx-deps/artifactId
   version0.0.1-SNAPSHOT/version
   packagingpom/packaging
   dependencyManagement
   dependencies
   dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
   version1.2.8/version
   /dependency
   dependency
   groupIdxdoclet/groupId
   artifactIdxdoclet/artifactId
   version2.0.3/version
   /dependency
   /dependencies
   /dependencyManagement
 /project
 
 In a parent POM, called a, I set the dependecyManager for x-deps:
 
 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
 http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/xsd/maven-4.0.0.xsd;
   modelVersion4.0.0/modelVersion
   groupIdsk/groupId
   artifactIda/artifactId
   version0.0.1-SNAPSHOT/version
   packagingpom/packaging
   modules
   module../b/module
   /modules
   dependencyManagement
   dependencies
   dependency
   groupIdsk/groupId
   artifactIdx-deps/artifactId
   version0.0.1-SNAPSHOT/version
   typepom/type
   /dependency
   /dependencies
   /dependencyManagement
 /project
 
 In its child POM, called b, I would like to add the dependency only 
for
 log4j:
 
 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
 http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/xsd/maven-4.0.0.xsd;
   modelVersion4.0.0/modelVersion
   artifactIdb/artifactId
   parent
   groupIdsk/groupId
   artifactIda/artifactId
   version0.0.1-SNAPSHOT/version
   /parent
   dependencies
   dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
   /dependency
   /dependencies
 /project
 
 When I want to validate my POM a I get this error:
 
 error: 'dependencies.dependency.version' for log4j:logj:jar is missing
 
 Can somebody help me?

Quite easy:
In the referenced parent sk:a:0.0.1-SNAPSHOT you only manage a dependency 
for sk:x-deps:0.0.1-SNAPSHOT (which isn't used in b, btw), but not for the 
real dependencies you're using in your project b...

To use them, move the dependency management section from x-deps to your 
project a. That should do the trick.


HTH

Thorsten

Packaging up pre-existing jar and source jar

2013-01-16 Thread Joachim Durchholz

Hi all,

sorry if this is a FAQ but I didn't find instructions on maven.org for this.

I'm provided with a lib.jar and lib-sources.jar.
How do I make Maven generate an artifact from these, without recompiling 
the sources? (lib-sources.jar needs to be available for debugging when 
importing the artifact as a dependency in other Maven projects.)


Any feedback appreciated!
Jo

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



Re: Maven dependencies - best practice

2013-01-16 Thread Thomas Broyer
You need to use the 'import' scope:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies

On Tue, Jan 15, 2013 at 6:16 PM, Abitfarago Cini
ciniabitfar...@gmail.com wrote:
 Hi,

 I am testing the Maven dependecies. In a parent-child project arhitecture I
 am using many frameworks
 (log4j, xdoclet, etc) and these are installed in may local repository and I
 am able to use them.

 I created and installed a POM, called x-deps, to manage the dependecies:

 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
 http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/xsd/maven-4.0.0.xsd;
   modelVersion4.0.0/modelVersion
   groupIdsk/groupId
   artifactIdx-deps/artifactId
   version0.0.1-SNAPSHOT/version
   packagingpom/packaging
   dependencyManagement
   dependencies
   dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
   version1.2.8/version
   /dependency
   dependency
   groupIdxdoclet/groupId
   artifactIdxdoclet/artifactId
   version2.0.3/version
   /dependency
   /dependencies
   /dependencyManagement
 /project

 In a parent POM, called a, I set the dependecyManager for x-deps:

 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
 http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/xsd/maven-4.0.0.xsd;
   modelVersion4.0.0/modelVersion
   groupIdsk/groupId
   artifactIda/artifactId
   version0.0.1-SNAPSHOT/version
   packagingpom/packaging
   modules
   module../b/module
   /modules
   dependencyManagement
   dependencies
   dependency
   groupIdsk/groupId
   artifactIdx-deps/artifactId
   version0.0.1-SNAPSHOT/version
   typepom/type
   /dependency
   /dependencies
   /dependencyManagement
 /project

 In its child POM, called b, I would like to add the dependency only for
 log4j:

 project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
 http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/xsd/maven-4.0.0.xsd;
   modelVersion4.0.0/modelVersion
   artifactIdb/artifactId
   parent
   groupIdsk/groupId
   artifactIda/artifactId
   version0.0.1-SNAPSHOT/version
   /parent
   dependencies
   dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
   /dependency
   /dependencies
 /project

 When I want to validate my POM a I get this error:

 error: 'dependencies.dependency.version' for log4j:logj:jar is missing

 Can somebody help me?

 SK



-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/

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



Re: Packaging up pre-existing jar and source jar

2013-01-16 Thread Anders Hammar
You already have the artifacts. You just need to create the pom (with the
correct metadata) and deploy the pom, lib.jar and lib-sources.jar to your
maven repository. There are different ways of doing this, depending on your
environment.

/Anders


On Wed, Jan 16, 2013 at 11:08 AM, Joachim Durchholz j...@durchholz.orgwrote:

 Hi all,

 sorry if this is a FAQ but I didn't find instructions on maven.org for
 this.

 I'm provided with a lib.jar and lib-sources.jar.
 How do I make Maven generate an artifact from these, without recompiling
 the sources? (lib-sources.jar needs to be available for debugging when
 importing the artifact as a dependency in other Maven projects.)

 Any feedback appreciated!
 Jo

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




Re: Packaging up pre-existing jar and source jar

2013-01-16 Thread Francesco Mari
Take a look at the deploy-file mojo [0]. There is a brief explanation
of it in the Usage page of the deploy plugin [1].

[0] http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
[1] http://maven.apache.org/plugins/maven-deploy-plugin/usage.html

2013/1/16 Anders Hammar and...@hammar.net:
 You already have the artifacts. You just need to create the pom (with the
 correct metadata) and deploy the pom, lib.jar and lib-sources.jar to your
 maven repository. There are different ways of doing this, depending on your
 environment.

 /Anders


 On Wed, Jan 16, 2013 at 11:08 AM, Joachim Durchholz j...@durchholz.orgwrote:

 Hi all,

 sorry if this is a FAQ but I didn't find instructions on maven.org for
 this.

 I'm provided with a lib.jar and lib-sources.jar.
 How do I make Maven generate an artifact from these, without recompiling
 the sources? (lib-sources.jar needs to be available for debugging when
 importing the artifact as a dependency in other Maven projects.)

 Any feedback appreciated!
 Jo

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@maven.**apache.orgusers-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: Packaging up pre-existing jar and source jar

2013-01-16 Thread Anders Hammar
Or, if you have a repo manager it probably also provides a GUI to do this.

/Anders


On Wed, Jan 16, 2013 at 1:08 PM, Francesco Mari mari.france...@gmail.comwrote:

 Take a look at the deploy-file mojo [0]. There is a brief explanation
 of it in the Usage page of the deploy plugin [1].

 [0]
 http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
 [1] http://maven.apache.org/plugins/maven-deploy-plugin/usage.html

 2013/1/16 Anders Hammar and...@hammar.net:
  You already have the artifacts. You just need to create the pom (with the
  correct metadata) and deploy the pom, lib.jar and lib-sources.jar to your
  maven repository. There are different ways of doing this, depending on
 your
  environment.
 
  /Anders
 
 
  On Wed, Jan 16, 2013 at 11:08 AM, Joachim Durchholz j...@durchholz.org
 wrote:
 
  Hi all,
 
  sorry if this is a FAQ but I didn't find instructions on maven.org for
  this.
 
  I'm provided with a lib.jar and lib-sources.jar.
  How do I make Maven generate an artifact from these, without recompiling
  the sources? (lib-sources.jar needs to be available for debugging when
  importing the artifact as a dependency in other Maven projects.)
 
  Any feedback appreciated!
  Jo
 
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org
 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




Using maven properties inside .java inside annotation in a clean way

2013-01-16 Thread Baptiste MATHUS
Hi all,

Note: I know the standard approach to this subject: filtering a .properties
file and reading it.
But this does not work when you actually want to use the value inside an
annotation attribute (needs to be a real constant).

We actually bind our EJB on specific JNDI URL by doing something like:

@Stateless
@EJB(name = java:global/someejb-${project.version})
public class SomeEJB31 { ... }

Does someone have an idea on how to solve this cleanly?

We already have a running solution using a dark magical combination of
antrun/build-helper manipulations, but this gives us a complicated pom to
maintain and moreover M2E doesn't like it at all.

Thanks for any hint!

Cheers


-- 
Baptiste Batmat MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !


Re: Using maven properties inside .java inside annotation in a clean way

2013-01-16 Thread tobias maslowski
This actually sounds like fighting the bad fight with maven to me, it is
a management tool, not a part of your bl(please correct me if I got this
wrong). I doubt there is a way to do this in a way I would call clean.
However, as anybody has rights to fight bad fights, you could configure
your resource plugin to filter the sources in the copy resources phase or
whatever, exclude the unfiltered sources for compilation and include the
filtered ones.

Never done this, never will do this, but it propably works.


Re: maven-nar-plugin (version?)

2013-01-16 Thread Mark H. Wood
On Tue, Jan 15, 2013 at 09:22:33PM -0500, Benson Margulies wrote:
 Nar is not a product of the Maven PMC, and so will never be an
 official org.apache.maven.plugin anything.

Right, but whose product is it today and how do we find the latest
official release?

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
There's an app for that:  your browser


pgptT8ujHnAFV.pgp
Description: PGP signature


Re: maven-nar-plugin (version?)

2013-01-16 Thread Wayne Fay
 Nar is not a product of the Maven PMC, and so will never be an
 official org.apache.maven.plugin anything.

 Right, but whose product is it today and how do we find the latest
 official release?

The groupId suggests that would be codeswarm.org. But there may be
other parties who have their own branches etc.

Wayne

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



Re: maven-nar-plugin (version?)

2013-01-16 Thread Mark Donszelmann
Hi

I wrote the NAR plugin, but have no longer time to maintain it. 

I donated it (with approval of Sonatype) to a bunch of people who would like to 
maintain it. 

Its under

https://github.com/maven-nar

I guess with mailing lists and doc

Regards
Mark Donszelmann (duns)
On Jan 16, 2013, at 3:44 PM, Wayne Fay wayne...@gmail.com wrote:

 Nar is not a product of the Maven PMC, and so will never be an
 official org.apache.maven.plugin anything.
 
 Right, but whose product is it today and how do we find the latest
 official release?
 
 The groupId suggests that would be codeswarm.org. But there may be
 other parties who have their own branches etc.
 
 Wayne
 
 -
 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: Using maven properties inside .java inside annotation in a clean way

2013-01-16 Thread Anders Hammar
What app server? If you're using JBoss I believe you could configure this
in the jboss specific deployment descriptor, which you can filter. May be
similar support in other app servers.

/Anders


On Wed, Jan 16, 2013 at 3:01 PM, Baptiste MATHUS m...@batmat.net wrote:

 Hi all,

 Note: I know the standard approach to this subject: filtering a .properties
 file and reading it.
 But this does not work when you actually want to use the value inside an
 annotation attribute (needs to be a real constant).

 We actually bind our EJB on specific JNDI URL by doing something like:

 @Stateless
 @EJB(name = java:global/someejb-${project.version})
 public class SomeEJB31 { ... }

 Does someone have an idea on how to solve this cleanly?

 We already have a running solution using a dark magical combination of
 antrun/build-helper manipulations, but this gives us a complicated pom to
 maintain and moreover M2E doesn't like it at all.

 Thanks for any hint!

 Cheers


 --
 Baptiste Batmat MATHUS - http://batmat.net
 Sauvez un arbre,
 Mangez un castor !



Re: maven-nar-plugin (version?)

2013-01-16 Thread Curtis Rueden
Hi all,

We are still unifying the various forks of maven-nar-plugin, so there is no
new official release version yet.

The maven-nar mailing list is at:
https://groups.google.com/forum/?fromgroups#!forum/maven-nar

It seems that all of the involved people are very busy, so progress is
rather slow. We welcome any additional help!

To avoid confusion, I updated the project readme (at
https://github.com/maven-nar/maven-nar-plugin) to reflect the current
project status and links, including a link to the mailing list.

Regards,
Curtis


On Wed, Jan 16, 2013 at 8:53 AM, Mark Donszelmann 
mark.donszelm...@gmail.com wrote:

 Hi

 I wrote the NAR plugin, but have no longer time to maintain it.

 I donated it (with approval of Sonatype) to a bunch of people who would
 like to maintain it.

 Its under

 https://github.com/maven-nar

 I guess with mailing lists and doc

 Regards
 Mark Donszelmann (duns)
 On Jan 16, 2013, at 3:44 PM, Wayne Fay wayne...@gmail.com wrote:

  Nar is not a product of the Maven PMC, and so will never be an
  official org.apache.maven.plugin anything.
 
  Right, but whose product is it today and how do we find the latest
  official release?
 
  The groupId suggests that would be codeswarm.org. But there may be
  other parties who have their own branches etc.
 
  Wayne
 
  -
  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: Using maven properties inside .java inside annotation in a clean way

2013-01-16 Thread Jörg Schaible
Hi Baptiste,

Baptiste MATHUS wrote:

 Hi all,
 
 Note: I know the standard approach to this subject: filtering a
 .properties file and reading it.
 But this does not work when you actually want to use the value inside an
 annotation attribute (needs to be a real constant).
 
 We actually bind our EJB on specific JNDI URL by doing something like:
 
 @Stateless
 @EJB(name = java:global/someejb-${project.version})
 public class SomeEJB31 { ... }
 
 Does someone have an idea on how to solve this cleanly?
 
 We already have a running solution using a dark magical combination of
 antrun/build-helper manipulations, but this gives us a complicated pom to
 maintain and moreover M2E doesn't like it at all.

What are you up to? Do you really want to address you EJBs with java-
gobal/someejb-2.3.12-SNAPSHOT? Or is it more like java-gobal/someejb-2.3 
, i.e. a major.minor pattern?

If it is the latter, you might simply use sed and a regular expression to 
update the files from command line every time you update a major/minor 
version and ensure with the verifier plugin, that no java file contains an 
@EJB line that does not contain current major.minor.

- Jörg


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



Write dependency information to a file (new custom plugin)

2013-01-16 Thread Danny Schimke
Hi,

for 3 years now I have no more experience with Maven. But today I got a
challenge. I have to resolve the projects dependencies and write those into
a file. There already a template file exists with placeholders where to
replace with the dependencies. Finally the file will be copied to a
specified directory. The output should be plain text as well XML depending
upon the POMs configuration. It should be possible to configure in the pom
which artifacts are written/captured. Important is to gather the version of
depending artifacts in a file.

Entire thoughts were to write a new maven plugin. But then I need to call
the dependency:resolve plugin within my plugin and use its result to
achieve my goal. How can I do this?

Are there other possible and good solutions to do it (maybe using Groovy
script and call mvn on command line)?

Thanks a lot!

-- 
Mit freundlichen Grüßen / Kind regards
-Danny Schimke*


Place To Remember* (Android- App)
goo.gl/M9OGs - *Free*
goo.gl/A8bZ3 - *Donate*

Viel Spaß und vielen Dank!


Upload arbitrary directories to maven repositories

2013-01-16 Thread Kuehlert, Burkhard
Hi,

is it possible to upload arbitrary directories or filesets to maven 
repositories ? It seems to me, that artifacts have to be of type file and not 
directory.
Is that right?

Thanks
Burkhard Kuehlert

WINCOR NIXDORF International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht 
gestattet.

This e-mail may contain confidential information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.


Maven (3.0.4) dependency plugin difference in ordering between build-classpath and tree

2013-01-16 Thread Pram
Hi,

I posted a question on Stackoverflow yesterday 
(http://stackoverflow.com/questions/14336801/maven-dependency-plugin-difference-in-ordering-between-build-classpath-and-tree)
 and it was recommended that I ask it again on the user mailing list.

Essentially I'm seeing a difference in the ordering of the output of tree and 
build-classpath.

Output from tree http://pastebin.com/J2Q6iTK6
Output from build-classpath http://pastebin.com/k2SdrHP7

Can anyone provide any insight into why this may be happening?

thanks

Pram

Additional info

Running this command to generate tree

mvn -pl releases org.apache.maven.plugins:maven-dependency-plugin:2.6:tree 
-Dtokens=whitespace -outputFile=tree.txt -DexcludeTransitive=true


Maven config for build-classpath

             plugin
                groupIdorg.apache.maven.plugins/groupId
                artifactIdmaven-dependency-plugin/artifactId
                version2.6/version
                executions
                    execution
                        idgenerate-classpath-windows/id
                        phasegenerate-resources/phase
                        goals
                            goalbuild-classpath/goal
                        /goals
                        configuration
                            pathSeparator,/pathSeparator
                            prefix..\jars/prefix
                            fileSeparator\/fileSeparator
                            
outputFile${project.build.directory}/deployment/bin/classpath.windows/outputFile
                        /configuration
                    /execution
                    execution
                        idgenerate-classpath-unix/id
                        phasegenerate-sources/phase
                        goals
                            goalbuild-classpath/goal
                        /goals
                        configuration
                            pathSeparator:/pathSeparator
                            prefix../jars/prefix
                            fileSeparator//fileSeparator
                            
outputFile${project.build.directory}/deployment/bin/classpath.unix/outputFile
                        /configuration
                    /execution
                    execution
                        idcopy-dependencies/id
                        phasepackage/phase
                        goals
                            goalcopy-dependencies/goal
                        /goals
                        configuration
                            
outputDirectory${project.build.directory}/deployment/jars/outputDirectory
                        /configuration
                    /execution
                /executions
                configuration
                    overWriteReleasesfalse/overWriteReleases
                    overWriteSnapshotstrue/overWriteSnapshots
                    overWriteIfNewertrue/overWriteIfNewer
                    excludeTransitivetrue/excludeTransitive
                    includeScoperuntime/includeScope
                    regenerateFiletrue/regenerateFile
                /configuration
            /plugin

Version info

Info

    Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+)
    Maven home: C:\apps\apache-maven-3.0.4
    Java version: 1.6.0_37, vendor: Sun Microsystems Inc.
    Java home: C:\Program Files\Java\jdk1.6.0_37\jre
    Default locale: en_GB, platform encoding: Cp1252
    OS name: windows 7, version: 6.1, arch: x86, family: windows


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



Re: Upload arbitrary directories to maven repositories

2013-01-16 Thread Ron Wheeler

Would you not include them in a jar or assembly and upload that?

Ron
On 16/01/2013 12:00 PM, Kuehlert, Burkhard wrote:

Hi,

is it possible to upload arbitrary directories or filesets to maven 
repositories ? It seems to me, that artifacts have to be of type file and not 
directory.
Is that right?

Thanks
Burkhard Kuehlert

WINCOR NIXDORF International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht 
gestattet.

This e-mail may contain confidential information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.




--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Re: Packaging up pre-existing jar and source jar

2013-01-16 Thread Ron Wheeler

If you want them both in one artifact:
Use a pom packaging type with the dependencies  lib.jar and 
lib-sources.jar.

Use the Assembly plugin to make a jar with both jars inside.

If you want them as individual artifacts:
If you are running Nexus as your Maven Repository, I think that you can 
just upload each jar and Nexus will generate a minimal POM with the 
specified GAV that can be downloaded by Maven just like any jar that you 
built from sources.


Ron


On 16/01/2013 5:08 AM, Joachim Durchholz wrote:

Hi all,

sorry if this is a FAQ but I didn't find instructions on maven.org for 
this.


I'm provided with a lib.jar and lib-sources.jar.
How do I make Maven generate an artifact from these, without 
recompiling the sources? (lib-sources.jar needs to be available for 
debugging when importing the artifact as a dependency in other Maven 
projects.)


Any feedback appreciated!
Jo

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





--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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



Recall: How to publishing artifact including transitive dependencies

2013-01-16 Thread Katpally, SriharshaReddy
Katpally, SriharshaReddy would like to recall the message, How to publishing 
artifact including transitive dependencies.


Re: Upload arbitrary directories to maven repositories

2013-01-16 Thread Lyons, Roy

Perhaps this is what you want?

http://mojo.codehaus.org/wagon-maven-plugin/merge-maven-repos-mojo.html



On 1/16/13 11:00 AM, Kuehlert, Burkhard
burkhard.kuehl...@wincor-nixdorf.com wrote:

Hi,

is it possible to upload arbitrary directories or filesets to maven
repositories ? It seems to me, that artifacts have to be of type file and
not directory.
Is that right?

Thanks
Burkhard Kuehlert

WINCOR NIXDORF International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr.
DE44477193

Diese E-Mail enthält vertrauliche Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet.

This e-mail may contain confidential information.
If you are not the intended recipient (or have received this e-mail in
error)
please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in
this e-mail is strictly forbidden.


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



Re: Write dependency information to a file (new custom plugin)

2013-01-16 Thread Robert Scholte

Hi,

Use the dependencies-report[1] as inspiration.
This will create a HTML page looking something like this[2]
The source-repository page[3] will explain how you can get the sources.

Robert

[1]  
http://maven.apache.org/plugins/maven-project-info-reports-plugin/dependencies-mojo.html
[2]  
http://maven.apache.org/plugins/maven-project-info-reports-plugin/dependencies.html
[3]  
http://maven.apache.org/plugins/maven-project-info-reports-plugin/source-repository.html



Op Wed, 16 Jan 2013 20:33:46 +0100 schreef Danny Schimke  
danny.schi...@googlemail.com:



Hi,

for 3 years now I have no more experience with Maven. But today I got a
challenge. I have to resolve the projects dependencies and write those  
into

a file. There already a template file exists with placeholders where to
replace with the dependencies. Finally the file will be copied to a
specified directory. The output should be plain text as well XML  
depending
upon the POMs configuration. It should be possible to configure in the  
pom
which artifacts are written/captured. Important is to gather the version  
of

depending artifacts in a file.

Entire thoughts were to write a new maven plugin. But then I need to call
the dependency:resolve plugin within my plugin and use its result to
achieve my goal. How can I do this?

Are there other possible and good solutions to do it (maybe using Groovy
script and call mvn on command line)?

Thanks a lot!


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



Re: Write dependency information to a file (new custom plugin)

2013-01-16 Thread Curtis Rueden
Hi Danny,

Does it *have* to be done from within the Maven build infrastructure? That
is, do you really need it to be a Maven goal? Because this problem sounds
much, much easier to achieve with a shell script.

Start with:
   mvn dependency:list
or
   mvn dependency:tree

And massage the result using GNU tools (sed, grep, etc.) to do what you
want.

E.g., for plain text, something like:
   mvn dependency:list \
  | grep '^\[INFO\]\w' \
  | sed 's/^\[INFO\] *//' \
   dependencies.txt

Or for XML, something like (-E flag on OS X only):
   mvn dependency:list \
  | grep '^\[INFO\]\w' \
  | sed -E 's/^\[INFO\]
*([^:]*):([^:]*):([^:]*):([^:]*):([^:]*)/dependencygroupId\1\/groupIdartifactId\2\/artifactIdpackaging\3\/packagingversion\4\/versionscope\5\/scope\/dependency/'

I am not a shell scripting ninja so there are surely tons of
shorter/better/cuter ways of doing it, but you get the idea.

Regards,
Curtis


On Wed, Jan 16, 2013 at 1:33 PM, Danny Schimke danny.schi...@googlemail.com
 wrote:

 Hi,

 for 3 years now I have no more experience with Maven. But today I got a
 challenge. I have to resolve the projects dependencies and write those into
 a file. There already a template file exists with placeholders where to
 replace with the dependencies. Finally the file will be copied to a
 specified directory. The output should be plain text as well XML depending
 upon the POMs configuration. It should be possible to configure in the pom
 which artifacts are written/captured. Important is to gather the version of
 depending artifacts in a file.

 Entire thoughts were to write a new maven plugin. But then I need to call
 the dependency:resolve plugin within my plugin and use its result to
 achieve my goal. How can I do this?

 Are there other possible and good solutions to do it (maybe using Groovy
 script and call mvn on command line)?

 Thanks a lot!

 --
 Mit freundlichen Grüßen / Kind regards
 -Danny Schimke*


 Place To Remember* (Android- App)
 goo.gl/M9OGs - *Free*
 goo.gl/A8bZ3 - *Donate*

 Viel Spaß und vielen Dank!



Re: Upload arbitrary directories to maven repositories

2013-01-16 Thread Barrie Treloar
And you might want to answer:

Why do you want to upload an arbitrary directory?
You are probably straying from the Maven path doing this.
You should be thinking in terms of artifacts generated by your projects.


On 17 January 2013 07:48, Ron Wheeler rwhee...@artifact-software.com wrote:
 Would you not include them in a jar or assembly and upload that?

 Ron

 On 16/01/2013 12:00 PM, Kuehlert, Burkhard wrote:

 Hi,

 is it possible to upload arbitrary directories or filesets to maven
 repositories ? It seems to me, that artifacts have to be of type file and
 not directory.
 Is that right?

 Thanks
 Burkhard Kuehlert

 WINCOR NIXDORF International GmbH
 Sitz der Gesellschaft: Paderborn
 Registergericht Paderborn HRB 3507
 Geschäftsführer: Eckard Heidloff (Vorsitzender), Dr. Jürgen Wunram
 Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
 Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr.
 DE44477193

 Diese E-Mail enthält vertrauliche Informationen.
 Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
 erhalten haben,
 informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
 Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist
 nicht gestattet.

 This e-mail may contain confidential information.
 If you are not the intended recipient (or have received this e-mail in
 error)
 please notify the sender immediately and destroy this e-mail.
 Any unauthorised copying, disclosure or distribution of the material in
 this e-mail is strictly forbidden.



 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


 -
 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



Exclusing JSP files from war file

2013-01-16 Thread anjibman
Hi All,

I have all JSP files in \views and subfolders as following:

src\main\webapp\WEB-INF\views\error.jsp
src\main\webapp\WEB-INF\views\mobile\home.jsp
src\main\webapp\WEB-INF\views\mobile\register\register.jsp
src\main\webapp\WEB-INF\views\normal\home.jsp
src\main\webapp\WEB-INF\views\normal\register\register.jsp

I am trying to exclude all these JSP from WAR file so I have plugin define
in pom.xml as
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-war-plugin/artifactId
   configuration
 webXml${basedir}/target/jspweb.xml/webXml  
 warSourceExcludes**/*.jsp/warSourceExcludes
   /configuration
/plugin

But I can still see all JAR files in WAR file. Can any one tell me what I am
doing wrong? Am I not writing path expression correctly? If so what will be
correct pattern for such.

Thanks




--
View this message in context: 
http://maven.40175.n5.nabble.com/Exclusing-JSP-files-from-war-file-tp5743546.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Exclusing JSP files from war file

2013-01-16 Thread Barrie Treloar
On 17 January 2013 09:20, anjibman anji...@hotmail.com wrote:
 Hi All,

 I have all JSP files in \views and subfolders as following:

 src\main\webapp\WEB-INF\views\error.jsp
 src\main\webapp\WEB-INF\views\mobile\home.jsp
 src\main\webapp\WEB-INF\views\mobile\register\register.jsp
 src\main\webapp\WEB-INF\views\normal\home.jsp
 src\main\webapp\WEB-INF\views\normal\register\register.jsp

 I am trying to exclude all these JSP from WAR file so I have plugin define
 in pom.xml as
 plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration
  webXml${basedir}/target/jspweb.xml/webXml
  warSourceExcludes**/*.jsp/warSourceExcludes
/configuration
 /plugin

 But I can still see all JAR files in WAR file. Can any one tell me what I am
 doing wrong? Am I not writing path expression correctly? If so what will be
 correct pattern for such.


I dont do war stuff so I'm just pointing at the docs here.
Have you read 
http://maven.apache.org/plugins/maven-war-plugin/examples/including-excluding-files-from-war.html?

  build
plugins
  plugin
artifactIdmaven-war-plugin/artifactId
version2.3/version
configuration
  packagingExcludesWEB-INF/lib/*.jar/packagingExcludes
/configuration
  /plugin
/plugins
  /build

Note in your post you have warSourceExcludes which excludes stuff in
warSourceDirectory (${basedir}/src/main/webapp)
And stuff in ${basedir}/src/main/webapp/WEB-INF may get treated
specially as resources and not even be available for
includes/excludes.

I'm no expert on this.
Try packagingExcludes instead.

If you think the documentation could be improved, please feel free to
make the changes and file a jira.

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



Re: Packaging up pre-existing jar and source jar

2013-01-16 Thread Joachim Durchholz

Am 16.01.2013 22:26, schrieb Ron Wheeler:

If you want them both in one artifact:
Use a pom packaging type with the dependencies  lib.jar and
lib-sources.jar.
Use the Assembly plugin to make a jar with both jars inside.


Hmm... does that mean that a Maven project can install at most a single 
jar per classifier?
I'd find that surprising enough to be worthy of being documented in the 
30-minute introduction.



If you want them as individual artifacts:
If you are running Nexus as your Maven Repository, I think that you can
just upload each jar and Nexus will generate a minimal POM with the
specified GAV that can be downloaded by Maven just like any jar that you
built from sources.


No Nexus here, just a local repository that's deployed to from the 
command line via mvn deploy.
Shared data is exchanged via Bitbucket, so we haven't seen a use case 
for Nexus yet.


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



Re: Packaging up pre-existing jar and source jar

2013-01-16 Thread Joachim Durchholz

Am 16.01.2013 13:08, schrieb Francesco Mari:

Take a look at the deploy-file mojo [0]. There is a brief explanation
of it in the Usage page of the deploy plugin [1].

[0] http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
[1] http://maven.apache.org/plugins/maven-deploy-plugin/usage.html


Ah, I had seen that but thought it was inapplicable because I want to 
deploy just to the local repo. But I guess I can tell it to deploy to 
${settings.localRepository}, right?


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



Re: Write dependency information to a file (new custom plugin)

2013-01-16 Thread Danny Schimke
Thank you very much,

@Robert Scholte: I'll have a look at this. Maybe it already does what I
want and I can take some stuff into my possibly new plugin.

@Curtis Rueden: It should be triggered within maven on a specified goal. It
must be possible to execute it at a desired point in the Maven build
lifecycle. But it does not have to be a Maven plugin necessarily. Are there
(standard) plugins to trigger some command line tools?

Thank you very much!

-- 
Mit freundlichen Grüßen / Kind regards
-Danny Schimke*
*


Re: Packaging up pre-existing jar and source jar

2013-01-16 Thread Anders Hammar
You need to read up on Maven terminology. deploy means deploying/copying
to a remote repo (outside your machine). What you seem to be aiming at is
install as installing/copying to your local repo on your machine.

But, you seriously need to look into how Maven is supposed to work. Trying
to fight the Maven way will just cause you pain and us on the mailing list
a lot of trouble trying to patch your work. Start by getting a repo manager
and set up a remote repo. You need that! Then deploy the lib and the
sources lib to that repo (along with the pom you have created for those).
They will have the same GAV but the sources artifact will have the
sources classifier.

Ron, if you're listening here, could you please tell Joachim how you wasted
years not using a repo manager before you saw the light?

/Anders


On Thu, Jan 17, 2013 at 12:15 AM, Joachim Durchholz j...@durchholz.orgwrote:

 Am 16.01.2013 13:08, schrieb Francesco Mari:

 Take a look at the deploy-file mojo [0]. There is a brief explanation
 of it in the Usage page of the deploy plugin [1].

 [0] http://maven.apache.org/**plugins/maven-deploy-plugin/**
 deploy-file-mojo.htmlhttp://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html
 [1] 
 http://maven.apache.org/**plugins/maven-deploy-plugin/**usage.htmlhttp://maven.apache.org/plugins/maven-deploy-plugin/usage.html


 Ah, I had seen that but thought it was inapplicable because I want to
 deploy just to the local repo. But I guess I can tell it to deploy to
 ${settings.localRepository}, right?


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