Depend on a jar via another pom file

2014-01-08 Thread Omar@Gmail
I have a maven module (lets call it M) that requires aspectjrt but M
already depends on another pom file that has aspectjrt within its
dependency tree  like so:

M -  middle pom - aspectjrt

The problem is M would not compile unless I express the aspectjrt
dependency directly in the M pom file, why?

Is there a way for M to get apsectjrt via the middle pom without directly
depending on aspectjrt?


Re: Depend on a jar via another pom file

2014-01-08 Thread Nick Stolwijk
That's called a transitive dependency and this blog[1] explains nicely why
you shouldn't use those.

[1] http://uglycoder.blogspot.nl/2008/04/flaw-with-mavens-transitive.html

Hth,

Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when
your turn comes to die, you can die happy in feeling that at any rate you
have not wasted your time but have done your best ~~~

Lord Baden-Powell


On Wed, Jan 8, 2014 at 4:56 PM, Omar@Gmail omarnet...@googlemail.comwrote:

 I have a maven module (lets call it M) that requires aspectjrt but M
 already depends on another pom file that has aspectjrt within its
 dependency tree  like so:

 M -  middle pom - aspectjrt

 The problem is M would not compile unless I express the aspectjrt
 dependency directly in the M pom file, why?

 Is there a way for M to get apsectjrt via the middle pom without directly
 depending on aspectjrt?



Re: Maven install phase - Access is denied

2014-01-08 Thread Russell Gold
Hi Andrew, can you show us the result of doing this when you run the -X switch? 
It is likely to provide more information about what is going on; a copy of your 
pom.xml would also be very helpful.

Thanks,
Russ

On Jan 7, 2014, at 11:29 PM, andre999 andre...@hotmail.com wrote:

 Hi all,
 
 I have a project which maven generates the following output in the target
 folder;
 drive\projects\mywork\trunk\target\projectname.jar
 drive\projects\mywork\trunk\target\projectname-sources.jar
 drive\projects\mywork\trunk\target\installer\folder
 
 The above installer\folder is basically an empty folder which contains
 subfolders to be part of installer.
 
 
 I have a Build Error that displays /Error installing artifact:
 drive\projects\mywork\trunk\target\installer\folder (Access is denied)/
 when executing *mvn clean install*.
 
 The maven copies the drive\projects\mywork\trunk\target\projectname.jar,  
 drive\projects\mywork\trunk\target\projectname-sources.jar into local
 repository with success. However the maven attempts to copy the 
 drive\projects\mywork\trunk\target\installer\folder into the local
 repository which is not I want to. This cause maven to throw the Build
 Error.
 
 How do I prevent maven copying the empty folder into local/remote repository
 as an artifact?
 
 Thanks,
 Andrew
 
 
 
 
 
 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Maven-install-phase-Access-is-denied-tp5780920.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
 

-
Author, Getting Started with Apache Maven 
http://www.packtpub.com/getting-started-with-apache-maven/video

Come read my webnovel, Take a Lemon http://www.takealemon.com, 
and listen to the Misfile radio play http://www.fuzzyfacetheater.com/misfile/!









During plugin development, what is the context classloader set to?

2014-01-08 Thread Laird Nelson
I have a plugin that I'm writing that needs to do two things during the
course of its execution:
Load a resource from the current project's classpath
Load a resource from its own guts

This is a fallback kind of thing: if the plugin can't find anything
appropriate on the project classpath, then and only then do I want it to
examine its own .jar file for the resource in question.

My hunch is that there are probably already two classloaders set up for
just this purpose.

I am guessing (haven't tried yet) that the project classpath is probably
visible to Thread.currentThread().getContextClassLoader().  Is that right?

I'm also guessing (haven't tried yet) that from within my mojo
this.getClass().getClassLoader() will return me a ClassLoader that is set
up to be able to see my mojo's innards.  Is that right?

Best,
Laird

-- 
http://about.me/lairdnelson


Re: Maven2/Maven3 plugin development: Ensuring only the available parameters are allowed

2014-01-08 Thread Anders Hammar
AFAIK there is no support for this. If you think there should be, please
file a ticket [1].

