How to play with 2 repositories ?

2013-02-27 Thread Gilles Scokart
I have a repository at work that is only accessible from our intranet.  This
repository is configured in my personal setting as a repository (for some
company artefact) and as a mirror for all other repository.

When I'm home, I use an other settings file without this repository and the
mirror config.  But when I launch a build, it seems that he need to
redownload all plugin and dependencies.
I also have difficulties to launch build with option -o because some plugin
are not found in my local repository altought they are there (but maybe
donwloaded from the miror).

How can I configure my settings files so that when I switch the config I
keep my entire local repository useable, independantly of the place from
where I downloaded it.

-
Gilles Scokart  



--
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-play-with-2-repositories-tp5748541.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: dynamically select resources and apply filtering

2013-02-27 Thread Jean-Noël Colin
so basically, what you recommend is to use Maven to build a 'standard' war, and 
then write my own scripts to customize the war to each distinct environment, is 
that right? 

Jean-Noël

On 26 Feb 2013, at 17:50, Ron Wheeler rwhee...@artifact-software.com wrote:

 Since you want to support a lot of customers with different configurations, 
 you may want something that is based on a simple CMS that provides a database 
 and an editing tool and an API for extracting content.
 You script could then navigate the CMS picking up the right pieces to make up 
 the war for each client.
 
 If you have to deliver updated documentation, release note and revised EULAs, 
 then you might want to use your script to prepare an installer staging area 
 and invoke an installer build package to build a customized installer for 
 each client.
 
 
 Ron
 
 On 26/02/2013 10:49 AM, Lyons, Roy wrote:
 I say that you could just run a post-deployment command that performs any
 filtering.  You could use ant, perl, java, whatever you wanted to...  and
 perhaps have it pull down content from a centralized git repository or
 something to make it easy to maintain your properties/configs.
 
 The obvious mess comes into play if you are performing deployments using
 the maven tomcat plugin or something similar instead of a real packaging
 tool.
 
 
 Thanks,
 
 Roy Lyons
 
 
 
 
 
 On 2/26/13 9:43 AM, Stephen Connolly stephen.alan.conno...@gmail.com
 wrote:
 
 I have an answer on Stack Overflow that might help your thought processes:
 http://stackoverflow.com/questions/14650468/whats-a-practicable-way-for-au
 tomated-configuration-versioning-and-deployment/14661186#14661186
 
 
 On 26 February 2013 15:06, Jean-Noël Colin jn.co...@gmail.com wrote:
 
 so your suggestion would be to have maven do the compile, and a kind of
 'war:exploded', and then run ant to add the customized files and create
 the
 war file, is that correct?
 
 or should I write a plugin that does that for me?
 
 You write: Separating run-time deployment from Maven is a best
 practice;
 but then, what should I use to customise and deploy distribution kits?
 
 Best
 
 Jean-Noël
 
 On 26 Feb 2013, at 10:01, Ron Wheeler rwhee...@artifact-software.com
 wrote:
 
 On 26/02/2013 2:54 AM, Baptiste MATHUS wrote:
 I *think* Ron means: using maven to produce your standard artifacts
 (jar/war/ear ?), and then use pure ant somewhere in the process just
 before
 deploying for a specific customer to do the replacements you're
 talking
 about.
 
 (By the way, invoking ant from maven (using antrun-maven-plugin)
 should
 always be considered something bad and temporary. Writing or using a
 dedicated maven plugin is the way to go).
 
 Exactly.
 My suggestion would be to run the ant after all the maven work is
 complete and you have a full set of release files in your repo
 Have Ant (or some other process) merge the released code with
 configuration files, logos, etc to make distribution kits.
 Ron
 2013/2/26 Jean-Noël Colin jn.co...@gmail.com
 
 Hi Ron,
 
 Do you mean invoking the ant plugin from the pom.xml file? I was
 wondering
 whether this was a good practice, or something to be kept only for
 situations where you really can't avoid it
 
 Best regards
 
 Jean-Noël
 
 On 25 Feb 2013, at 21:31, Ron Wheeler
 rwhee...@artifact-software.com
 wrote:
 
 Why not move the production of the software to Maven and leave the
 assembly in Ant.
 That would give you the best of both worlds.
 
 
 On 25/02/2013 2:41 PM, Jean-Noël Colin wrote:
 Hi
 
 I'm trying to migrate my project from ant to maven, but I'm
 facing a
 few difficulties; I need to build my project for different
 environments
 (customers, so possibly a long list). In my ant project, I had
 several
 .properties file, one per customer; in this file, I had properties
 used to
 customize some config file; I managed to use resource filtering to
 achieve
 this.
 However, some properties defined a filename that needed to be
 copied
 to
 the war archive, but under a common name. For instance, I had
 several
 logos: logo_customer1.jpg, logo_customer2.jpg, logo_customer3.jpg;
 the
 source file name was specified in the properties file
 (customer1.properties, customer2.properties, customer3.properties),
 but the
 destination was always logo.jpg. How can I do that?
 Second, the properties file defines the name of the file
 (resources)
 to
 be filtered. For instance, I have a template for working with Spring
 Security in LDAP environment and another template when working when
 Active
 Directory; the customer properties file defined the name of the
 template to
 use, but in both cases, the result file needs to be
 applicationContext-security.xml. How can i achieve this? Or is
 there a
 way
 to define conditional profiles so that in the customer .properties
 file, I
 would say LDAP or AD, and based on that value, different profile
 would
 be
 used?
 Many thanks for your help
 
 Jean-Noël
 
 
 
 

