RE: Exec Maven Plugin

2018-01-30 Thread Yaron Golan
From a first glance, It doesn't look like a maven nor the plugin issue.
Please try to :
1. Run the NPM command from command line
2. Run a script (sh/batch) instead the NPM command.
In the script, you can set your proxy, NPM proxy, NPM registry and etc.


Yaron Golan
CI/CD, ALM Team 
AT Network Applications Development · SD  
Tel Aviv | Tampa | Atlanta | New Jersey |Chicago
···
Office: +972 (3) 976 5938
Mobile: +972 (54) 248 4460
e-mail:  yaron.go...@att.com



Hi

I tried to use the plugin and run npm install from java application


org.codehaus.mojo
exec-maven-plugin
1.6.0

  
npm install (initialize)  exec  
initialize  npm 
${project.basedir}/../

install






when I run mvn build I got error

[INFO] --- exec-maven-plugin:1.6.0:exec (npm install mynpm) @ srv ---
10:37:31 PM  npm ERR! ...'

npm ERR! A complete log of this run can be found in:
npm ERR!
 
/home/vcap/app/META-INF/cache/8.9.1/.npm/_logs/2018-01-29T20_37_30_159Z-debug.log
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit 
value: 1) at
org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

I tried also to ladd .npmrc but it look like it didn't consider this file Could 
you please advise me ?


RE: Create own archetype with specific folder format according to settings

2017-09-12 Thread Yaron Golan
Hi,
Please take a look at:
https://maven.apache.org/guides/mini/guide-creating-archetypes.html


Yaron Golan
CI/CD, ALM Team 
AT Network Applications Development · SD  
Tel Aviv | Tampa | Atlanta | New Jersey |Chicago
···
Office: +972 (3) 976 5938
Mobile: +972 (54) 431 0632
e-mail:  yaron.go...@att.com


-Original Message-
From: Christian Wansart [mailto:christian.wans...@openknowledge.de] 
Sent: Tuesday, September 12, 2017 1:52 PM
To: users@maven.apache.org
Subject: Create own archetype with specific folder format according to settings

Hello,

I am trying to create an own archetype which should create a specific folder 
structure inside the package given through the groupId and artifactId. So let’s 
say I have this project structure:

>  my-app/pom.xml
>  my-app/src/main/java/models/DefaultUser.java
>  my-app/src/main/java/control/UserController.java

So, I do have some default implementations I need everywhere, but I also want 
to create some folders that will be empty.
So far I have not found a way to create empty folders. My goal is to create the 
following structure out of the above with the groupId “my.group” and the 
artifactId “app”:

>  my-app/pom.xml
>  my-app/src/main/java/my/group/app/models/DefaultUser.java
>  my-app/src/main/java/my/group/app/control/UserController.java

Is it possible to copy files from a standard path to those generated paths?

Thanks in advance.
Christian





RE: Maven not getting latest artefact after deploy:deploy-file

2017-08-03 Thread Yaron Golan
The issue of getting the correct version when downloading is what written in 
the pom.xml file.
It has nothing to do with whatever version you uploaded.


Yaron Golan


-Original Message-
From: Mehul Sanghvi [mailto:mehul.sang...@gmail.com] 
Sent: Wednesday, August 02, 2017 7:28 PM
To: ML Maven Users
Subject: Maven not getting latest artefact after deploy:deploy-file

Maven: 3.3.3
Nexus: OSS 2.14.0-1

We have a build process that explicitly uploads a few artefacts using 
deploy:deploy-file.  Subsequent builds in the chain, will than download these 
artefacts, but they never end up getting the latest artefact from Nexus.

We can see the artefact is available in Nexus, but I always have to do a manual 
rebuilding of the metadata in Nexus before I am able to have the subsequent 
builds pick up the latest version.

Here is what we use for uploading with deploy:deploy-file:

${mvn} deploy:deploy-file -B -V --quiet -s ${settings_file} -P${mvn_profile} 
${maven_options} ${deploy_file_options} -DrepositoryId=${repo_id} 
-Durl=${repo_url} -DgroupId=${group_id} -Dversion=${version} 
-DartifactId=${artifact_id} -Dfile=${artefact}

The above is run in a bash for-loop after the variables are setup via a 
case-esac statement.


For downloading it is just "mvn clean install -B -V -U" followed by locations 
for security settings file and maven local repo.



Any thoughts or suggestion ?   Let me know if more information is required.

cheers,

 mehul


--
Mehul N. Sanghvi
email: mehul.sang...@gmail.com

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


RE: Treat maven warnings as errors

2017-03-06 Thread Yaron Golan
Anyone?

"No" is an answer as well, you know ... :)


-Original Message-----
From: Yaron Golan [mailto:ygo...@interwise.com] 
Sent: Wednesday, March 01, 2017 12:05 PM
To: users@maven.apache.org
Subject: Treat maven warnings as errors

Hi,
Is there a way to treat the maven warnings as errors?



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



Treat maven warnings as errors

2017-03-01 Thread Yaron Golan
Hi,
Is there a way to treat the maven warnings as errors?