/Anders

[1] http://jira.codehaus.org/browse/MNG/


On Tue, Jan 7, 2014 at 7:38 PM, S. Ali Tokmen nos...@alishomepage.comwrote:

 Dear Maven users

 I am one of the owners of Codehaus CARGO, which has a Maven2/Maven3
 plugin; and would have a question with regards to how parameters are
 managed.

 We defined our MOJOs with parameters (you can see

 http://svn.codehaus.org/cargo/extensions/trunk/maven2/plugin/src/main/java/org/codehaus/cargo/maven2/AbstractCargoMojo.java
 for example), but what happens is that if a user unwillingly puts a
 parameter in the wrong place then the plugin execution doesn't stop.

 As an example, I can write the below POM and build still works (even
 thought the MOJO has no parameter called foo):

   plugin
 groupIdorg.codehaus.cargo/groupId
 artifactIdcargo-maven2-plugin/artifactId
 version1.4.6/version
 configuration
   foo
 bar
   /foo
 /configuration
   /plugin

 Is there any way I can instruct by MOJO to fail if there is an unknown
 parameter?

 Please advise

 Thank you

 --

 S. Ali Tokmen
 http://ali.tokmen.com/

 My IM, GSM, PGP and other contact details
 are on http://contact.ali.tokmen.com


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




Re: Maven2/Maven3 plugin development: Ensuring only the available parameters are allowed

2014-01-08 Thread Stephen Connolly
There are valid reasons why a configuration having invalid elements may
be valid.

Consider the case where
xpath:/project/build/pluginManagement/plugins/plugin/version specifies the
*default* version and xpath:/project/build/plugins/plugin/version is
absent... In this case xpath:/project/build/plugins/plugin/configuration
applies to any version of the plugin, so somebody invoking a specific
version of the plugin directly would/should get that configuration... Thus
an element that does not make sense to the executing version of the plugin
*may* make sense to a future/older version if the plugin... Hence failing
because of unknown parameters would be a bad thing

You could request the dom node yourself and parse it by hand if you want to
issue warning though

On Tuesday, 7 January 2014, S. Ali Tokmen wrote:

 Dear Maven users

 I am one of the owners of Codehaus CARGO, which has a Maven2/Maven3
 plugin; and would have a question with regards to how parameters are
 managed.

 We defined our MOJOs with parameters (you can see

 http://svn.codehaus.org/cargo/extensions/trunk/maven2/plugin/src/main/java/org/codehaus/cargo/maven2/AbstractCargoMojo.java
 for example), but what happens is that if a user unwillingly puts a
 parameter in the wrong place then the plugin execution doesn't stop.

 As an example, I can write the below POM and build still works (even
 thought the MOJO has no parameter called foo):

   plugin
 groupIdorg.codehaus.cargo/groupId
 artifactIdcargo-maven2-plugin/artifactId
 version1.4.6/version
 configuration
   foo
 bar
   /foo
 /configuration
   /plugin

 Is there any way I can instruct by MOJO to fail if there is an unknown
 parameter?

 Please advise

 Thank you

 --

 S. Ali Tokmen
 http://ali.tokmen.com/

 My IM, GSM, PGP and other contact details
 are on http://contact.ali.tokmen.com


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



-- 
Sent from my phone


Re: Maven install phase - Access is denied

2014-01-08 Thread andre999
I have included the result with the actual filenames and folders in use.
Here are the result;

[DEBUG] -- end configuration --
[INFO] [install:install {execution: default-install}]
[INFO] Installing
P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\certloader-custom-action.jar
to P:\.m2\repository\net\healthlink\certloader\hlk-certloader\1.0.2-S
APSHOT\hlk-certloader-1.0.2-SNAPSHOT.jar
[INFO] Installing
P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\certloader-custom-action-sources.jar
to P:\.m2\repository\net\healthlink\certloader\hlk-certloader
1.0.2-SNAPSHOT\hlk-certloader-1.0.2-SNAPSHOT-sources.jar
[INFO] Installing
P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\install4j\certImport
to
P:\.m2\repository\net\healthlink\certloader\hlk-certloader\1.0.2-SNAPSHOT\
lk-certloader-1.0.2-SNAPSHOT-certImport
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error installing artifact:
P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\install4j\certImport
(Access is denied)