Re: How to play with 2 repositories ?

2013-02-27 Thread Anders Hammar
With Maven 3 you currently can't. The rational is that Maven tries to
ensure that you're using the right artifact. So if the cached artifact is
from a different repo than the one you're using now, it will re-download it.

/Anders


On Wed, Feb 27, 2013 at 9:00 AM, Gilles Scokart gscok...@gmail.com wrote:

 I have a repository at work that is only accessible from our intranet.
  This
 repository is configured in my personal setting as a repository (for some
 company artefact) and as a mirror for all other repository.

 When I'm home, I use an other settings file without this repository and the
 mirror config.  But when I launch a build, it seems that he need to
 redownload all plugin and dependencies.
 I also have difficulties to launch build with option -o because some plugin
 are not found in my local repository altought they are there (but maybe
 donwloaded from the miror).

 How can I configure my settings files so that when I switch the config I
 keep my entire local repository useable, independantly of the place from
 where I downloaded it.

 -
 Gilles Scokart



 --
 View this message in context:
 http://maven.40175.n5.nabble.com/How-to-play-with-2-repositories-tp5748541.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: How to play with 2 repositories ?

2013-02-27 Thread Olivier Lamy
Read http://jira.codehaus.org/browse/MNG-5185 .
So you will have a workaround with 3.1.0 .

2013/2/27 Gilles Scokart gscok...@gmail.com:
 I have a repository at work that is only accessible from our intranet.  This
 repository is configured in my personal setting as a repository (for some
 company artefact) and as a mirror for all other repository.

 When I'm home, I use an other settings file without this repository and the
 mirror config.  But when I launch a build, it seems that he need to
 redownload all plugin and dependencies.
 I also have difficulties to launch build with option -o because some plugin
 are not found in my local repository altought they are there (but maybe
 donwloaded from the miror).

 How can I configure my settings files so that when I switch the config I
 keep my entire local repository useable, independantly of the place from
 where I downloaded it.

 -
 Gilles Scokart



 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/How-to-play-with-2-repositories-tp5748541.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




--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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



Re: dynamically select resources and apply filtering

2013-02-27 Thread Stephen Connolly
Yes, though better is to have the customizations in a separate file and
then the war picks up that file and applied the customizations to itself,
thus removing the need to customize a war at all.

For example, you could package up the customizations in a .jar file with a
customization descriptor at a defined classpath url (e.g.
/META-INF/com.mydomain.myapp/customizations.toml )

the customizations descriptor could be as simple as a .properties file that
names the resources, or as complex as an XML/yaml descriptor that does all
sorts of fancy mapping... a servlet filter could intercept requests for
static resources and serve them from the customized resource location, and
some other tweaks to your .war's logic, can filter in the modifications to
dynamic pages.

You then just drop the customizations.jar into the Tomcat shared lib folder
and now you just drop the standard war into any customers tomcat and you
don't have to worry, no repacking at all... it will just pick up their
customizations automagically

If you like, the above is much more the Maven way of solving your
problem... granted right now you may not be able to move to that goal right
now, for one it will involve refactoring your current code... so when faced
with that kind of problem I would say