[INFO]

[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error installing
artifact:
P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\install4j\certImport
(Access is d
nied)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error installing
artifact:
P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\install4j\certImport
(Access i
 denied)
at
org.apache.maven.plugin.install.InstallMojo.installProject(InstallMojo.java:239)
at
org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:129)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by:
org.apache.maven.artifact.installer.ArtifactInstallationException: Error
installing artifact:
P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\install4j\c
rtImport (Access is denied)
at
org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:119)
at
org.apache.maven.plugin.install.InstallMojo.installProject(InstallMojo.java:230)
... 20 more
Caused by: java.io.FileNotFoundException:
P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\install4j\certImport
(Access is denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.init(FileInputStream.java:120)
at
hidden.org.codehaus.plexus.util.io.FileInputStreamFacade.getInputStream(FileInputStreamFacade.java:39)
at
hidden.org.codehaus.plexus.util.FileUtils.copyStreamToFile(FileUtils.java:1106)
at
hidden.org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:1013)
at
org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:98)
... 21 more
[INFO]




--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-install-phase-Access-is-denied-tp5780920p5780950.html
Sent 

Re: Maven install phase - Access is denied

2014-01-08 Thread Wayne Fay
 [INFO] Error installing artifact:
 P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\install4j\certImport
 (Access is denied)

I hate to point out the obvious, but did you confirm that the user
executing Maven has write/create directory privileges in this
location? Assuming you are running from the Windows command line, can
you go there (as the same user) and mkdir etc?

Wayne

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



Re: Maven install phase - Access is denied

2014-01-08 Thread andre999
I have run the cmd and there is no issue with right to create or delete
folders. 

Here are the build in pom.xml

build
finalNamecertloader-custom-action/finalName
resources
resource

directory${basedir}/src/main/resources/directory
excludes
exclude**/*.png/exclude
exclude*images*/exclude
/excludes
/resource
/resources
plugins
plugin
artifactIdmaven-resources-plugin/artifactId
version2.6/version
configuration

includeEmptyDirstrue/includeEmptyDirs

outputDirectory${basedir}/target/install4j/outputDirectory  

/configuration
executions
execution
idcopy-resources/id
phasevalidate/phase
goals

goalcopy-resources/goal
/goals
configuration 


outputDirectory${basedir}/target/install4j/certImport/outputDirectory
resources
resource

directory${basedir}/src/main/resources/certImport/directory 

/resource 

/resources

includeEmptyDirstrue/includeEmptyDirs
/configuration
/execution
/executions
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-install-plugin/artifactId
version2.5.1/version
configuration
filecertloader-custom-action.jar/file

filecertloader-custom-action-sources.jar/file
/configuration
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-dependency-plugin/artifactId
version2.5.1/version
executions
execution
idproperties/id
goals
goalproperties/goal
/goals
/execution
execution
idvalidate-exe/id
phasevalidate/phase
goals
goalunpack/goal
/goals
configuration

outputAbsoluteArtifactFilenametrue/outputAbsoluteArtifactFilename
artifactItems
artifactItem

groupIdnet.install4j/groupId

artifactIdinstall4j/artifactId

version5.0.10/version

typezip/type
/artifactItem
/artifactItems

outputDirectory${install4j_path}/outputDirectory

Re: Maven install phase - Access is denied

2014-01-08 Thread Thomas Broyer
Le 8 janv. 2014 20:39, andre999 andre...@hotmail.com a écrit :

 Caused by: java.io.FileNotFoundException:

P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\install4j\certImport
 (Access is denied)
 at java.io.FileInputStream.open(Native Method)

Isn't the problem that you're trying to install a directory rather than a
file? I don't think that's possible, a folder is not an artifact, it has to
be archived somehow first.


Re: Maven install phase - Access is denied