OK, I know the end goal, it sounds attractive as it removes a pain point
for me (namely having to run the customize step for each customer) and it
also removes a potential problem (namely forgetting to customize and
deploying an uncustomized .war into a customers instance), but right now
there are too many moving pieces, so I will use the stop-gap of using
ANT/Chef/Puppet/Gradle/BASH/whatever to unpack, customize and repack the
.war for each customer. Next sprint we will start moving towards the ideal
customizations architecture

The repack solution is outside of Maven's responsibilities, so it doesn't
care whether you do a repack or a customizations.jar... the point is that
once you grok the Maven way, you will care, and you will find yourself
wanting to do this the right* way...

If I have 3-5 customers, I'd probably stick with the repack... more than 5
and I'd push for the customizations.jar model

-Stephen

* There is no right way, but we can apply Occam's software release
management razor: among competing release processes, the one that uses the
fewest manual steps should be selected.


On 27 February 2013 08:56, Jean-Noël Colin jn.co...@gmail.com wrote:

 so basically, what you recommend is to use Maven to build a 'standard'
 war, and then write my own scripts to customize the war to each distinct
 environment, is that right?

 Jean-Noël

 On 26 Feb 2013, at 17:50, Ron Wheeler rwhee...@artifact-software.com
 wrote:

  Since you want to support a lot of customers with different
 configurations, you may want something that is based on a simple CMS that
 provides a database and an editing tool and an API for extracting content.
  You script could then navigate the CMS picking up the right pieces to
 make up the war for each client.
 
  If you have to deliver updated documentation, release note and revised
 EULAs, then you might want to use your script to prepare an installer
 staging area and invoke an installer build package to build a customized
 installer for each client.
 
 
  Ron
 
  On 26/02/2013 10:49 AM, Lyons, Roy wrote:
  I say that you could just run a post-deployment command that performs
 any
  filtering.  You could use ant, perl, java, whatever you wanted to...
  and
  perhaps have it pull down content from a centralized git repository or
  something to make it easy to maintain your properties/configs.
 
  The obvious mess comes into play if you are performing deployments using
  the maven tomcat plugin or something similar instead of a real packaging
  tool.
 
 
  Thanks,
 
  Roy Lyons
 
 
 
 
 
  On 2/26/13 9:43 AM, Stephen Connolly stephen.alan.conno...@gmail.com
 
  wrote:
 
  I have an answer on Stack Overflow that might help your thought
 processes:
 
 http://stackoverflow.com/questions/14650468/whats-a-practicable-way-for-au
  tomated-configuration-versioning-and-deployment/14661186#14661186
 
 
  On 26 February 2013 15:06, Jean-Noël Colin jn.co...@gmail.com wrote:
 
  so your suggestion would be to have maven do the compile, and a kind
 of
  'war:exploded', and then run ant to add the customized files and
 create
  the
  war file, is that correct?
 
  or should I write a plugin that does that for me?
 
  You write: Separating run-time deployment from Maven is a best
  practice;
  but then, what should I use to customise and deploy distribution kits?
 
  Best
 
  Jean-Noël
 
  On 26 Feb 2013, at 10:01, Ron Wheeler rwhee...@artifact-software.com
 
  wrote:
 
  On 26/02/2013 2:54 AM, Baptiste MATHUS wrote:
  I *think* Ron means: using maven to produce your standard artifacts
  (jar/war/ear ?), and then use pure ant somewhere in the process just
  before
  deploying for a specific customer to do the replacements you're
  talking
  

Is there any generic Maven code generator?