2014-01-08 Thread andre999
That's the problem. I do not know how to order maven install NOT to read the
directory and not to create repository. Maven install reads the
install4j\certImport folder and this is where it fails. How can I make
maven not to read (skip) this install4j\certImport folder?

Thanks



--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-install-phase-Access-is-denied-tp5780920p5780969.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



release-plugin non-interactive release and system properties

2014-01-08 Thread Weston, Steve
I'm confused as to how the version number in a pom file and the system 
properties like -DdevelopmentVersion=2.0-SNAPSHOT and -DreleaseVersion=1.2

interact.
When I run a mvn -B release:prepare -DdryRun=true -Dtag=1.2 
-DdevelopmentVersion=2.0-SNAPSHOT -DreleaseVersion=1.2 for a pom.xml where 
version1.0/version and packagingjar/packaging the resulting jar file 
uses the pom version number not the command line version, i.e xxx-1.0.jar . Is 
this expected behaviour and if so what is the point of specifying the versions 
on the command line ?

Steve Weston
Principal Software Engineer

PAREXEL International
Perceptive Informatics UK Ltd
8th Floor, Centre City Tower
5/7 Hill Street
Birmingham, UK, B5 4UA

T +44.(0)121.616.5600
steve.wes...@parexel.commailto:steve.wes...@parexel.com
www.PAREXEL.comhttp://www.parexel.com/

[Description: Description: Description: Description: Description: Description: 
Description: Description: Description: Description: Description: Description: 
Description: C:\Users\MorrisoE\AppData\Local\Microsoft\Windows\Temporary 
Internet Files\Content.Word\R1_Logo.png]http://www.parexel.com/

This communication, including any attachments, is intended only for the person 
or entity to which it is addressed and may contain confidential material. Any 
review, retransmission, distribution or other use of this information by 
persons or entities other than the intended recipient is prohibited. If you 
received this in error, please destroy any copies, contact the sender and 
delete the material from any computer.  Thank you.

Perceptive Informatics UK Limited (Company No. 03675405) is registered in 
England and Wales with a registered office at The Quays, 101-105 Oxford Road, 
Uxbridge, Middlesex, United Kingdom UB8 1LZ



Need advice automating a Java test suite.

2014-01-08 Thread Todd Chapman
Hello,

We have a java multi-module project that has a somewhat painful to run test
suite that I would like to get under control using Maven.

Currently it takes 5 separate Maven commands to setup, run, and teardown
all the tests and test databases. I'd like to get this down to one command.
Also I would like this structured so that individual parts of the process
can be run separately to aid in debugging problems.

The pom has 1 profile for each part of the task, all bound to the test
goal:

mvn clean test -P test-setup-1,local-enterprise-test-db  (exec:java plugin
to setup up a database)
mvn test -P test-setup-2,local-enterprise-test-db   (exec:java
plugin to setup up a 2nd database)
mvn test -P test-design,local-enterprise-test-db(surefire
plugin to run a subset of the tests with maven properties set)
mvn test -P test-transactional,local-enterprise-test-db   (surefire plugin
to run a different subset of the tests with different maven properties set)
mvn test -P test-tear-down,local-enterprise-test-db(exec:java
plugin to teardown the databases)


The problem I am running into is how to get this organized so that it all
happens with 1 command. It seems nearly unpossible.

Can anyone offer any advice on how to accomplish this? Pointer to relevant
articles, blog posts, stackoverflow questions would be most appreciated.

Thanks!

-Todd


Re: Maven install phase - Access is denied

2014-01-08 Thread Thomas Broyer
I'd rather say the question is why does it even tries to install it? There
must be some plugin that attaches it.
Le 8 janv. 2014 22:34, andre999 andre...@hotmail.com a écrit :

 That's the problem. I do not know how to order maven install NOT to read
 the
 directory and not to create repository. Maven install reads the
 install4j\certImport folder and this is where it fails. How can I make
 maven not to read (skip) this install4j\certImport folder?

 Thanks



 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Maven-install-phase-Access-is-denied-tp5780920p5780969.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: Maven install phase - Access is denied