2013-02-27 Thread christofer.d...@c-ware.de
I just posted this to Stackoverflow, but after posting I realized, that I 
should have come here first :-(


I am currently working on a project, that makes intense usage of code 
generation for various purposes. One generator generates SQL scripts from jpa 
entities. Another generates DTOs from pojos, another generates the JPA2.0 meta 
model, jet another generates some xml and schema files based on Java classes 
... each generator works completely different needs to be configured 
differently.

My question now is ... is there any generic maven code generator plugin out 
there with the following attributes:

 *
Creates a pojo model of a Java class (Names, Properties, Annotation, Methods 
...)
 *
Uses templates for defining the output that uses the pojo model to generate any 
output.
 *
Allows me to specify multiple templates for one class
 *
Allows me to generate code and resources
 *
Allows me to generate a base class to target/generated-sources and a dummy 
implementation to src/main/java which simply extends the base class (If the 
dummy class in src/main/java exists, nothing happens, if it doesn't it 
generates such a dummy class. This code is checked in to the SCM and allows 
extending the generated classes manually)

I am using the Flexmojos GraniteDS plugin for generating my ActionScript model 
code, but it's pretty specialized for that particular purpose.

I think such a generic generator would make things a lot easier ... is there 
something like that available out there, or do I have to start implementing it 
myself?

Chris


Re: How to play with 2 repositories ?

2013-02-27 Thread Curtis Rueden
Hi Gillen,

 How can I configure my settings files so that when I switch the config
 I keep my entire local repository useable, independantly of the place
 from where I downloaded it.

As a workaround, could you copy your work settings.xml to your home
machine, and have a quick go offline script that swaps it in or out? The
settings would then only be used to make Maven happy; you would hopefully
never actually need to ping your work servers.

On a related note: I heartily recommend the mvn dependency:go-offline
goal, in case you were not already using it, which tries to download
everything you might possibly need for the given project while offline.
Using it will better ensure that mvn -o works as desired (though not all
plugins respect -o so still not a total guarantee).

Regards,
Curtis


On Wed, Feb 27, 2013 at 2:00 AM, Gilles Scokart gscok...@gmail.com wrote:

 I have a repository at work that is only accessible from our intranet.
  This
 repository is configured in my personal setting as a repository (for some
 company artefact) and as a mirror for all other repository.

 When I'm home, I use an other settings file without this repository and the
 mirror config.  But when I launch a build, it seems that he need to
 redownload all plugin and dependencies.
 I also have difficulties to launch build with option -o because some plugin
 are not found in my local repository altought they are there (but maybe
 donwloaded from the miror).

 How can I configure my settings files so that when I switch the config I
 keep my entire local repository useable, independantly of the place from
 where I downloaded it.

 -
 Gilles Scokart



 --
 View this message in context:
 http://maven.40175.n5.nabble.com/How-to-play-with-2-repositories-tp5748541.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: dynamically select resources and apply filtering

2013-02-27 Thread Jean-Noël Colin
Stephen, 

Many thanks for taking the time to write this long and valuable response; I'll 
follow your advise, and work sprint by sprint in trying to get into the maven 
way. 

Best regards

Jean-Noël

On 27 Feb 2013, at 10:25, Stephen Connolly stephen.alan.conno...@gmail.com 
wrote:

 Yes, though better is to have the customizations in a separate file and
 then the war picks up that file and applied the customizations to itself,
 thus removing the need to customize a war at all.
 
 For example, you could package up the customizations in a .jar file with a
 customization descriptor at a defined classpath url (e.g.
 /META-INF/com.mydomain.myapp/customizations.toml )
 
 the customizations descriptor could be as simple as a .properties file that
 names the resources, or as complex as an XML/yaml descriptor that does all
 sorts of fancy mapping... a servlet filter could intercept requests for
 static resources and serve them from the customized resource location, and
 some other tweaks to your .war's logic, can filter in the modifications to
 dynamic pages.
 
 You then just drop the customizations.jar into the Tomcat shared lib folder
 and now you just drop the standard war into any customers tomcat and you
 don't have to worry, no repacking at all... it will just pick up their
 customizations automagically
 
 If you like, the above is much more the Maven way of solving your
 problem... granted right now you may not be able to move to that goal right
 now, for one it will involve refactoring your current code... so when faced
 with that kind of problem I would say
 
 OK, I know the end goal, it sounds attractive as it removes a pain point
 for me (namely having to run the customize step for each customer) and it
 also removes a potential problem (namely forgetting to customize and
 deploying an uncustomized .war into a customers instance), but right now
 there are too many moving pieces, so I will use the stop-gap of using
 ANT/Chef/Puppet/Gradle/BASH/whatever to unpack, customize and repack the
 .war for each customer. Next sprint we will start moving towards the ideal
 customizations architecture
 
 The repack solution is outside of Maven's responsibilities, so it doesn't
 care whether you do a repack or a customizations.jar... the point is that
 once you grok the Maven way, you will care, and you will find yourself
 wanting to do this the right* way...
 
 If I have 3-5 customers, I'd probably stick with the repack... more than 5
 and I'd push for the customizations.jar model
 
 -Stephen
 
 * There is no right way, but we can apply Occam's software release
 management razor: among competing release processes, the one that uses the
 fewest manual steps should be selected.
 
 
 On 27 February 2013 08:56, Jean-Noël Colin jn.co...@gmail.com wrote:
 
 so basically, what you recommend is to use Maven to build a 'standard'
 war, and then write my own scripts to customize the war to each distinct
 environment, is that right?
 
 Jean-Noël
 
 On 26 Feb 2013, at 17:50, Ron Wheeler rwhee...@artifact-software.com
 wrote:
 
 Since you want to support a lot of customers with different
 configurations, you may want something that is based on a simple CMS that
 provides a database and an editing tool and an API for extracting content.
 You script could then navigate the CMS picking up the right pieces to
 make up the war for each client.
 
 If you have to deliver updated documentation, release note and revised
 EULAs, then you might want to use your script to prepare an installer
 staging area and invoke an installer build package to build a customized
 installer for each client.
 
 
 Ron
 
 On 26/02/2013 10:49 AM, Lyons, Roy wrote:
 I say that you could just run a post-deployment command that performs
 any
 filtering.  You could use ant, perl, java, whatever you wanted to...
 and
 perhaps have it pull down content from a centralized git repository or
 something to make it easy to maintain your properties/configs.
 
 The obvious mess comes into play if you are performing deployments using
 the maven tomcat plugin or something similar instead of a real packaging
 tool.
 
 
 Thanks,
 
 Roy Lyons
 
 
 
 
 
 On 2/26/13 9:43 AM, Stephen Connolly stephen.alan.conno...@gmail.com
 
 wrote:
 
 I have an answer on Stack Overflow that might help your thought
 processes:
 
 http://stackoverflow.com/questions/14650468/whats-a-practicable-way-for-au
 tomated-configuration-versioning-and-deployment/14661186#14661186
 
 
 On 26 February 2013 15:06, Jean-Noël Colin jn.co...@gmail.com wrote:
 
 so your suggestion would be to have maven do the compile, and a kind
 of
 'war:exploded', and then run ant to add the customized files and
 create
 the
 war file, is that correct?
 
 or should I write a plugin that does that for me?
 
 You write: Separating run-time deployment from Maven is a best
 practice;
 but then, what should I use to customise and deploy distribution kits?
 
 Best
 
 Jean-Noël
 
 On 26 Feb 2013, at 10:01, Ron Wheeler 

Re: How to play with 2 repositories ?

2013-02-27 Thread Wayne Fay
 How can I configure my settings files so that when I switch the config I
 keep my entire local repository useable, independantly of the place from
 where I downloaded it.

Another common solution to this problem is to simply run your own
local MRM on the laptop that goes from work to home and back.

Wayne

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



How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Markus Karg
My POM declared a dependency to a DLL:

 

dependency

groupIdnet.sf.jacob-project/groupId

artifactIdjacob-runtime/artifactId

typedll/type

classifierx64/classifier

version1.17-M2/version

scoperuntime/scope

/dependency

 

(1)How can I tell Maven that when doing mvn test, that DLL shall
be found on java.library.path, so that the JVM can load native classes
from it (using JNI)?

 

(2)How can I tell Maven that it shall not statically be x64, but
instead it depends on the architecture of the system actually executing
mvn test (e. g. x86)?

 

Thanks! J

-Markus



Re: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Dan Tran
- Use maven profile to detect OS arch and set it into a maven property

- Use maven-dependcy-plugin to down all requires dll.  Make sure to
take advantage of the property set in step 1

- Configure maven-surefire-plugin to set PATH env variable into the
download directory

Good luck

-D

On Wed, Feb 27, 2013 at 6:58 AM, Markus Karg k...@quipsy.de wrote:
 My POM declared a dependency to a DLL:



 dependency

 groupIdnet.sf.jacob-project/groupId

 artifactIdjacob-runtime/artifactId

 typedll/type

 classifierx64/classifier

 version1.17-M2/version

 scoperuntime/scope

 /dependency



 (1)How can I tell Maven that when doing mvn test, that DLL shall
 be found on java.library.path, so that the JVM can load native classes
 from it (using JNI)?



 (2)How can I tell Maven that it shall not statically be x64, but
 instead it depends on the architecture of the system actually executing
 mvn test (e. g. x86)?



 Thanks! J

 -Markus


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



Re: Is there any generic Maven code generator?

2013-02-27 Thread Jeff MAURY
First, the way to plug extra functionnality into Maven is to write a Maven
plugin so I don't think you can find a Maven plugin to be generic enough to
perform any kind of task.
For you purpose, you can try a Java annotation processor which are
supported by the Maven compiler plugin or a combination of the Maven exec
plugin (to launch your own generator) and the Maven build helper plugin (to
let Maven know that new files have been generated)

Regards
Jeff



On Wed, Feb 27, 2013 at 12:30 PM, christofer.d...@c-ware.de 
christofer.d...@c-ware.de wrote:

 I just posted this to Stackoverflow, but after posting I realized, that I
 should have come here first :-(


 I am currently working on a project, that makes intense usage of code
 generation for various purposes. One generator generates SQL scripts from
 jpa entities. Another generates DTOs from pojos, another generates the
 JPA2.0 meta model, jet another generates some xml and schema files based on
 Java classes ... each generator works completely different needs to be
 configured differently.

 My question now is ... is there any generic maven code generator plugin
 out there with the following attributes:

  *
 Creates a pojo model of a Java class (Names, Properties, Annotation,
 Methods ...)
  *
 Uses templates for defining the output that uses the pojo model to
 generate any output.
  *
 Allows me to specify multiple templates for one class
  *
 Allows me to generate code and resources
  *
 Allows me to generate a base class to target/generated-sources and a dummy
 implementation to src/main/java which simply extends the base class (If the
 dummy class in src/main/java exists, nothing happens, if it doesn't it
 generates such a dummy class. This code is checked in to the SCM and allows
 extending the generated classes manually)

 I am using the Flexmojos GraniteDS plugin for generating my ActionScript
 model code, but it's pretty specialized for that particular purpose.

 I think such a generic generator would make things a lot easier ... is
 there something like that available out there, or do I have to start
 implementing it myself?

 Chris




-- 
Jeff MAURY


Legacy code often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury


Re: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Jörg Schaible
Hi Marcus,

Markus Karg wrote:

 My POM declared a dependency to a DLL:
 
  
 
 dependency
 
 groupIdnet.sf.jacob-project/groupId
 
 artifactIdjacob-runtime/artifactId
 
 typedll/type
 
 classifierx64/classifier
 
 version1.17-M2/version
 
 scoperuntime/scope
 
 /dependency
 
  
 
 (1)How can I tell Maven that when doing mvn test, that DLL shall
 be found on java.library.path, so that the JVM can load native classes
 from it (using JNI)?
 
  
 
 (2)How can I tell Maven that it shall not statically be x64, but
 instead it depends on the architecture of the system actually executing
 mvn test (e. g. x86)?

Have a look at the nar plugin. Create a JNI example project and have a look 
at the artifacts it will create. You may pack your DLLs into similar 
artifacts and then use this plugin to download and unpack the native stuff 
automatically when using those artifacts as dependency.

- Jörg


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



RE: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Markus Karg
Dan,

sounds reasonable. I think I'll do that! :-)

Thanks a lot!
-Markus

 -Original Message-
 From: Dan Tran [mailto:dant...@gmail.com]
 Sent: Mittwoch, 27. Februar 2013 17:41
 To: Maven Users List
 Subject: Re: How to tell Maven to put DLL dependency into
 java.library.path?
 
 - Use maven profile to detect OS arch and set it into a maven property
 
 - Use maven-dependcy-plugin to down all requires dll.  Make sure to
 take advantage of the property set in step 1
 
 - Configure maven-surefire-plugin to set PATH env variable into the
 download directory
 
 Good luck
 
 -D
 
 On Wed, Feb 27, 2013 at 6:58 AM, Markus Karg k...@quipsy.de wrote:
  My POM declared a dependency to a DLL:
 
 
 
  dependency
 
  groupIdnet.sf.jacob-project/groupId
 
  artifactIdjacob-runtime/artifactId
 
  typedll/type
 
  classifierx64/classifier
 
  version1.17-M2/version
 
  scoperuntime/scope
 
  /dependency
 
 
 
  (1)How can I tell Maven that when doing mvn test, that DLL
 shall
  be found on java.library.path, so that the JVM can load native
 classes
  from it (using JNI)?
 
 
 
  (2)How can I tell Maven that it shall not statically be x64,
 but
  instead it depends on the architecture of the system actually
  executing mvn test (e. g. x86)?
 
 
 
  Thanks! J
 
  -Markus
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


RE: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Markus Karg
Jörg,

thank you for this interesting idea. I think this would be the most 
sophisticated (most mavenic) solution, but I have the feeling that Dan's to 
be simpler to set up in the short term for a Maven novice?

Thanks! :-)
Markus

 -Original Message-
 From: Jörg Schaible [mailto:joerg.schai...@scalaris.com]
 Sent: Mittwoch, 27. Februar 2013 18:03
 To: users@maven.apache.org
 Subject: Re: How to tell Maven to put DLL dependency into
 java.library.path?
 
 Hi Marcus,
 
 Markus Karg wrote:
 
  My POM declared a dependency to a DLL:
 
 
 
  dependency
 
  groupIdnet.sf.jacob-project/groupId
 
  artifactIdjacob-runtime/artifactId
 
  typedll/type
 
  classifierx64/classifier
 
  version1.17-M2/version
 
  scoperuntime/scope
 
  /dependency
 
 
 
  (1)How can I tell Maven that when doing mvn test, that DLL
 shall
  be found on java.library.path, so that the JVM can load native
 classes
  from it (using JNI)?
 
 
 
  (2)How can I tell Maven that it shall not statically be x64,
 but
  instead it depends on the architecture of the system actually
  executing mvn test (e. g. x86)?
 
 Have a look at the nar plugin. Create a JNI example project and have a
 look at the artifacts it will create. You may pack your DLLs into
 similar artifacts and then use this plugin to download and unpack the
 native stuff automatically when using those artifacts as dependency.
 
 - Jörg
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


Re: question about release:branch with CVS

2013-02-27 Thread Robert Scholte

Hi,

you haven't specified the version of the maven-release-plugin you're  
using. If you haven't locked the version, it is probably 2.0, which is  
rather old. You should try 2.4.
If remote tagging is not supported CVS yet, please create an for the SCM  
project[1], patches are always very welcome.


Robert

[1] https://jira.codehaus.org/browse/SCM/component/11190



Op Tue, 26 Feb 2013 13:52:28 +0100 schreef Andras Nagy  
andras.istvan.n...@gmail.com:



Dear All,

I have a question regarding the release plugin's branch goal. What I am
trying to achieve (using CVS for scm) is this:
-I have a release on the HEAD, let's call this 1.1, with release tag
REL_1_1
-I have new changes committed to HEAD (in 1.1-SNAPSHOT)
-I have to fix a bug in 1.1 immediately, without introducing any of the
changes that have happened on HEAD into the bugfix release, so I need  to
start a branch from 1.1 (say FIX_1_1), fix the bug on the branch and
create the bugfix release (say 1.1.0) from this branch

My question: is the release:branch goal supposed to be supporting this  
use

case? I assumed yes, as I have found this example:

mvn release:branch -DbranchName=my-branch -DupdateBranchVersions=true
-DupdateWorkingCopyVersions=false

*Note:* This can be useful if you want to create a branch from a tag
But maybe I'm misinterpreting something, because I couldn't get it to  
work

with these steps:
-I check out release 1.1 from CVS, using the REL_1_1 release tag
-I want to preform release:branch on this working copy
what happens for me is that the release plugin modifies the pom before
creating the branch, and wants to commit it, which it naturally can't do,
because the working copy still corresponds to the starting point of the
branch (which is an immutable state, tagged with the REL_1_1 tag,  
being a

sticky tag in the working copy). I have to admit I don't understand this
logic, as I suppose that the branch would need to be created in the first
step to be able to perform any changes.

Would my scenario be supported with: -DsuppressCommitBeforeBranch=true
-DremoteTagging=true, supposed that remoteTagging were supported for  
CVS?

(As I read, it's not yet supported for CVS). If yes, are you planning on
supporting it? (Remote tagging is pretty straightforward with CVS).

Thank you,
Andras


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



Re: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Wayne Fay
 thank you for this interesting idea. I think this would be the most
 sophisticated (most mavenic) solution, but I have the feeling that Dan's
 to be simpler to set up in the short term for a Maven novice?

Go with Dan's solution for now, but I think you'll change to the Nar
plugin eventually.

Wayne

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



Re: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Dan Tran
if you already have all you DLL loaded at your maven repo, Then it
make sense to do so at this moment

if you are required to build dll with maven, better look into NAR

-D

On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay wayne...@gmail.com wrote:
 thank you for this interesting idea. I think this would be the most
 sophisticated (most mavenic) solution, but I have the feeling that Dan's
 to be simpler to set up in the short term for a Maven novice?

 Go with Dan's solution for now, but I think you'll change to the Nar
 plugin eventually.

 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



AW: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Markus Karg
Possibly. Because in fact, I need other tools to understand the need for 
java.library.path, too, mosty the m2e Eclipse plugin, which I doubt will 
understand any manual PATH changes in the surefire config (does it?).

-Ursprüngliche Nachricht-
Von: Wayne Fay [mailto:wayne...@gmail.com] 
Gesendet: Mittwoch, 27. Februar 2013 21:35
An: Maven Users List
Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

 thank you for this interesting idea. I think this would be the most 
 sophisticated (most mavenic) solution, but I have the feeling that 
 Dan's to be simpler to set up in the short term for a Maven novice?

Go with Dan's solution for now, but I think you'll change to the Nar plugin 
eventually.

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


AW: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Markus Karg
I fact these are not my  DLLs but are ready-to-use artifacts of the JACOCO 
project on SourceForge. So I will *never* build them on my own. But I need to 
have it working m2e. Do you think your solution will convince m2e to add lib to 
java.library.path?

-Ursprüngliche Nachricht-
Von: Dan Tran [mailto:dant...@gmail.com] 
Gesendet: Mittwoch, 27. Februar 2013 22:29
An: Maven Users List
Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

if you already have all you DLL loaded at your maven repo, Then it make sense 
to do so at this moment

if you are required to build dll with maven, better look into NAR

-D

On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay wayne...@gmail.com wrote:
 thank you for this interesting idea. I think this would be the most 
 sophisticated (most mavenic) solution, but I have the feeling that 
 Dan's to be simpler to set up in the short term for a Maven novice?

 Go with Dan's solution for now, but I think you'll change to the Nar 
 plugin eventually.

 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

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


Re: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Dan Tran
I think that would work if you invoke 'maven install' using m2e.
However, if you use eclispe's unit test, that may not possible since I
too could not working.  I basically configure eclispe or put the dlls
in my system path

-D

On Wed, Feb 27, 2013 at 11:21 PM, Markus Karg k...@quipsy.de wrote:
 I fact these are not my  DLLs but are ready-to-use artifacts of the JACOCO 
 project on SourceForge. So I will *never* build them on my own. But I need to 
 have it working m2e. Do you think your solution will convince m2e to add lib 
 to java.library.path?

 -Ursprüngliche Nachricht-
 Von: Dan Tran [mailto:dant...@gmail.com]
 Gesendet: Mittwoch, 27. Februar 2013 22:29
 An: Maven Users List
 Betreff: Re: How to tell Maven to put DLL dependency into java.library.path?

 if you already have all you DLL loaded at your maven repo, Then it make sense 
 to do so at this moment

 if you are required to build dll with maven, better look into NAR

 -D

 On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay wayne...@gmail.com wrote:
 thank you for this interesting idea. I think this would be the most
 sophisticated (most mavenic) solution, but I have the feeling that
 Dan's to be simpler to set up in the short term for a Maven novice?

 Go with Dan's solution for now, but I think you'll change to the Nar
 plugin eventually.

 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

 -
 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: How to tell Maven to put DLL dependency into java.library.path?

2013-02-27 Thread Anders Hammar
Why not just use the EclEmma Eclipse plugin? It uses Jacoco from what I
read on their web site, despite the emma in the name of the plugin.

/Anders


On Thu, Feb 28, 2013 at 8:48 AM, Dan Tran dant...@gmail.com wrote:

 I think that would work if you invoke 'maven install' using m2e.
 However, if you use eclispe's unit test, that may not possible since I
 too could not working.  I basically configure eclispe or put the dlls
 in my system path

 -D

 On Wed, Feb 27, 2013 at 11:21 PM, Markus Karg k...@quipsy.de wrote:
  I fact these are not my  DLLs but are ready-to-use artifacts of the
 JACOCO project on SourceForge. So I will *never* build them on my own. But
 I need to have it working m2e. Do you think your solution will convince m2e
 to add lib to java.library.path?
 
  -Ursprüngliche Nachricht-
  Von: Dan Tran [mailto:dant...@gmail.com]
  Gesendet: Mittwoch, 27. Februar 2013 22:29
  An: Maven Users List
  Betreff: Re: How to tell Maven to put DLL dependency into
 java.library.path?
 
  if you already have all you DLL loaded at your maven repo, Then it make
 sense to do so at this moment
 
  if you are required to build dll with maven, better look into NAR
 
  -D
 
  On Wed, Feb 27, 2013 at 12:35 PM, Wayne Fay wayne...@gmail.com wrote:
  thank you for this interesting idea. I think this would be the most
  sophisticated (most mavenic) solution, but I have the feeling that
  Dan's to be simpler to set up in the short term for a Maven novice?
 
  Go with Dan's solution for now, but I think you'll change to the Nar
  plugin eventually.
 
  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
 
  -
  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