2014-01-08 Thread Russell Gold
I suspect it has to do with your customization of the install goal:

   plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-install-plugin/artifactId
   version2.5.1/version
   configuration
   filecertloader-custom-action.jar/file
   
 filecertloader-custom-action-sources.jar/file
   /configuration
   /plugin

It looks as though your customization is telling it to install something that 
would not be installed by default.

On Jan 8, 2014, at 4:33 PM, andre999 andre...@hotmail.com wrote:

 That's the problem. I do not know how to order maven install NOT to read the
 directory and not to create repository. Maven install reads the
 install4j\certImport folder and this is where it fails. How can I make
 maven not to read (skip) this install4j\certImport folder?
 
 Thanks
 
 
 
 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Maven-install-phase-Access-is-denied-tp5780920p5780969.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
 

-
Author, Getting Started with Apache Maven 
http://www.packtpub.com/getting-started-with-apache-maven/video

Come read my webnovel, Take a Lemon http://www.takealemon.com, 
and listen to the Misfile radio play http://www.fuzzyfacetheater.com/misfile/!









Re: Need advice automating a Java test suite.

2014-01-08 Thread Stephen Connolly
Profiles are the path to madness.

There are two ways I can see to tackle this:

1. Use the invoker plugin to fork maven builds for each of your test steps

Or

2. Use a multi-module project so that the separate modules do the separate
parts.

The second is likely the more maven way but the 1st is not too far off,
if done right, and probably the easiest to implement... Not too hard to
refactor to #2 if you decide to later

On Wednesday, 8 January 2014, Todd Chapman wrote:

 Hello,

 We have a java multi-module project that has a somewhat painful to run test
 suite that I would like to get under control using Maven.

 Currently it takes 5 separate Maven commands to setup, run, and teardown
 all the tests and test databases. I'd like to get this down to one command.
 Also I would like this structured so that individual parts of the process
 can be run separately to aid in debugging problems.

 The pom has 1 profile for each part of the task, all bound to the test
 goal:

 mvn clean test -P test-setup-1,local-enterprise-test-db  (exec:java plugin
 to setup up a database)
 mvn test -P test-setup-2,local-enterprise-test-db   (exec:java
 plugin to setup up a 2nd database)
 mvn test -P test-design,local-enterprise-test-db(surefire
 plugin to run a subset of the tests with maven properties set)
 mvn test -P test-transactional,local-enterprise-test-db   (surefire plugin
 to run a different subset of the tests with different maven properties set)
 mvn test -P test-tear-down,local-enterprise-test-db(exec:java
 plugin to teardown the databases)


 The problem I am running into is how to get this organized so that it all
 happens with 1 command. It seems nearly unpossible.

 Can anyone offer any advice on how to accomplish this? Pointer to relevant
 articles, blog posts, stackoverflow questions would be most appreciated.

 Thanks!

 -Todd



-- 
Sent from my phone


Re: Maven install phase - Access is denied

2014-01-08 Thread Barrie Treloar
On 9 January 2014 06:56, andre999 andre...@hotmail.com wrote:
 build
[del]
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-install-plugin/artifactId
 version2.5.1/version
 configuration
 filecertloader-custom-action.jar/file
 
 filecertloader-custom-action-sources.jar/file

What do you expect this section to do?
http://maven.apache.org/plugins/maven-install-plugin/install-mojo.html
does not have a file property.
And file implies a single entry, specifying it a second time would
mean you overwrite the previous value.
Lists are normally plural. (something like
filesfileA/filefileB/file/files

If you want the sources to also be installed use the source plugin
http://maven.apache.org/plugins/maven-source-plugin/

You shouldn't need this section on install at all.

I can't see anything in that pom that would mean a directory is being
installed into your local m2 cache.

The assembly plugin can have these types of issues when you specify
dir as a distribution format on deploy.
But deploy is after install so this is not the problem.

The problem I have is that it is trying to install
P:\Projects\HlkProjects\CertLoader\hlk-certloader\trunk\target\install4j\certImport
to
P:\.m2\repository\net\healthlink\certloader\hlk-certloader\1.0.2-SNAPSHOT\lk-certloader-1.0.2-SNAPSHOT-certImport

Why is maven attaching \target\install4j\certImport as a build
artifact that it thinks it needs to install.

Try running mvn -X and redirect the output to a file.
Then search for target\install4j\certImport and see which plugin is
being configured with this value.
That might give you a hint as to where to look to turn that off.
I'd almost suspect the parent pom.
Using resources:copy-resource does not attach anything to be installed
and it is the only thing that is using target\install4j\certImport
from your supplied output.

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



RE: Need advice automating a Java test suite.

2014-01-08 Thread Martin Gainty


  


 Date: Wed, 8 Jan 2014 17:08:53 -0500
 Subject: Need advice automating a Java test suite.
 From: t...@chaka.net
 To: users@maven.apache.org
 
 Hello,
 
 We have a java multi-module project that has a somewhat painful to run test
 suite that I would like to get under control using Maven.
 
 Currently it takes 5 separate Maven commands to setup, run, and teardown
 all the tests and test databases. I'd like to get this down to one command.
 Also I would like this structured so that individual parts of the process
 can be run separately to aid in debugging problems.
 
 The pom has 1 profile for each part of the task, all bound to the test
 goal:
MGMy initial thought was to bind each profile-group to different phases
MGthat way the reactor will govern the execution order of who gets executed 
first (mvn initialize),
MGwhich profile gets executed second (mvn generate-test-sources) 
MGand finally last profile gets executed (mvn package)
MGthe problem is you have alot of testcases to run so perhaps running a string 
of profiles maybe the answer
 
MGProfile1
 mvn clean test -P test-setup-1,local-enterprise-test-db (exec:java plugin
 to setup up a database)
 mvn test -P test-setup-2,local-enterprise-test-db (exec:java
 plugin to setup up a 2nd database)
MGProfile1
 
MGProfile2
 mvn test -P test-design,local-enterprise-test-db (surefire
 plugin to run a subset of the tests with maven properties set)
 mvn test -P test-transactional,local-enterprise-test-db (surefire plugin
 to run a different subset of the tests with different maven properties set)
MGProfile2

MGProfile3
 mvn test -P test-tear-down,local-enterprise-test-db (exec:java
 plugin to teardown the databases)
MGProfile3
 
MGOff the top of my head i would setup a 'marker file' for the successful 
completion of each Profile
MGWhen marker file from Profile1 exists trigger Profile 2 
MGWhen marker file from Profile2 exists trigger Profile3
 
MGmvn help:active-profiles -P Profile1,Profile2,Profile3 

 
 The problem I am running into is how to get this organized so that it all
 happens with 1 command. It seems nearly unpossible.
 
 Can anyone offer any advice on how to accomplish this? Pointer to relevant
 articles, blog posts, stackoverflow questions would be most appreciated.
 
 Thanks!
 
 -Todd
MGassuming the IDentifiers are unique (and presence of marker files are 
unique) synchronous profile execution *should* work
  

Skip copying resources

2014-01-08 Thread Kuo, Joncheng (HP Storage - MSDU)
How do I skip copying resources? I try skip in configuration but it does 
not work.

  plugin
artifactIdmaven-resources-plugin/artifactId
executions
  execution
idcopy-xxx/id
phasecompile/phase
goals
  goalcopy-resources/goal
/goals
configuration
  skiptrue/skip
  outputDirectory${webapp.dir}/example/resources/outputDirectory
  resources
resource
  directory${webapp.dir}/resources/directory
  includes
include**/include
  /includes
/resource
  /resources
/configuration
  /execution
/executions

Joncheng Kuo



Re: Skip copying resources

2014-01-08 Thread Paul Benedict
Your problem is that, I think, you attached the execution to the compile
phase. However, the process-resources phase already happened so you're
not getting the right behavior. Attach to the correct phase.


On Wed, Jan 8, 2014 at 4:05 PM, Kuo, Joncheng (HP Storage - MSDU) 
joncheng@hp.com wrote:

 How do I skip copying resources? I try skip in configuration but it
 does not work.

   plugin
 artifactIdmaven-resources-plugin/artifactId
 executions
   execution
 idcopy-xxx/id
 phasecompile/phase
 goals
   goalcopy-resources/goal
 /goals
 configuration
   skiptrue/skip

 outputDirectory${webapp.dir}/example/resources/outputDirectory
   resources
 resource
   directory${webapp.dir}/resources/directory
   includes
 include**/include
   /includes
 /resource
   /resources
 /configuration
   /execution
 /executions

 Joncheng Kuo




-- 
Cheers,
Paul


Re: Need advice automating a Java test suite.

2014-01-08 Thread Anders Hammar
It's little bit hard understanding all of the magic with your profiles and
why you can''t combine them. But if I assume that you want to test your
application with different configuration (different db, different
configuration/properties, etc.) I suggest that you create a separate
multi-module project for your testing. Each of the modules there would test
ONE specific setup/config for the applicatation. You would bind the setup
of the environment to the pre-integration-test phase and the tear down of
the same to the post-integration-test phase. And then you use the
maven-failsafe-plugin to execute all tests (for that app config) in the
integration-test phase.

If you have the same set of JUnit test classes to be used in all modules,
you have these in a separate module which would create a test artifact that
you re-use in the other modules. If you have a lot of the same pom config
magics in the modules this can be moved to the pluginManagement section of
the parent (more advanced Maven usage, do that last when everything already
works).

This will make it possible to build all modules for a complete test suite
(mvn verify). If you just want to test one setup/config you only build
that module (mvn verify).

/Anders


On Wed, Jan 8, 2014 at 11:08 PM, Todd Chapman t...@chaka.net wrote:

 Hello,

 We have a java multi-module project that has a somewhat painful to run test
 suite that I would like to get under control using Maven.

 Currently it takes 5 separate Maven commands to setup, run, and teardown
 all the tests and test databases. I'd like to get this down to one command.
 Also I would like this structured so that individual parts of the process
 can be run separately to aid in debugging problems.

 The pom has 1 profile for each part of the task, all bound to the test
 goal:

 mvn clean test -P test-setup-1,local-enterprise-test-db  (exec:java plugin
 to setup up a database)
 mvn test -P test-setup-2,local-enterprise-test-db   (exec:java
 plugin to setup up a 2nd database)
 mvn test -P test-design,local-enterprise-test-db(surefire
 plugin to run a subset of the tests with maven properties set)
 mvn test -P test-transactional,local-enterprise-test-db   (surefire plugin
 to run a different subset of the tests with different maven properties set)
 mvn test -P test-tear-down,local-enterprise-test-db(exec:java
 plugin to teardown the databases)


 The problem I am running into is how to get this organized so that it all
 happens with 1 command. It seems nearly unpossible.

 Can anyone offer any advice on how to accomplish this? Pointer to relevant
 articles, blog posts, stackoverflow questions would be most appreciated.

 Thanks!

 -Todd



Re: Skip copying resources

2014-01-08 Thread Anders Hammar
I'm pretty sure it works for the binding (execution) you have configured.
Look for the id 'copy-xxx' in the console output and for the execution it
should say that it is skipping. (Unless you have the plugin config in
pluginManagement).

At the same time the config you should doesn't make sense. Why would you
create a binding but set skip to true?

What is it that you're trying to do?

/Anders


On Thu, Jan 9, 2014 at 1:05 AM, Kuo, Joncheng (HP Storage - MSDU) 
joncheng@hp.com wrote:

 How do I skip copying resources? I try skip in configuration but it
 does not work.

   plugin
 artifactIdmaven-resources-plugin/artifactId
 executions
   execution
 idcopy-xxx/id
 phasecompile/phase
 goals
   goalcopy-resources/goal
 /goals
 configuration
   skiptrue/skip

 outputDirectory${webapp.dir}/example/resources/outputDirectory
   resources
 resource
   directory${webapp.dir}/resources/directory
   includes
 include**/include
   /includes
 /resource
   /resources
 /configuration
   /execution
 /executions

 Joncheng Kuo