Accessing a file specified by parameter from a submodule

2020-08-04 Thread Russell Gold
In my project https://github.com/oracle/weblogic-monitoring-exporter/, one 
option is to specify a file path on the command line, such as:

mvn clean install -Dconfiguration=samples/configuration/servlets.yml

and this works whether the path is actually absolute or relative, since the 
invocation is made from the top module. Now I need something a bit more 
complex, and have to invoke it from a submodule (not yet pushed to GitHub). But 
that gets invoked from the submodule’s directory, which means that a relative 
path will be wrong. Is there a way to copy a file using the current directory 
of the parent (pom) project?
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven project: method defineClass in class sun.misc.Unsafe cannot be applied to given types with latest Java version.

2020-08-04 Thread Russell Gold
If the definition has changed, it’s going to appear to Java to be a different 
method, and you won’t be able to call it, any more than you can call any method 
that no longer exists. That’s the challenge with working with very old code. 
Deprecation typically only gives you flexibility to move one or two JDK 
versions.

So your options are pretty much: change the code to match the current API, or 
run against an old JDK.

> On Jul 26, 2020, at 10:53 PM, Amit Mathapati  wrote:
> 
> My bad, I had forgotten to attach my pom.xml file.
> 
> 
> 
> On Sun, Jul 26, 2020 at 7:47 PM Amit Mathapati  > wrote:
> 
> 
>  
> Hello Users,
> 
> 
> 
> I am trying to modify an mvel2 library open source code dating back from < 
> 2010. https://github.com/mvel/mvel 
> THis is a maven project.
> 
> I recently downloaded the source code and when I tried to compile the 
> project, it gives an error message.
> 
> public Class defineClassX(String className, byte[] b, int off, int len) {
> if (sunJVM) {
> return ((Unsafe) sunUnsafe).defineClass(className, b, off, len);
> }
> else {
> return super.defineClass(className, b, off, len);
> }
> }
> Error message: Error:(59,40) java: method defineClass in class 
> sun.misc.Unsafe cannot be applied to given types;
> mvel2 2.0.16 seems to have built with Java 1.5 but in my recent environment 
> it is Java 1.8 and the "defineClass" method definition has changed.
> 
> New Method definition in Java 1.8 :
> 
> public native Class defineClass(String var1, byte[] var2, int var3, int 
> var4, ClassLoader var5, ProtectionDomain var6);
> What is the workaround for this?
> 
> Some options I tried:
> 
> Passing in null values for ClassLoaded and ProtectionDomain
> in pom.xml, under:
> 
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.6.2
> 
> 1.6
> 1.6
> UTF-8
> 
> -XDignore.symbol.file
> 
> 
> 
>   a) I tried passing in 1.5 but it fails with same error
>   b) Tried the compilerArgs but no luck either?
> Tip from VGR below in the comments to remove the if(sunJVM) block causes all 
> test cases to fail when building the maven package.
> I feel the issue seems to be that, since the source code package was built 
> with Java 1.5 and now since I am building with the latest Java 1.8 version, 
> it is failing.
> 
> Can someone suggest a workaround for this?
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org



Re: Help with shading jar

2020-07-07 Thread Russell Gold
Are they part of the same build?

Can you create a minimal example and post it to GitHub? There’s really not 
enough detail to understand what you are trying to do.

> On Jul 2, 2020, at 5:18 PM, Quiyan H  wrote:
> 
> Hi All
> I am stuck with one shading stuff, Need help if there is known way out.
> I have a project module which has bunch of dependencies and I want to shade
> and relocate one of the dependency. I did that, but the problem is the
> other dependency also uses the dependency that I shaded, but that doesn’t
> use the relocated class, is there any way to make the other dependency use
> the relocated shaded class instead of the original.
> The catch is I can’t shade this other dependency due to other conflicts.
> 
> Module
> DependencyA (uses dependency B as well)
> DependencyB (shaded and relocated)
> 
> Want to make dependency A use relocated classes in the Module rather than
> direct dependency B
> 
> Any help, even if it is something which can not be done, Please let me
> know!!!
> 
> Waiting for a response!!!


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



Re: Shade plugin cannot find default setter?

2020-05-04 Thread Russell Gold
D’oh! Thank you very much!

> On May 4, 2020, at 10:03 AM, Stuart McCulloch  wrote:
> 
> It looks like you're missing the  tag inside the 
> list:
> https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html
> 
> try:
> 
> 
>
>
>javax.ejb
>jakarta.ejb
>
>javax.ejb.*
>
>    
>
> 
> 
> On Mon, 4 May 2020 at 15:01, Russell Gold  wrote:
> 
>> I’m attempting to use the shade plugin to relocate some dependent classes
>> with the following configuration:
>> 
>> 
>>
>>javax.ejb
>>jakarta.ejb
>>
>>javax.ejb.*
>>
>>
>> 
>> 
>> 
>> but when I try running, I see:
>> 
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on
>> project orb-gmbal-pfl-shading: Unable to parse configuration of mojo
>> org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade for parameter
>> pattern: Cannot find default setter in class
>> org.apache.maven.plugins.shade.mojo.PackageRelocation -> [Help 1]
>> 
>> How do I get past this?
>> 
>> Thanks,
>> Russ


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



Shade plugin cannot find default setter?

2020-05-04 Thread Russell Gold
I’m attempting to use the shade plugin to relocate some dependent classes with 
the following configuration:



javax.ejb
jakarta.ejb

javax.ejb.*





but when I try running, I see:

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on project 
orb-gmbal-pfl-shading: Unable to parse configuration of mojo 
org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade for parameter pattern: 
Cannot find default setter in class 
org.apache.maven.plugins.shade.mojo.PackageRelocation -> [Help 1]

How do I get past this?

Thanks,
Russ

Re: hi ,

2020-03-27 Thread Russell Gold
mvn jar:help

The rest is assumed

> On Mar 27, 2020, at 11:54 AM, Angelo Moreschini  
> wrote:
> 
> I am new to maven, and I am exploring it,
> So for some plugins i would like to have some additional information using
> theirs "help" goal.
> However (apart from the basic plugins such as archetype or help : I cite as
> an example the plugin "maven-jar-plugin"),
> I get this ERROR in the output  ..:
> -
> angelo_dev@pluto:~$ mvn maven-jar-plugin:help
> Downloading:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml__;!!GqivPVa7Brio!K4aKmH1v7STH3Hs3loxXSt82vADJH4jsPWJIolu3B9puO8y7wH8LbUtX3CfHoHHpeA$
>  
> Downloading:
> https://urldefense.com/v3/__https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml__;!!GqivPVa7Brio!K4aKmH1v7STH3Hs3loxXSt82vADJH4jsPWJIolu3B9puO8y7wH8LbUtX3Cei5Zlpmg$
>  
> 
> BUILD FAILURE
> [INFO] ---
> -
> [INFO] Total time: 1.214 s
> [INFO] Finished at: 2020-03-27T18: 43: 16 + 03: 00
> [INFO] Final Memory: 10M / 40M
> [INFO] ---
> -
> [ERROR] No plugin found for prefix 'maven-jar-plugin' in the current
> project and in the plugin groups [org.apache.maven.plugins,
> org.codehaus.mojo] available from the repositories [local (/ home /
> angelo_dev /.m2/repository), central 
> (https://urldefense.com/v3/__https://repo.maven.apache.org/maven2__;!!GqivPVa7Brio!K4aKmH1v7STH3Hs3loxXSt82vADJH4jsPWJIolu3B9puO8y7wH8LbUtX3CeyworA9A$
>  )]
> -> [Help 1]
> -
> 
> I absolutely don't understand why this can happen...
> (I use this plugin in my POM.xml and it works)
> 
> Thank you
> 
> Angelo


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



Would it make sense to publish a WAR to maven central?

2019-05-30 Thread Russell Gold
The open source Weblogic Monitoring Exporter 
 is a set of servlets 
that works as an exporter for Prometheus. Building it involves two steps: one 
build compiles the servlets and the second assembles them into a WAR, in which 
a configuration file is embedded. Currently, users clone the repository and run 
both builds, but that means that they generally work with the latest commits. I 
am thinking that it makes more sense to publish it to maven central, but am 
looking for guidance. Is it customary to publish WARs to central? In such a 
case, I would combine the builds, and a simple shell command or script could 
supply the configuration. Or would it be best to publish the JAR containing the 
servlets and have users run the second build to create the WAR?

Thanks,
Russ

Re: Surefire plugin with multi-release?

2019-04-04 Thread Russell Gold
Yes, I know that’s how it works. The question is, how will developers use it? 
If MR jars are common, many developers will run into this problem, and it would 
be nice if Maven handled it by default. If it’s not common… those of with the 
issue will need to find workarounds. I have two open-source projects that 
create MR jars at present.

> On Apr 4, 2019, at 1:29 PM, Robert Scholte  wrote:
> 
> The specification you're talking about is the Multi Release Jar, and 
> especially the last word is important: Jar.
> 
> This only works with Jars and with a MANIFEST file containing Multi-Release: 
> true
> 
> Compiling and packaging has never been the issue, the tricky part is testing.
> If you want to test the jar, you must use the failsafe plugin (or bind 
> surefire to the integration-test phase)
> 
> All is described on the multirelease page of the maven-compiler-plugin[1]
> 
> thanks,
> Robert
> 
> [1] https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html
> 
> On Thu, 04 Apr 2019 18:14:58 +0200, Russell Gold  
> wrote:
> 
>> As of 3.8.0, the maven-compiler-plugin will place javaNNN source under 
>> META-INF/versions/NNN, which makes them ready for the jar plugin. But the 
>> surefire plugin ignores them! Is there a way to get the surefire plugin to 
>> run against them? They would need to be added on the class path ahead of the 
>> main output directory. I tried the  setting, 
>> but that adds them later on the path, which is worthless.
>> 
>> Or the tests could run against the built jar, but that violates the maven 
>> lifecycle order.
>> 
>> My multirelease parent strategy doesn’t seem to work well for the 
>> multi-module case, as it can either build the MR jar normally, letting later 
>> modules test against it (but breaking the MR module’s unit tests), or copy 
>> the META-INF/versions classes into the output directory, letting the 
>> module’s unit test use them, but breaking jar building.
>> 
>> I can see making the configuration much more complex, but it would be easier 
>> if there was a way to get the surefire plugin to recognize MR modules.
>> 
>> Thanks,
>> Russ
>> -
>> 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



Surefire plugin with multi-release?

2019-04-04 Thread Russell Gold
As of 3.8.0, the maven-compiler-plugin will place javaNNN source under 
META-INF/versions/NNN, which makes them ready for the jar plugin. But the 
surefire plugin ignores them! Is there a way to get the surefire plugin to run 
against them? They would need to be added on the class path ahead of the main 
output directory. I tried the  setting, but that 
adds them later on the path, which is worthless.

Or the tests could run against the built jar, but that violates the maven 
lifecycle order.

My multirelease parent strategy doesn’t seem to work well for the multi-module 
case, as it can either build the MR jar normally, letting later modules test 
against it (but breaking the MR module’s unit tests), or copy the 
META-INF/versions classes into the output directory, letting the module’s unit 
test use them, but breaking jar building. 

I can see making the configuration much more complex, but it would be easier if 
there was a way to get the surefire plugin to recognize MR modules.

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



Re: maven compiler plugin multiReleaseOutput option and previous versions

2019-02-12 Thread Russell Gold
I just looked at the code. It is only adding the versioned class paths when 
there is a module descriptor in the current source directory. I might be able 
to put one in here, as a workaround.

> On Feb 12, 2019, at 2:47 PM, Robert Scholte  wrote:
> 
> I thought I had written an IT for it, but can't find it.
> Looks like you found a bug.
> 
> Robert
> 
> On Tue, 12 Feb 2019 20:03:10 +0100, Russell Gold  
> wrote:
> 
>> But it doesn’t appear to be working for me.
>> 
>>> [INFO] --- maven-compiler-plugin:3.8.0:compile (java9) @ pfl-basic ---
>>> [DEBUG] Configuring mojo 
>>> org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile from plugin 
>>> realm 
>>> ClassRealm[plugin>org.apache.maven.plugins:maven-compiler-plugin:3.8.0, 
>>> parent: jdk.internal.loader.ClassLoaders$AppClassLoader@799f7e29]
>>> [DEBUG] Configuring mojo 
>>> 'org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile' with basic 
>>> configurator -->
>>> [DEBUG]   (f) basedir = 
>>> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic
>>> [DEBUG]   (f) buildDirectory = 
>>> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target
>>> [DEBUG]   (f) compilePath = 
>>> [/Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/classes]
>>> [DEBUG]   (f) compileSourceRoots = 
>>> [/Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/src/main/java9]
>>> [DEBUG]   (f) compilerId = javac
>>> [DEBUG]   (f) debug = true
>>> [DEBUG]   (f) encoding = UTF-8
>>> [DEBUG]   (f) failOnError = true
>>> [DEBUG]   (f) failOnWarning = false
>>> [DEBUG]   (f) forceJavacCompilerUse = false
>>> [DEBUG]   (f) fork = false
>>> [DEBUG]   (f) generatedSourcesDirectory = 
>>> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/generated-sources/annotations
>>> [DEBUG]   (f) jdkToolchain = {version=9}
>>> [DEBUG]   (f) mojoExecution = 
>>> org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile {execution: 
>>> java9}
>>> [DEBUG]   (f) multiReleaseOutput = true
>>> [DEBUG]   (f) optimize = false
>>> [DEBUG]   (f) outputDirectory = 
>>> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/classes
>>> [DEBUG]   (f) parameters = false
>>> [DEBUG]   (f) project = MavenProject: 
>>> org.glassfish.pfl:pfl-basic:4.0.1-SNAPSHOT @ 
>>> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/pom.xml
>>> [DEBUG]   (f) projectArtifact = 
>>> org.glassfish.pfl:pfl-basic:jar:4.0.1-SNAPSHOT
>>> [DEBUG]   (s) release = 9
>>> [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@7640a5b1
>>> [DEBUG]   (f) showDeprecation = false
>>> [DEBUG]   (f) showWarnings = false
>>> [DEBUG]   (f) skipMultiThreadWarning = false
>>> [DEBUG]   (f) source = 1.7
>>> [DEBUG]   (f) staleMillis = 0
>>> [DEBUG]   (s) target = 1.7
>>> [DEBUG]   (f) useIncrementalCompilation = true
>>> [DEBUG]   (f) verbose = false
>>> [DEBUG] -- end configuration --
>>> [DEBUG] Using compiler 'javac'.
>>> [DEBUG] Toolchain 
>>> JDK[/Library/Java/JavaVirtualMachines/1.6.0_41-b02-445.jdk/Contents/Home] 
>>> doesn't match required property: version
>>> [DEBUG] Toolchain 
>>> JDK[/Library/Java/JavaVirtualMachines/jdk1.7.0_65.jdk/Contents/Home] 
>>> doesn't match required property: version
>>> [DEBUG] Toolchain 
>>> JDK[/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home] doesn't 
>>> match required property: version
>>> [DEBUG] Toolchain 
>>> JDK[/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home] doesn't 
>>> match required property: version
>>> [INFO] Toolchain in maven-compiler-plugin: 
>>> JDK[/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home]
>>> [DEBUG] Adding 
>>> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/generated-sources/annotations
>>>  to compile source roots:
>>>  /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/src/main/java
>>>  
>>> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/generated-sources/annotations
>>> [DEBUG] New compile source roots:
>>>  /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/src/main/java
>>>  
>>> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/generated-sources/annotations
>>> [DEBUG] CompilerReuseStrategy: reuseCreated
>>> [DEBUG] useIncrementalCompilation 

Re: maven compiler plugin multiReleaseOutput option and previous versions

2019-02-12 Thread Russell Gold
ects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/generated-sources/annotations
> [DEBUG] New compile source roots:
>   /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/src/main/java
>   
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/generated-sources/annotations
> [DEBUG] CompilerReuseStrategy: reuseCreated
> [DEBUG] useIncrementalCompilation enabled
> [DEBUG] Stale source detected: 
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/src/main/java11/org/glassfish/pfl/basic/reflection/Bridge.java
> [INFO] Changes detected - recompiling the module!
> [DEBUG] Classpath:
> [DEBUG]  
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/classes
> [DEBUG] Source roots:
> [DEBUG]  
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/src/main/java11
> [DEBUG] Excutable: 
> [DEBUG]  
> /Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/bin/javac

Note that the release 9 classes were not added to the classpath, here. Just the 
main output directory.

> [DEBUG] Command line options:
> [DEBUG] -d 
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/classes/META-INF/versions/11
>  -classpath 
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/classes: 
> -sourcepath 
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/src/main/java11:/Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/generated-sources/annotations:
>  
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/src/main/java11/org/glassfish/pfl/basic/reflection/Bridge.java
>  -s 
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/generated-sources/annotations
>  -g -nowarn --release 11 -encoding UTF-8
> [DEBUG] incrementalBuildHelper#beforeRebuildExecution
> [INFO] Compiling 1 source file to 
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/target/classes/META-INF/versions/11
> [DEBUG] incrementalBuildHelper#afterRebuildExecution
> [INFO] -----
> [ERROR] COMPILATION ERROR : 
> [INFO] -
> [ERROR] 
> /Users/rgold/projects/eclipse-ee4j/orb-gmbal-pfl/pfl-basic/src/main/java11/org/glassfish/pfl/basic/reflection/Bridge.java:[51,34]
>  error: cannot find symbol
>   symbol: class BridgeBase9
> [INFO] 1 error


> On Feb 12, 2019, at 1:08 PM, Robert Scholte  wrote:
> 
> Hi Russ,
> 
> There's no way to configure this, the plugin will do it for you[1]
> 
> thanks,
> Robert
> 
> [1] 
> https://github.com/apache/maven-compiler-plugin/blob/master/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java#L328-L346
> 
> On Tue, 12 Feb 2019 18:56:52 +0100, Russell Gold  
> wrote:
> 
>> Version 3.8.0 of the maven-compiler-plugin supports a multiReleaseOutput 
>> option which can compile classes directly to the appropriate 
>> META-INF/versions/{release} directory, which is very nice. What I don’t see, 
>> though, is how to tell it to use the previous release as its dependency. 
>> That is, given:
>> 
>> src
>>  |—— main
>>   |—— java
>>   |—— java9
>>   \—— java11
>> 
>> These directories will be compiled to:
>> 
>> target/classes, target/classes/META-INF/9 and target/classes/META-INF/11. 
>> But when I compile that last directory, I want to include 
>> target/classes/META-INF/9 in my class path, and I don’t see an obvious way 
>> to do it. It would be great if the plugin realized that this was necessary, 
>> but is there a way to configure it?
>> 
>> Thanks,
>> Russ
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 



maven compiler plugin multiReleaseOutput option and previous versions

2019-02-12 Thread Russell Gold
Version 3.8.0 of the maven-compiler-plugin supports a multiReleaseOutput option 
which can compile classes directly to the appropriate 
META-INF/versions/{release} directory, which is very nice. What I don’t see, 
though, is how to tell it to use the previous release as its dependency. That 
is, given:

src
  |—— main
   |—— java
   |—— java9
   \—— java11

These directories will be compiled to:

target/classes, target/classes/META-INF/9 and target/classes/META-INF/11. But 
when I compile that last directory, I want to include target/classes/META-INF/9 
in my class path, and I don’t see an obvious way to do it. It would be great if 
the plugin realized that this was necessary, but is there a way to configure it?

Thanks,
Russ

Maven-generated sites for multiple supported versions?

2018-11-20 Thread Russell Gold
How would one generate a site that provides access to multiple versions of the 
documentation? Is there standard support for such a thing, or a known plugin?
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Plugin parameter for project class path?

2018-11-10 Thread Russell Gold
That’s a big question :)

My problem was that I wasn’t sure what the parameters meant, and what the 
settings meant, and most especially, what the properties available in the build 
are. It’s a general problem with technical docs: when you develop a feature and 
want to describe it, it is hard to recall exactly what a user doesn’t know; 
consequently, most technical docs are essentially reference manuals for people 
who already know how to use the product and have forgotten some details. The 
best experience I had in creating docs for a product happened when a tech 
writer *interviewed* me, asking what the product did, and how to teach him to 
use it. 

That kind of user documentation takes a fair bit of work, of course. 

> On Nov 9, 2018, at 4:53 AM, Robert Scholte  wrote:
> 
> Counter question: where should we improve the documentation?
> 
> On Thu, 08 Nov 2018 19:02:03 +0100, Russell Gold  
> wrote:
> 
>> Thanks, that was the problem :)
>> 
>>> On Nov 7, 2018, at 3:48 PM, Robert Scholte  wrote:
>>> 
>>> Did you specify the requiresDependencyResolution of the @Mojo?
>>> 
>>> Robert
>>> 
>>> [1] 
>>> https://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html#Supported_Annotations
>>> On Tue, 06 Nov 2018 21:24:03 +0100, Russell Gold  
>>> wrote:
>>> 
>>>> I am writing a plugin which does post-processing on some classes compiled 
>>>> in the build, so I have defined a parameter that I would like Maven to 
>>>> fill in with the appropriate list of dependencies, but I am clearly 
>>>> misunderstanding how to do that. Here is what I have:
>>>> 
>>>> 
>>>>> @Parameter(defaultValue = "${project.compileClasspathElements}", readonly 
>>>>> = true, required = true)
>>>>> private List compileClasspathElements;
>>>> 
>>>> But when the plugin executes, that is being set to the directory in which 
>>>> compiled classes are places. (target/classes).
>>>> 
>>>> What is the correct way to do this, and how should I have figured it out?
>>>> 
>>>> Thanks,
>>>> Russ
>>>> -
>>>> 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
> 


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



Re: Plugin parameter for project class path?

2018-11-08 Thread Russell Gold
Thanks, that was the problem :)

> On Nov 7, 2018, at 3:48 PM, Robert Scholte  wrote:
> 
> Did you specify the requiresDependencyResolution of the @Mojo?
> 
> Robert
> 
> [1] 
> https://maven.apache.org/plugin-tools/maven-plugin-tools-annotations/index.html#Supported_Annotations
> On Tue, 06 Nov 2018 21:24:03 +0100, Russell Gold  
> wrote:
> 
>> I am writing a plugin which does post-processing on some classes compiled in 
>> the build, so I have defined a parameter that I would like Maven to fill in 
>> with the appropriate list of dependencies, but I am clearly misunderstanding 
>> how to do that. Here is what I have:
>> 
>> 
>>>  @Parameter(defaultValue = "${project.compileClasspathElements}", readonly 
>>> = true, required = true)
>>>  private List compileClasspathElements;
>> 
>> But when the plugin executes, that is being set to the directory in which 
>> compiled classes are places. (target/classes).
>> 
>> What is the correct way to do this, and how should I have figured it out?
>> 
>> Thanks,
>> Russ
>> -
>> 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 do I skip site-generation for modules?

2018-11-08 Thread Russell Gold
And at the same time, I would like to copy to the site directory some files 
that were generated during the build (and are now in one of the module jars). 

> On Nov 8, 2018, at 1:31 PM, Russell Gold  wrote:
> 
> I want to generate a site for my multi-module project only from the 
> top-level. How do I tell maven to skip running the site plugin on each module?


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



How do I skip site-generation for modules?

2018-11-08 Thread Russell Gold
I want to generate a site for my multi-module project only from the top-level. 
How do I tell maven to skip running the site plugin on each module?
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Plugin parameter for project class path?

2018-11-06 Thread Russell Gold
I am writing a plugin which does post-processing on some classes compiled in 
the build, so I have defined a parameter that I would like Maven to fill in 
with the appropriate list of dependencies, but I am clearly misunderstanding 
how to do that. Here is what I have:


>   @Parameter(defaultValue = "${project.compileClasspathElements}", readonly = 
> true, required = true)
>   private List compileClasspathElements;

But when the plugin executes, that is being set to the directory in which 
compiled classes are places. (target/classes).

What is the correct way to do this, and how should I have figured it out?

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



Re: Building and unit-testing MR Jars, easily

2018-04-14 Thread Russell Gold


> On Apr 13, 2018, at 6:32 PM, Martin Gainty <mgai...@hotmail.com> wrote:
> 
> MG3>agree with pretty much everything there except:
> 
> MG3>when creating MR jar for jar'ing JDK 9 classes one would need -release 
> option
> MG3>jar NameOfJar.jar --release 9   ?

That’s one way of doing it, certainly. It’s not clear to me how that is better 
than simply directing them to the appropriate directory under classes. 
> 
> MG3>when JDK9 jar command creates jar with manifest one would need specify 
> -manifest MANIFEST.MF
> MG3>jar -c NameOfJar.jar --manifest MANIFEST.MF * --release 9 ?
> 
> MG3>the objective is to incorporate MANIFEST.MF which includes Multi-Release 
> directive
> MG3>MANIFEST.MF would be included (which includes Multi-Release: true 
> directive)

I suppose that would involve changes to the jar plugin, which already has a way 
to define the manifest. Maybe a configuration parameter would be better than 
the way all of the current solutions seem to be doing it:


org.apache.maven.plugins
maven-jar-plugin
2.4


default-jar



true







> 
> ...
> Main-Class: com.foo.Hello
> Multi-Release: true
> 
> MG3>we can implement compile via different profiles for compile-java8 and for 
> compile-java9

That’s how my approach does it. I think it would be better if the compile 
plugin did it automatically, which is roughly how Lukas Krejci does it 
<https://github.com/metlos/multi-release-jar-maven-plugin>. That way users 
could simply place their code under src/main/java, src/main/java9, 
src/main/java10, etc.
> 
> 
>
>compile-java8
>
>
>
>org.apache.maven.plugins
>maven-compiler-plugin
>3.7.0
>
>
>default-compile
>
>compile
>
>
>1.8
>1.8
>
>**/*Java8.java
>
>
>
>
>
>
>
>
>
>compile-java9
>
>   
>
>
> 
> 
> 
> MG3>the remaining detail would be to handle creation of META-INF/versions/9
> 
> MG3>then populating META-INF/versions/9 with JDK-9 compiled classes with 
> maven-resources-plugin


That sounds a lot more complex than the way either Lukas or I are doing it. Why 
bring in the resource plugin at all?

> MG3>
> 
>  1.  
>  2.  
>  3.
>  4.  maven-resources-plugin
>  5.  3.0.2
>  6.  
>  7.
>  8.  copy-resources-jdk9
>  9.  
>  10. validate
>  11. 
>  12.   copy-resources
>  13. 
>  14. 
>  15.   
> ${basedir}/target/classes/META-INF/versions/9
>  16.   
>  17. 
>  18.   ${basedir}/target/classes
>  19.   true
>  20. 
>  21.   
>  22. 
>  23.   
>  24. 
>  25.   
>  26. 
> 
> MG3>likely that we will need to separate JDK1.8 and JDK1.9 to separate child 
> pom.xml with:
> 
> parent pom.xml
>  JDK18 folder (compile, copy and jar all JDK1.8 classes)
>  JDK19 folder (compile, copy and jar all JDK1.9 classes using 
> META-INF/versions/9 folder)
> 
> MG3>WDYT?

That’s Herve’s approach <https://github.com/hboutemy/maven-jep238>, which is 
really complex. The biggest problem with most of these is that the violate the 
principle of convention over configuration. My parent POM attempts to get close 
by hiding all of the configuration in the parent, but I think it would be much 
more usable if it were built into maven. 

That would require a fair bit of work to the compiler plugin, with probably 
minimal changes to the surefire and jar plugins. It’s more work there, but then 
much less work for users. 

> 
> 
> From: Russell Gold <russell.g...@oracle.com>
> Sent: Friday, April 13, 2018 9:07 AM
> To: Maven Users List
> Subject: Re: Building and unit-testing MR Jars, easily
> 
> 
> 
>> On Apr 13, 2018, at 8:34 AM, Martin Gainty <mgai...@hotmail.co

Re: Building and unit-testing MR Jars, easily

2018-04-13 Thread Russell Gold


> On Apr 13, 2018, at 8:34 AM, Martin Gainty <mgai...@hotmail.com> wrote:
> 
> MG2>quick comment below
> 
> MG2>from your website:
> MG2>
> "JEP-238<http://openjdk.java.net/jeps/238 
> <http://openjdk.java.net/jeps/238>>. A problem, though, is that more than two 
> years after this feature was announced, the tools still don’t actually 
> provide much in the way of support. My next post will explore the current 
> options"
> MG2>
> MG2>can you suggest current tools options which support JEP-238?

I haven’t found any as yet. That’s why the numerous Maven workarounds. I think 
it is a chicken-and-egg problem. Until maven (and possibly Gradle) support the 
feature with an agreed-upon directory layout, it is unlikely that the IDEs will 
support it. And until the IDEs support it naturally, it becomes painful for 
people to create projects with them.

Jetbrains has blogged about their workaround 
<https://blog.jetbrains.com/idea/2017/10/creating-multi-release-jar-files-in-intellij-idea/>,
 but that solution bypasses the build tools. 




> 
> From: Russell Gold <russell.g...@oracle.com <mailto:russell.g...@oracle.com>>
> Sent: Thursday, April 12, 2018 2:43 PM
> To: Maven Users List
> Subject: Re: Building and unit-testing MR Jars, easily
> 
> 
> 
>> On Apr 12, 2018, at 1:58 PM, Martin Gainty <mgai...@hotmail.com> wrote:
>> 
>>>   
>>>   org.apache.maven.plugins
>>>   maven-antrun-plugin
>>>   
>>>   
>>>   compile-java9
>>>   compile
>>>   
>>>   
>>>   
>>>   >> destdir="${java9.build.outputDirectory}"
>>>   classpath="${project.build.outputDirectory}" 
>>> includeantruntime="false" />
>>>   
>>>   
>>>   
>>>   run
>>>   
>>>   
>>>   
>>>   
>> MG>looks similar to maven-compiler-plugin with srcdir / destdir /classpath 
>> attrs..a bit more intuitive than maven-compiler-plugin
>> maven-compiler-plugin
>> 
>> 
>> default-compile
>> 
>>  
>>   "${java9.sourceDirectory}
>>   "${java9.build.outputDirectory}"
>>   ${project.build.outputDirectory}
>>  
> 
> 
> Part of that, I suspect, is ant’s use of attributes, which Maven generally 
> shuns. If the Maven pom were recast to use attributes, and to infer groups, 
> it could look something like:
> 
> artifactid="maven-compiler-plugin" version="3.7.9">
>
> destdir="${java9.build.outputDirectory}" 
> classpath="${java9.build.outputDirectory}"/>
>
>
> 
> but that wasn’t the direction the designers took.
> 
>> 
>> MG>
>> 
>> 
>> If you are actively working on adding MR capabilities to the compiler 
>> plugin, is there something I can do to help?
>> 
>> MG>initial evaluation would include what are advantages/disadvantages of MR
> 
> To a large extent, it is necessitated by the more rapid JDK changes which 
> commenced with Jigsaw’s introduction in Java 9. Until then, while APIs were 
> deprecated, they didn’t tend to go away a lot, and developers got used to 
> using both deprecated APIs and internal ones. With Jigsaw, the JDK team 
> started not only hiding the internal APIs, but also speeding up the pace of 
> removal of features.
> 
> I’ve given an example at http://www.russgold.net/sw/2018/03/ch-ch-ch-changes/ 
> <http://www.russgold.net/sw/2018/03/ch-ch-ch-changes/>
> 
> The basic problem is that some code that works in, say, Java 8, is no longer 
> supported in Java 11, and the replacement isn’t available until Java 9. That 
> means that you often cannot write one implementation that works for all JDK 
> versions that mean to support. Nor can you use a conditional in your code, 
> since the alternative implementations don’t even necessarily compile in the 
> same JDK (the replacement feature just mentioned doesn’t compile in Java 8, 
> and if you compile it for release 9, you cannot run it with Java 8. That 
> means that you have to use some tricky reflection - or MR Jars.
> 
> I don’t know how common they will be. I maintainer nearly two dozen modules 
> across several projects, and only two of them have needed this so

Re: Building and unit-testing MR Jars, easily

2018-04-12 Thread Russell Gold


> On Apr 12, 2018, at 1:58 PM, Martin Gainty <mgai...@hotmail.com> wrote:
> 
>>
>>org.apache.maven.plugins
>>maven-antrun-plugin
>>
>>
>>compile-java9
>>compile
>>
>>
>>
>>> destdir="${java9.build.outputDirectory}"
>>classpath="${project.build.outputDirectory}" 
>> includeantruntime="false" />
>>
>>
>>
>>run
>>
>>
>>
>>
> MG>looks similar to maven-compiler-plugin with srcdir / destdir /classpath 
> attrs..a bit more intuitive than maven-compiler-plugin
> maven-compiler-plugin
> 
> 
>  default-compile
>  
>   
>"${java9.sourceDirectory}
>"${java9.build.outputDirectory}"
>${project.build.outputDirectory}
>   


Part of that, I suspect, is ant’s use of attributes, which Maven generally 
shuns. If the Maven pom were recast to use attributes, and to infer groups, it 
could look something like:







but that wasn’t the direction the designers took.

> 
> MG>
> 
> 
> If you are actively working on adding MR capabilities to the compiler plugin, 
> is there something I can do to help?
> 
> MG>initial evaluation would include what are advantages/disadvantages of MR

To a large extent, it is necessitated by the more rapid JDK changes which 
commenced with Jigsaw’s introduction in Java 9. Until then, while APIs were 
deprecated, they didn’t tend to go away a lot, and developers got used to using 
both deprecated APIs and internal ones. With Jigsaw, the JDK team started not 
only hiding the internal APIs, but also speeding up the pace of removal of 
features. 

I’ve given an example at http://www.russgold.net/sw/2018/03/ch-ch-ch-changes/ 
<http://www.russgold.net/sw/2018/03/ch-ch-ch-changes/>

The basic problem is that some code that works in, say, Java 8, is no longer 
supported in Java 11, and the replacement isn’t available until Java 9. That 
means that you often cannot write one implementation that works for all JDK 
versions that mean to support. Nor can you use a conditional in your code, 
since the alternative implementations don’t even necessarily compile in the 
same JDK (the replacement feature just mentioned doesn’t compile in Java 8, and 
if you compile it for release 9, you cannot run it with Java 8. That means that 
you have to use some tricky reflection - or MR Jars.

I don’t know how common they will be. I maintainer nearly two dozen modules 
across several projects, and only two of them have needed this so far. It will 
really depend on how many more APIs get removed.

A related use case, of course, is that sometimes there are serious advantages 
in performance or resilience in using newer APIs, and MR Jars allow you to do 
that without dropping support for older JDK versions. 

The main disadvantage, then, has been tool support. Maven doesn’t support them 
natively (nor does Gradle, and I cannot even imagine a clean way to add it 
there). Neither do any of the IDEs, which are almost certainly waiting on build 
tools to take the lead in defining the code layout. The workarounds have 
generally been partial solutions, counting on Maven to add support, but it has 
been painful to use them. That’s why I created this approach, which is mostly 
only painful when it comes to updating the parent POM.

I should also note a disappointment with the JDK. Java 9 has a -release switch, 
which is intended to replace -source and -target, but it doesn’t quite match 
its intended use. If you run with -release 1.8, for example, you cannot compile 
against the Unsafe class, which is my approach needs to use toolchains. I 
expect that not everyone will have to do that, but it is a clear pain point for 
projects like Mockito, ByteBuddy, SimpleStub, and a number of others, which 
have been designed to do tricky code generation or field access.



> 
>> On Apr 12, 2018, at 10:44 AM, Martin Gainty <mgai...@hotmail.com> wrote:
>> 
>> MG>one-off request with ant only approach to compiling MR jars
>> 
>> 
>> From: Russell Gold <russell.g...@oracle.com <mailto:russell.g...@oracle.com>>
>> Sent: Thursday, April 12, 2018 7:00 AM
>> To: Robert Scholte
>> Cc: Maven Users List
>> Subject: Re: Building and unit-testing MR Jars, easily
>> 
>> 
>> 
>>> On Apr 11, 2018, at 12:36 PM, Robert S

Re: Building and unit-testing MR Jars, easily

2018-04-12 Thread Russell Gold
On Apr 12, 2018, at 10:44 AM, Martin Gainty <mgai...@hotmail.com> wrote:

> MG>With regards to "Use of the ant-plugin to compile the JDK 9 code"
> MG>do you have a build.xml target we can use to backport features and 
> functions of this target into maven-compiler-plugin
> MG>possible trigger could be maven-compiler-plugin configuration of
> MG>1.9 and/or
> MG>1.9



I’m afraid I don’t understand what you are asking. That solution 
<http://in.relation.to/2017/02/13/building-multi-release-jars-with-maven/> 
doesn’t use a build.xml. It uses the ant-plugin in its pom.xml:

> 
> org.apache.maven.plugins
> maven-antrun-plugin
> 
> 
> compile-java9
> compile
> 
> 
> 
>  destdir="${java9.build.outputDirectory}"
> classpath="${project.build.outputDirectory}" 
> includeantruntime="false" />
> 
> 
> 
> run
> 
> 
> 
> 

which doesn’t do anything that is missing from the compiler plugin. It was 
actually my realization that I could do the exact thing with a separate 
execution that led me to the approach I have described.

If you are actively working on adding MR capabilities to the compiler plugin, 
is there something I can do to help?

> On Apr 12, 2018, at 10:44 AM, Martin Gainty <mgai...@hotmail.com> wrote:
> 
> MG>one-off request with ant only approach to compiling MR jars
> 
> 
> From: Russell Gold <russell.g...@oracle.com <mailto:russell.g...@oracle.com>>
> Sent: Thursday, April 12, 2018 7:00 AM
> To: Robert Scholte
> Cc: Maven Users List
> Subject: Re: Building and unit-testing MR Jars, easily
> 
> 
> 
>> On Apr 11, 2018, at 12:36 PM, Robert Scholte <rfscho...@apache.org> wrote:
>> 
>> On Wed, 11 Apr 2018 14:25:37 +0200, Russell Gold <russell.g...@oracle.com> 
>> wrote:
>> 
>>> Hi Robert,
>>> 
>>> I used properties because I need to trigger multiple profiles, depending on 
>>> whether we’re building the MR jar, and what JDK versions will be needed - 
>>> and I can use them to turn profiles off, which I could not do by simply 
>>> turning on a profile, as far as I know.
>> 
>> Yes, you can turn off profiles by prefixing it with !,e.g. -P!someprofile
> 
> That’s good to know. In this case, there are two profiles which are mutually 
> exclusive. he multi-jar profile is activated when building an MR jar, and the 
> test-toolchains-bypass profiles is run when NOT building an MR jar. I can do 
> that with a single property. Is there a way to do that with a single -P 
> switch?
>> 
>>> 
>>> I didn’t consider test jars, and am not familiar with how they are used. 
>>> Can you tell me more about them?
>> 
>> https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html
> How to create a jar containing test classes - Apache 
> Maven<https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html
>  
> <https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html>>
> maven.apache.org <http://maven.apache.org/>
> When you want to create a jar containing test-classes, you would probably 
> want to reuse those classes. There are two ways to solve this: Create an 
> attached jar with the test-classes from the current project and loose its 
> transitive test-scoped dependencies. Create a separate project with the test 
> ...
> 
> 
> 
>> The issue was exposed with 
>> https://issues.apache.org/jira/browse/MCOMPILER-308 
>> <https://issues.apache.org/jira/browse/MCOMPILER-308> 
>> <https://issues.apache.org/jira/browse/MCOMPILER-308 
>> <https://issues.apache.org/jira/browse/MCOMPILER-308>>
> 
> That should be easy to fix. I just need to limit the configuration to the jar 
> goal.
> 
>> 
>>> 
>>> At present, the parent POM supports only up to JDK11, and doesn’t handle 
>>> well cases where the main jar would be, say, JDK11. To some extent I see 
>>> this as a stop gap. It is not clear to me if a better approach would start 
>>> with an extension, or if there is any real long-term alternative to putting 
>>> the changes into the compiler, surefire, and jar plugins.
>>> 
>>> Unit testing is the default behavior

Re: Building and unit-testing MR Jars, easily

2018-04-12 Thread Russell Gold


> On Apr 11, 2018, at 12:36 PM, Robert Scholte <rfscho...@apache.org> wrote:
> 
> On Wed, 11 Apr 2018 14:25:37 +0200, Russell Gold <russell.g...@oracle.com> 
> wrote:
> 
>> Hi Robert,
>> 
>> I used properties because I need to trigger multiple profiles, depending on 
>> whether we’re building the MR jar, and what JDK versions will be needed - 
>> and I can use them to turn profiles off, which I could not do by simply 
>> turning on a profile, as far as I know.
> 
> Yes, you can turn off profiles by prefixing it with !,e.g. -P!someprofile

That’s good to know. In this case, there are two profiles which are mutually 
exclusive. he multi-jar profile is activated when building an MR jar, and the 
test-toolchains-bypass profiles is run when NOT building an MR jar. I can do 
that with a single property. Is there a way to do that with a single -P switch?
> 
>> 
>> I didn’t consider test jars, and am not familiar with how they are used. Can 
>> you tell me more about them?
> 
> https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html
> The issue was exposed with 
> https://issues.apache.org/jira/browse/MCOMPILER-308 
> <https://issues.apache.org/jira/browse/MCOMPILER-308>

That should be easy to fix. I just need to limit the configuration to the jar 
goal.

> 
>> 
>> At present, the parent POM supports only up to JDK11, and doesn’t handle 
>> well cases where the main jar would be, say, JDK11. To some extent I see 
>> this as a stop gap. It is not clear to me if a better approach would start 
>> with an extension, or if there is any real long-term alternative to putting 
>> the changes into the compiler, surefire, and jar plugins.
>> 
>> Unit testing is the default behavior. Toolchains are used to compile each 
>> version of the code with the correct compiler (since the source/target and 
>> release flags don’t quite duplicate doing so), and then surefire runs the 
>> tests with the jdk used to run Maven itself. Clearly, the documentation is 
>> lacking. But yes, you do need to run the build multiple times, since the 
>> code actually run can vary. If you are using Travis CI, that means that you 
>> need to configure the toolchains explicitly. I have not yet figured out how 
>> to do this with both oracle and open jdk options, since the toolchains seem 
>> to require you to make that choice in the pom, not just the JDK.
> 
> Not sure if I understand. But you can add as much entries to both  
> in the toolchain.xml and inside the  element of the 
> maven-toolchains-plugin configuration. Only version has a special meaning.
> e.g. you can add oracle or openjdk to the 
> toolchain.xml and the plugin configuration. By adding it to the plugin you 
> say that at least version+vendor must be specified in the toolchain.xml with 
> matching values. The  might have more elements, but these are 
> ignored.

Thank you. There are some things I will experiment with, to see if I can handle 
more cases.

BTW, I have posted a list of the other MR solutions that I know of at 
http://www.russgold.net/sw/2018/03/looking-for-mr-good-jar/ 
<http://www.russgold.net/sw/2018/03/looking-for-mr-good-jar/>, along with my 
comments. As far as I know, mine is the only one that allows unit testing of 
the code for each JDK version.

> 
> thanks,
> Robert
> 
>> 
>> Thanks,
>> Russ
>> 
>>> On Apr 4, 2018, at 3:11 PM, Robert Scholte <rfscho...@apache.org> wrote:
>>> 
>>> Hi Russell, interesting approach.
>>> 
>>> The difference between library developers and application developers 
>>> becomes more and more clear and this concept might be useful for library 
>>> builders.
>>> We should probably have a separate page for all the available solutions and 
>>> menion the pro's and cons.
>>> 
>>> Just a few remarks: why are you using property enabled profiles instead of 
>>> -Pmulti-release?
>>> Be aware that you can also create test-jars, which should NOT have the 
>>> multi-release flag set in the MANIFEST.
>>> 
>>> It will mean that you should provide a new version every every half year, 
>>> unless you already add all those versions right now ;)
>>> 
>>> What I'm missing is a clear explanation how unit testing works. IIUC you 
>>> build the whole project with a specific JDK version and that's how the 
>>> matching unittests are executed. So you should run the build X times, once 
>>> for every multirelease version.
>>> 
>>> thanks,
>>> Robert
>>> 
>>> 
>>> On Tue, 03 Apr 2018 21:42:39 +0200, Rus

Re: Building and unit-testing MR Jars, easily

2018-04-11 Thread Russell Gold
Hi Robert,

I used properties because I need to trigger multiple profiles, depending on 
whether we’re building the MR jar, and what JDK versions will be needed - and I 
can use them to turn profiles off, which I could not do by simply turning on a 
profile, as far as I know.

I didn’t consider test jars, and am not familiar with how they are used. Can 
you tell me more about them?

At present, the parent POM supports only up to JDK11, and doesn’t handle well 
cases where the main jar would be, say, JDK11. To some extent I see this as a 
stop gap. It is not clear to me if a better approach would start with an 
extension, or if there is any real long-term alternative to putting the changes 
into the compiler, surefire, and jar plugins.

Unit testing is the default behavior. Toolchains are used to compile each 
version of the code with the correct compiler (since the source/target and 
release flags don’t quite duplicate doing so), and then surefire runs the tests 
with the jdk used to run Maven itself. Clearly, the documentation is lacking. 
But yes, you do need to run the build multiple times, since the code actually 
run can vary. If you are using Travis CI, that means that you need to configure 
the toolchains explicitly. I have not yet figured out how to do this with both 
oracle and open jdk options, since the toolchains seem to require you to make 
that choice in the pom, not just the JDK.

Thanks,
Russ

> On Apr 4, 2018, at 3:11 PM, Robert Scholte <rfscho...@apache.org> wrote:
> 
> Hi Russell, interesting approach.
> 
> The difference between library developers and application developers becomes 
> more and more clear and this concept might be useful for library builders.
> We should probably have a separate page for all the available solutions and 
> menion the pro's and cons.
> 
> Just a few remarks: why are you using property enabled profiles instead of 
> -Pmulti-release?
> Be aware that you can also create test-jars, which should NOT have the 
> multi-release flag set in the MANIFEST.
> 
> It will mean that you should provide a new version every every half year, 
> unless you already add all those versions right now ;)
> 
> What I'm missing is a clear explanation how unit testing works. IIUC you 
> build the whole project with a specific JDK version and that's how the 
> matching unittests are executed. So you should run the build X times, once 
> for every multirelease version.
> 
> thanks,
> Robert
> 
> 
> On Tue, 03 Apr 2018 21:42:39 +0200, Russell Gold <russell.g...@oracle.com> 
> wrote:
> 
>> I have just developed a new and easier way for building MR Jars 
>> <https://github.com/meterware/multirelease-parent>, while waiting for the 
>> capability to be built into Maven.
>> 
>> This approach is not only simple to set up (just use the designated parent 
>> POM, if you can), it lets you unit test for any supported JDK. For example:
>> 
>> jdk7 && mvn -Dmulti_release clean test
>> jdk10 && mvn -Dmulti_release clean test
>> 
>> where jdk7 and jdk10 set the appropriate versions for maven to use. Either 
>> will run against the appropriate additional code.
>> 
>> To build an MR JAR you set a property on the command line
>> 
>> mvn -Dmulti_release clean install
>> 
>> which happens automatically when doing a release.
>> 
>> I have also explained how it works at Easier Than It Looks 
>> <http://www.russgold.net/sw/2018/04/easier-than-it-looks/>
>> 


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



Building and unit-testing MR Jars, easily

2018-04-03 Thread Russell Gold
I have just developed a new and easier way for building MR Jars 
, while waiting for the 
capability to be built into Maven. 

This approach is not only simple to set up (just use the designated parent POM, 
if you can), it lets you unit test for any supported JDK. For example:

jdk7 && mvn -Dmulti_release clean test
jdk10 && mvn -Dmulti_release clean test

where jdk7 and jdk10 set the appropriate versions for maven to use. Either will 
run against the appropriate additional code.

To build an MR JAR you set a property on the command line

mvn -Dmulti_release clean install

which happens automatically when doing a release.

I have also explained how it works at Easier Than It Looks 





Re: Unexpected copying / recompiling

2018-03-05 Thread Russell Gold
Sorry, I was unclear.

I am still getting two resource files copied from src/main/resource to 
target/classes, even though they haven’t changed. If I run with -X it tells me 
that each of the files in question “ has a filtered oil extension.”

Thanks,
Russ

> On Mar 5, 2018, at 2:11 PM, Robert Scholte <rfscho...@apache.org> wrote:
> 
> Normally if at least one source is newer to its matching class, it triggers 
> the compiler.
> I don't understand what's so special with package-info files.
> The docs[1] aren't really clear about it, but I can imagine it would be nice 
> if it could be fixed in the maven-compiler-plugin.
> 
> There are 2 patches, both look invalid to me.
> The ignore-package-info.patch doesn't seem right, if those files change they 
> should be recompiled.
> The only-recompile-changed.patch seems incorrect. If you are outside of an 
> IDE and change any method signature, all code needs to be recompiled; classes 
> using calling the old signature should cause a compilation error.
> 
> thanks,
> Robert
> 
> [1] 
> https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__GUID-277D77C7-0F96-40A6-8411-A264B6F28A46
> 
> On Mon, 05 Mar 2018 19:29:11 +0100, Russell Gold <russell.g...@oracle.com> 
> wrote:
> 
>> Thanks,
>> 
>> That does indeed prevent the recompilation.
>> 
>> What do I need to do to prevent the superfluous recopying?
>> 
>> Thanks,
>> Russ
>> 
>>> On Mar 5, 2018, at 12:41 PM, Robert Scholte <rfscho...@apache.org> wrote:
>>> 
>>> You're probably hit by MCOMPILER-205[1]
>>> 
>>> tl;rd; it is the package-info.java that's causing issues. Try adding 
>>> -Xpkginfo:always
>>> 
>>> thanks,
>>> Robert
>>> 
>>> 
>>> [1] https://issues.apache.org/jira/browse/MCOMPILER-205
>>> 
>>> On Mon, 05 Mar 2018 17:03:29 +0100, Russell Gold <russell.g...@oracle.com> 
>>> wrote:
>>> 
>>>> In the project at https://github.com/oracle/weblogic-kubernetes-operator, 
>>>> repeated runs of ‘mvn compile’ insist on copying the resources and 
>>>> recompiling all of the source, every time. How do I fix that?
>>>> 
>>>> Thanks,
>>>> Russ
>>>> -
>>>> 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
> 


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



Re: Unexpected copying / recompiling

2018-03-05 Thread Russell Gold
Thanks,

That does indeed prevent the recompilation. 

What do I need to do to prevent the superfluous recopying?

Thanks,
Russ

> On Mar 5, 2018, at 12:41 PM, Robert Scholte <rfscho...@apache.org> wrote:
> 
> You're probably hit by MCOMPILER-205[1]
> 
> tl;rd; it is the package-info.java that's causing issues. Try adding 
> -Xpkginfo:always
> 
> thanks,
> Robert
> 
> 
> [1] https://issues.apache.org/jira/browse/MCOMPILER-205
> 
> On Mon, 05 Mar 2018 17:03:29 +0100, Russell Gold <russell.g...@oracle.com> 
> wrote:
> 
>> In the project at https://github.com/oracle/weblogic-kubernetes-operator, 
>> repeated runs of ‘mvn compile’ insist on copying the resources and 
>> recompiling all of the source, every time. How do I fix that?
>> 
>> Thanks,
>> Russ
>> -
>> 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



Unexpected copying / recompiling

2018-03-05 Thread Russell Gold
In the project at https://github.com/oracle/weblogic-kubernetes-operator, 
repeated runs of ‘mvn compile’ insist on copying the resources and recompiling 
all of the source, every time. How do I fix that?

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



Re: Problems Using ANTLR4 (Packaged Classes Not Found in Generated Code)

2017-10-29 Thread Russell Gold
Interesting. I see:

> Durendal:antlr4-mvn russgold$ mvn clean compile
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] 
> 
> [INFO] Building antlr4-mvn 1.0-SNAPSHOT
> [INFO] 
> 
> [INFO] 
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ antlr4-mvn ---
> [INFO] Deleting /Users/russgold/projects/exercises/antlr4-mvn/target
> [INFO] 
> [INFO] --- antlr4-maven-plugin:4.7:antlr4 (antlr) @ antlr4-mvn ---
> [INFO] ANTLR 4: Processing source directory 
> /Users/russgold/projects/exercises/antlr4-mvn/src/main/antlr4
> [INFO] Processing grammar: Grammar.g4
> [INFO] 
> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
> antlr4-mvn ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory 
> /Users/russgold/projects/exercises/antlr4-mvn/src/main/resources
> [INFO] 
> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ antlr4-mvn 
> ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 5 source files to 
> /Users/russgold/projects/exercises/antlr4-mvn/target/classes
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> [INFO] 
> 
> [INFO] Total time: 1.496 s
> [INFO] Finished at: 2017-10-29T19:27:15-04:00
> [INFO] Final Memory: 22M/378M
> [INFO] 
> 


What version of maven are you using? What JDK?

> Durendal:antlr4-mvn russgold$ mvn -version
> Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 
> 2017-04-03T15:39:06-04:00)
> Maven home: /opt/local/share/java/maven3
> Java version: 1.8.0_60, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"


- Russ


> On Oct 29, 2017, at 7:07 PM, R0b0t1  wrote:
> 
> Hello friends,
> 
> On Sun, Oct 29, 2017 at 2:43 AM, Karl Heinz Marbaise  
> wrote:
>> Hi,
>> 
>> can make a test project on Github/gitlab etc.
>> 
>> Kind regards
>> Karl Heinz Marbaise
>> 
> 
> Here is a repository: https://github.com/R030t1/antlr4-mvn. You should
> be able to run `mvn compile` to receive the errors I am receiving.
> 
> 
> On Sun, Oct 29, 2017 at 8:10 AM, Robert Patrick
>  wrote:
>> Most likely, you need to add a compile-time dependency on the antlr runtime 
>> library, where the missing class is located.
>> 
>> 
>>org.antlr
>>antlr4-runtime
>>4.7
>> 
>> 
> 
> It seems this was it, thank you. I am not sure why this is not
> mentioned anywhere.
> 
> Cheers,
> R0b0t1
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 



Re: Overriding the site plugin

2017-10-15 Thread Russell Gold
Have you tried adding the desired maven-site-plugin (with version) as a project 
dependency?

> On Oct 15, 2017, at 12:54 PM, Mark Raynsford  
> wrote:
> 
> Hello.
> 
> When one types "mvn site", it seems that the site plugin that's included
> with the local Maven install is executed (which then runs all of the
> reports and so on).
> 
> Is it possible to override this plugin (in other words, replace it with
> something else) on a per-project basis?
> 
> Basically, I'd like to type "mvn site" and get my own plugin instead of
> the existing maven-site-plugin.
> 
> -- 
> Mark Raynsford | http://www.io7m.com
> 


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



Re: Need to pass properties to the dependency POM file

2017-10-10 Thread Russell Gold
Sounds as though you may want to use “import” scope 
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

> On Oct 10, 2017, at 7:26 AM, Bikash Chandra Barad 
>  wrote:
> 
> Hi,
> 
>  I am trying to grouping the dependencies into a pom(pom-deps.pom)file and 
> adding that pom file as a dependency in my project.
>  I need to substitute the properties of the dependency pom file(pom-deps.pom) 
> to get the latest version dependencies, like parent POM,  from the dependency 
> POM, in my project.
>  Is it possible to do so?
> 
> 
> Regards,
> Bikash Chandra
> 


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



Re: Maven Extension Idea: iJar support

2017-10-04 Thread Russell Gold
Does this iJar have more information than a regular JAR? If not, what is the 
benefit? If so, where is this information coming from?

The closest thing I can think of is the new Java 9 module system, which defines 
what is visible; presumably, that information would be useful in such a 
determination.

> On Oct 4, 2017, at 12:38 AM, Farid Zakaria  wrote:
> 
> I was combing through Bazel  (google's build tool) and
> found a concept called iJar
> 
> iJar is basically a stripped out version of the Jar removing everything but
> the public method signatures (very stripped out byte code jar).
> 
> Their build tool uses iJars in determining if upstream dependencies can be
> skipped to be rebuilt. The idea being: if the interface (iJar) of the
> current project hasn't changed (SHA), there's no need to rebuild upstream
> dependencies since any possible method they'd have used did not change.
> 
> My guess is this would be a good way to speed up "-amd"
> (also-make-dependents) by quickly stopping the build based on the iJar.
> 
> Could this be done as a maven extension?
> 
> Farid Zakaria


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



Re: Activating a profile if an executable exists on the path?

2017-10-01 Thread Russell Gold
If you know where the file should be, certainly:

   
  
   
 path-to-dot-file
  
 
 ...
   

You can specify either  or  depending on what you want the 
profile to do


> On Oct 1, 2017, at 8:25 PM, Alex O'Ree  wrote:
> 
> I've been using the umlgraph/graphviz/dot as a javadoc extension for a
> while now and i was wondering how i could support builds on machines
> whereby graphviz is not installed. I was thinking a profile with some
> activate rules would do it that would override the javadoc settings.
> Looking at the docs, it doesn't seem like this is possible. Anyhow, is
> this possible?
> 
> -
> 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: unable to generate site with module-info defined

2017-10-01 Thread Russell Gold
Thanks; I have filed https://issues.apache.org/jira/browse/MJAVADOC-498

> On Oct 1, 2017, at 4:05 AM, Hervé BOUTEMY <herve.bout...@free.fr> wrote:
> 
> ok
> 
> with 3.4, you can see "Error generating maven-javadoc-plugin:3.0.0-M1:javadoc"
> you're issue is only indirectly with maven-site-plugin, but more directly 
> with 
> maven-javadoc-plugin
> 
> reproducing this issue is then best done with "mvn javadoc:javadoc", to 
> directly use the offending plugin (instead of trying to aggregate every 
> report)
> 
> 
> then with 3.5.1: if you look at the end of the stacktrace:
>> Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 
> 1
>> at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3116)
>> at java.base/java.lang.String.substring(String.java:1885)
>> at 
> org.apache.commons.lang.SystemUtils.getJavaVersionAsFloat(SystemUtils.java:
> 1133)
> you'll find a typical issue with Java 9 when some lib expects java version to 
> be 1.x and finds 9.x in Java 9
> This time, the issue is maven-site-plugin, it was discusse on users@maven.a.o 
> just one week ago, and Robert Scholte is currently releasing the fix in Doxia 
> Sitetools 1.7.5
> The issue is tracked with:
> - https://issues.apache.org/jira/browse/MSITE-796 at maven-site-plugin level,
> - and https://issues.apache.org/jira/browse/DOXIASITETOOLS-177 at Doxia 
> Sitetools level
> 
> And, as any Java 9 compatibility issue, it should be tracked on our Java 9 
> Wiki page: https://cwiki.apache.org/confluence/display/MAVEN/Java+9+-+Jigsaw
> 
> I see that we forgot to trace MSITE-796: I'll add it soon.
> 
> 
> Pfeewww, to summarize, you're mixing 2 independant issues:
> - javadoc:javadoc issue, not yet precisely understood, but which is the 
> initial issue
> - known site plugin issue with Java 9, fixed in latest snapshots but not yet 
> in 
> any release
> 
> to continue our investigations, please stay with maven-site-plugin 3.4, and 
> run "mvn javadoc:javadoc": perhaps you found a new issue with this plugin 
> regarding Java 9 modules
> 
> Regards,
> 
> Hervé
> 
> Le samedi 30 septembre 2017, 21:57:00 CEST Russell Gold a écrit :
>> And here is the stack trace with 3.5.1:
>>> at
>>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBui
>>> ldPluginManager.java:183) at
>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.ja
>>> va:208) ... 20 more
>>> 
>>> Caused by: org.apache.maven.plugin.PluginContainerException: An API
>>> incompatibility was encountered while executing
>>> org.apache.maven.plugins:maven-site-plugin:3.5.1:site:
>>> java.lang.ExceptionInInitializerError: null
>>> -
>>> realm =plugin>org.apache.maven.plugins:maven-site-plugin:3.5.1
>>> strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
>>> urls[0] =
>>> file:/Users/rgold/.m2/repository/org/apache/maven/plugins/maven-site-plug
>>> in/3.5.1/maven-site-plugin-3.5.1.jar urls[1] =
>>> file:/Users/rgold/.m2/repository/org/apache/maven/reporting/maven-reporti
>>> ng-exec/1.2/maven-reporting-exec-1.2.jar urls[2] =
>>> file:/Users/rgold/.m2/repository/org/apache/maven/reporting/maven-reporti
>>> ng-api/3.0/maven-reporting-api-3.0.jar urls[3] =
>>> file:/Users/rgold/.m2/repository/org/apache/maven/shared/maven-shared-uti
>>> ls/0.3/maven-shared-utils-0.3.jar urls[4] =
>>> file:/Users/rgold/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/js
>>> r305-2.0.1.jar urls[5] =
>>> file:/Users/rgold/.m2/repository/org/sonatype/aether/aether-util/1.7/aeth
>>> er-util-1.7.jar urls[6] =
>>> file:/Users/rgold/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/
>>> aether-util-0.9.0.M2.jar urls[7] =
>>> file:/Users/rgold/.m2/repository/org/apache/maven/maven-aether-provider/3
>>> .0/maven-aether-provider-3.0.jar urls[8] =
>>> file:/Users/rgold/.m2/repository/org/codehaus/plexus/plexus-interpolation
>>> /1.14/plexus-interpolation-1.14.jar urls[9] =
>>> file:/Users/rgold/.m2/repository/org/codehaus/plexus/plexus-component-ann
>>> otations/1.5.5/plexus-component-annotations-1.5.5.jar urls[10] =
>>> file:/Users/rgold/.m2/repository/org/sonatype/plexus/plexus-sec-dispatche
>>> r/1.3/plexus-sec-dispatcher-1.3.jar urls[11] =
>>> file:/Users/rgold/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/pl
>>> exus-cipher-1.4.jar urls[12] =
>>> file:/Users/rgold/.m2/repository/org/apache

Re: unable to generate site with module-info defined

2017-09-30 Thread Russell Gold
at 
> org.apache.commons.lang.SystemUtils.getJavaVersionAsFloat(SystemUtils.java:1133)
>   at org.apache.commons.lang.SystemUtils.(SystemUtils.java:818)
>   ... 29 more


It looks as though DefaultBuildPluginManager doesn’t know about the change in 
java version formats. I am running:

> /Users/rgold/projects/meterware/simplestub> mvn -version
> Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 
> 2017-04-03T15:39:06-04:00)
> Maven home: /opt/local/share/java/maven3
> Java version: 9, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"


- Russ

> On Sep 30, 2017, at 9:41 PM, Russell Gold <russell.g...@oracle.com> wrote:
> 
> I tried 3.5.1 but got “An API incompatibility was encountered,” so here is 
> the result from 3.4:
> 
>> [ERROR] Failed to execute goal 
>> org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on 
>> project simplestub: Error generating maven-javadoc-plugin:3.0.0-M1:javadoc: 
>> [ERROR] Exit code: 1 - 
>> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:3: 
>> error: module not found: org.objectweb.asm.commons
>> [ERROR] requires org.objectweb.asm.commons;
>> [ERROR]   ^
>> [ERROR] 
>> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:4: 
>> error: module not found: javassist
>> [ERROR] requires javassist;
>> [ERROR]  ^
>> [ERROR] 
>> [ERROR] Command line was: 
>> /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/javadoc 
>> @options @packages @argfile
>> [ERROR] 
>> [ERROR] Refer to the generated Javadoc files in 
>> '/Users/rgold/projects/meterware/simplestub/target/site/apidocs' dir.
>> [ERROR] 
>> [ERROR] -> [Help 1]
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
>> goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on 
>> project simplestub: Error generating maven-javadoc-plugin:3.0.0-M1:javadoc: 
>> Exit code: 1 - 
>> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:3: 
>> error: module not found: org.objectweb.asm.commons
>>requires org.objectweb.asm.commons;
>>  ^
>> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:4: 
>> error: module not found: javassist
>>requires javassist;
>> ^
>> 
>> Command line was: 
>> /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/javadoc 
>> @options @packages @argfile
>> 
>> Refer to the generated Javadoc files in 
>> '/Users/rgold/projects/meterware/simplestub/target/site/apidocs' dir.
>> 
>>  at 
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
>>  at 
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
>>  at 
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
>>  at 
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
>>  at 
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
>>  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:309)
>>  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
>>  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
>>  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
>>  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
>>  at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
>>  at 
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
>> Method)
>>  at 
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>  at 
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>  at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>>  at 
>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289

Re: unable to generate site with module-info defined

2017-09-30 Thread Russell Gold
t;   at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>   ... 20 more
> Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error 
> generating maven-javadoc-plugin:3.0.0-M1:javadoc: 
> Exit code: 1 - 
> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:3: 
> error: module not found: org.objectweb.asm.commons
> requires org.objectweb.asm.commons;
>   ^
> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:4: 
> error: module not found: javassist
> requires javassist;
>  ^
> 
> Command line was: 
> /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/javadoc 
> @options @packages @argfile
> 
> Refer to the generated Javadoc files in 
> '/Users/rgold/projects/meterware/simplestub/target/site/apidocs' dir.
> 
>   at 
> org.apache.maven.plugins.site.render.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:239)
>   at 
> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:311)
>   at 
> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:129)
>   at 
> org.apache.maven.plugins.site.render.SiteMojo.renderLocale(SiteMojo.java:182)
>   at 
> org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:141)
>   ... 22 more
> Caused by: org.apache.maven.reporting.MavenReportException: 
> Exit code: 1 - 
> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:3: 
> error: module not found: org.objectweb.asm.commons
> requires org.objectweb.asm.commons;
>   ^
> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:4: 
> error: module not found: javassist
> requires javassist;
>  ^
> 
> Command line was: 
> /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/javadoc 
> @options @packages @argfile
> 
> Refer to the generated Javadoc files in 
> '/Users/rgold/projects/meterware/simplestub/target/site/apidocs' dir.
> 
>   at 
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeJavadocCommandLine(AbstractJavadocMojo.java:5075)
>   at 
> org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:2093)
>   at 
> org.apache.maven.plugins.javadoc.JavadocReport.generate(JavadocReport.java:130)
>   at 
> org.apache.maven.plugins.site.render.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:233)
>   ... 26 more
> [ERROR] 
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


I

> On Sep 30, 2017, at 6:29 PM, Hervé BOUTEMY <herve.bout...@free.fr> wrote:
> 
> I just improved output in MSITE-797 for future maven-site-plugin 3.7 (not yet 
> released)
> 
> But please upgrade to 3.4 minimum as the error message will give you much 
> better insight on the cause of the failure: see https://issues.apache.org/
> jira/browse/MSITE-713
> 
> Regards,
> 
> Hervé
> 
> Le samedi 30 septembre 2017, 13:15:36 CEST Hervé BOUTEMY a écrit :
>> Hi Russel,
>> 
>> Can you give more stacktrace lines, please, since I suppose it is a
>> reporting plugin issue, but I cannot figure out *which* report plugin
>> 
>> (and I'll have to find a way to have more tiny stacktraces when there is an
>> issue with a report plugin that is launched by maven-site-plugin, since
>> everybody points finger at maven-site-plugin instead of the reporting plugin
>> that failed... I know that currently, from a user perspective, that is the
>> natural perception: I need to find a trick to change this, I don't know how
>> yet)
>> 
>> Regards,
>> 
>> Hervé
>> 
>> Le vendredi 29 septembre 2017, 12:25:02 CEST Russell Gold a écrit :
>>> I have added a module-info to my project, and now when I run mvn site, it
>>> is
>> failing:
>>>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>>>> execute
>>>> goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site)
>>>> on project simplestub: Error during page generation>
>>>> 
>>>>at
>>>>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.j
>>>>a
>>>>va:213) at
>>>>
>

unable to generate site with module-info defined

2017-09-29 Thread Russell Gold
I have added a module-info to my project, and now when I run mvn site, it is 
failing:

> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on 
> project simplestub: Error during page generation
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
>   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:309)
>   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
>   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
>   at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
>   at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
>   at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>   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)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error during page 
> generation
>   at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:143)
>   at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>   ... 20 more
> Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error 
> rendering Maven report: 
> Exit code: 1 - 
> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:3: 
> error: module not found: org.objectweb.asm.commons
> requires org.objectweb.asm.commons;
>   ^
> /Users/rgold/projects/meterware/simplestub/src/main/java/module-info.java:4: 
> error: module not found: javassist
> requires javassist;
>  ^


Note that this code compiles and runs just find with the module-info; it just 
doesn’t generate a site. 

Re: How to exclude artifacts inherited from a parent POM?

2017-09-28 Thread Russell Gold
What problem is caused by the superfluous dependencies?

> On Sep 27, 2017, at 9:14 PM, mingleizhang  wrote:
> 
> The actual thing is I can not modify the pom in parent. That is my issue.
> 
> 
> 
> 
> 
> 
> 
> 
> At 2017-09-28 09:03:38, "Guang Chao"  wrote:
>> On Mon, Sep 25, 2017 at 2:38 AM, Anders Hammar  wrote:
>> 
>>> The solution to this is to NOT have dependencies declared in a parent pom.
>>> I know some want to do that to simplify in the projects inheriting, but
>>> this is the downside of doing that. There is no way to fix this but to fix
>>> the parent pom.
>>> 
>>> 
>> Maybe just put the version in the parent POM as property, then declare the
>> dependency on the child POM.  That way, the consistency is preserved which
>> is same version for all POM.
>> 
>> 
>>> /Anders
>>> 
>>> On Sun, Sep 24, 2017 at 1:18 PM, mingleizhang 
>>> wrote:
>>> 
 Hello, Maven Experts here.
 
 
 As the subject said, how to exclude artifacts inherited from a
 parent POM ?  Why did I ask this question as I used mvn
>>> dependency:analyze
 to find which dependency is unnecessary. And I found the following. All
>>> of
 them from the parent pom. And I can not exclude them like a normal way.
 Does anyone improve my mind here ? Thanks in advance.
 
 
 Unused declared dependencies found:
 [WARNING]org.apache.flink:force-shading:jar:1.4-SNAPSHOT:compile
 [WARNING]org.powermock:powermock-module-junit4:jar:1.6.5:test
 [WARNING]com.google.code.findbugs:jsr305:jar:1.3.9:compile
 [WARNING]log4j:log4j:jar:1.2.17:test
 [WARNING]org.powermock:powermock-api-mockito:jar:1.6.5:test
 [WARNING]org.slf4j:slf4j-log4j12:jar:1.7.7:test
 
 
 Cheers
 Rice
>>> 
>> 
>> 
>> 
>> -- 
>> Guang 


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



Re: how can I prevent maven-deploy-plugin:deploy-file from deploying main artifact?

2017-09-19 Thread Russell Gold
Ah, sorry, I misread what was going on. 

I looked at the docs for the deploy-file goal and found this:
> file <>:
> 
> File to be deployed.
> Type: java.io.File
> Required: Yes
> User Property: file
> files <>:
> 
> A comma separated list of files for each of the extra side artifacts to 
> deploy. If there is a mis-match in the number of entries in types or 
> classifiers, then an error will be raised.
> Type: java.lang.String
> Required: No
> User Property: files

I think this may be inconsistent, as the most common convention is that the 
plural attribute simply allows you to specify multiple values. So I am guessing 
that deploy-file is simply intended to deploy *additional* files, not 
replacement files.

Thus, since your project is a snapshot version, you are getting the snapshot 
version uploaded. What if you let the default goal happen, get rid of the 
second execution, and simply set the project version to what you are now 
calling flora-version? What happens then?

> On Sep 19, 2017, at 6:15 PM, James Klo <jim@sri.com> wrote:
> 
> Thanks for responding.
> 
> However, I’m not sure how that changes things.  The “deploy” goal is 
> currently not executing.
> 
> The problem seems to me that the “deploy-file” goal is deploying both the 
> file I want in addtion to the main artifact.  
> 
> Maybe this is a bug? Seems like it could be.
> 
> - JK
> 
> On 9/19/17, 3:09 PM, "Russell Gold" <russell.g...@oracle.com> wrote:
> 
>Instead of 
> 
>
>default-deploy
>none
>
>deploy
>
>
> 
>try
> 
>
>default-deploy
>none
>
> 
>> On Sep 19, 2017, at 5:57 PM, James Klo <jim@sri.com> wrote:
>> 
>> I’m using the io.fabric8:maven-docker-plugin to launch a container, run 
>> specialized build that generates some versioned files and then I want to 
>> take those files convert them into an artifact and upload them to our corp 
>> Artifactory.
>> 
>> I’ve got mostly the whole thing working except the last step, deploying to 
>> Artifactory.  Yes it deploys, but it deploys too many artifacts.
>> 
>> 
>>org.apache.maven.plugins
>>maven-deploy-plugin
>>2.8.2
>>
>>
>>default-deploy
>>none
>>
>>deploy
>>
>>
>>
>>deploy-artifact
>>deploy
>>
>>deploy-file
>>
>>
>>artifactory
>>https://artifactory.sri.com/artifactory/sunflower-local 
>> <https://artifactory.sri.com/artifactory/sunflower-local>
>>
>> ${project.build.directory}/${project.artifactId}-${docker_env.FLORA_VERSION}-pdf.tar.bz2
>>${project.groupId}
>>${project.artifactId}
>>${docker_env.FLORA_VERSION}
>>pdf
>>tar.bz2
>>false
>>
>>
>>
>> 
>> so I’ve disabled the default-deploy execution, and replacing it with my own 
>> deploy-artifact, which runs the deploy-file it deploys both the aux artifact 
>> and the main artifact:
>> 
>> [INFO] --- maven-deploy-plugin:2.8.2:deploy-file (deploy-artifact) @ 
>> flora2-docs ---
>> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, 
>> ConflictMarker.markTime=0, ConflictMarker.nodeCount=36, 
>> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, 
>> ConflictIdSorter.conflictIdCount=16, 
>> ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, 
>> ConflictResolver.conflictItemCount=36, 
>> DefaultDependencyCollector.collectTime=3, 
>> DefaultDependencyCollector.transformTime=1}
>> [DEBUG] org.apache.maven.plugins:maven-deploy-plugin:jar:2.8.2:
>> [DEBUG]org.apache.maven:maven-plugin-api:jar:2.2.1:compile
>> [DEBUG]org.apache.maven:maven-project:jar:2.2.1:compile
>> [DEBUG]   org.apache.maven:maven-settings:jar:2.2.1:compile
>> [DEBUG]   org.apache.maven:maven-profile:jar:2.2.1:compile
>> [DEBUG]   org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
>> [DEBUG]  org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
>> [DEBUG]  
>> backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
>> [DEBUG]   org.apache.maven:maven-plugin-regis

Re: how can I prevent maven-deploy-plugin:deploy-file from deploying main artifact?

2017-09-19 Thread Russell Gold
Instead of 


default-deploy
none

deploy



try


default-deploy
none


> On Sep 19, 2017, at 5:57 PM, James Klo  wrote:
> 
> I’m using the io.fabric8:maven-docker-plugin to launch a container, run 
> specialized build that generates some versioned files and then I want to take 
> those files convert them into an artifact and upload them to our corp 
> Artifactory.
> 
> I’ve got mostly the whole thing working except the last step, deploying to 
> Artifactory.  Yes it deploys, but it deploys too many artifacts.
> 
> 
> org.apache.maven.plugins
> maven-deploy-plugin
> 2.8.2
> 
> 
> default-deploy
> none
> 
> deploy
> 
> 
> 
> deploy-artifact
> deploy
> 
> deploy-file
> 
> 
> artifactory
> https://artifactory.sri.com/artifactory/sunflower-local 
> 
> 
> ${project.build.directory}/${project.artifactId}-${docker_env.FLORA_VERSION}-pdf.tar.bz2
> ${project.groupId}
> ${project.artifactId}
> ${docker_env.FLORA_VERSION}
> pdf
> tar.bz2
> false
> 
> 
> 
> 
> so I’ve disabled the default-deploy execution, and replacing it with my own 
> deploy-artifact, which runs the deploy-file it deploys both the aux artifact 
> and the main artifact:
> 
> [INFO] --- maven-deploy-plugin:2.8.2:deploy-file (deploy-artifact) @ 
> flora2-docs ---
> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, 
> ConflictMarker.markTime=0, ConflictMarker.nodeCount=36, 
> ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, 
> ConflictIdSorter.conflictIdCount=16, ConflictIdSorter.conflictIdCycleCount=0, 
> ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=36, 
> DefaultDependencyCollector.collectTime=3, 
> DefaultDependencyCollector.transformTime=1}
> [DEBUG] org.apache.maven.plugins:maven-deploy-plugin:jar:2.8.2:
> [DEBUG]org.apache.maven:maven-plugin-api:jar:2.2.1:compile
> [DEBUG]org.apache.maven:maven-project:jar:2.2.1:compile
> [DEBUG]   org.apache.maven:maven-settings:jar:2.2.1:compile
> [DEBUG]   org.apache.maven:maven-profile:jar:2.2.1:compile
> [DEBUG]   org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
> [DEBUG]  org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
> [DEBUG]  
> backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
> [DEBUG]   org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
> [DEBUG]   org.codehaus.plexus:plexus-interpolation:jar:1.11:compile
> [DEBUG]   
> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
> [DEBUG]  junit:junit:jar:3.8.1:compile
> [DEBUG]  classworlds:classworlds:jar:1.1-alpha-2:compile
> [DEBUG]org.apache.maven:maven-model:jar:2.2.1:compile
> [DEBUG]org.apache.maven:maven-artifact:jar:2.2.1:compile
> [DEBUG]org.codehaus.plexus:plexus-utils:jar:3.0.15:compile
> [DEBUG] Created new class realm 
> plugin>org.apache.maven.plugins:maven-deploy-plugin:2.8.2
> [DEBUG] Importing foreign packages into class realm 
> plugin>org.apache.maven.plugins:maven-deploy-plugin:2.8.2
> [DEBUG]   Imported:  < maven.api
> [DEBUG] Populating class realm 
> plugin>org.apache.maven.plugins:maven-deploy-plugin:2.8.2
> [DEBUG]   Included: org.apache.maven.plugins:maven-deploy-plugin:jar:2.8.2
> [DEBUG]   Included: backport-util-concurrent:backport-util-concurrent:jar:3.1
> [DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.11
> [DEBUG]   Included: junit:junit:jar:3.8.1
> [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0.15
> [DEBUG] Configuring mojo 
> org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file from plugin 
> realm ClassRealm[plugin>org.apache.maven.plugins:maven-deploy-plugin:2.8.2, 
> parent: sun.misc.Launcher$AppClassLoader@5c647e05]
> [DEBUG] Configuring mojo 
> 'org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file' with basic 
> configurator -->
> [DEBUG]   (f) artifactId = flora2-docs
> [DEBUG]   (f) classifier = pdf
> [DEBUG]   (f) file = 
> /Users/jklo/projects/RAVE/source/sunflower-docs/doc/flora2-docs/target/flora2-docs-1277-pdf.tar.bz2
> [DEBUG]   (f) generatePom = true
> [DEBUG]   (f) groupId = com.sri
> [DEBUG]   (s) localRepository =   id: local
>   url: file:///Users/jklo/.m2/repository/ 
> 
>layout: default
> snapshots: [enabled => true, update => always]
>  releases: [enabled => true, update => always]
> 
> [DEBUG]   (f) offline = false
> [DEBUG]   (f) packaging = tar.bz2
> [DEBUG]   (f) project = MavenProject: 

Re: Release plugin: why are my releases tagged as snapshots?

2017-09-10 Thread Russell Gold
I see that after you build the release version, you are then building the 
snapshot version. It is the latter that is being uploaded:

>
> Uploaded: 
> https://oss.sonatype.org/content/repositories/snapshots/io/github/pr0methean/betterrandom/BetterRandom/0.9.2.11-SNAPSHOT/BetterRandom-0.9.2.11-20170910.184022-3.jar
>  (74 KB at 140.7 KB/sec)
> Uploading: 
> https://oss.sonatype.org/content/repositories/snapshots/io/github/pr0methean/betterrandom/BetterRandom/0.9.2.11-SNAPSHOT/BetterRandom-0.9.2.11-20170910.184022-3.pom

I’m not sure you are even checking the right versions into Git. Why don’t you 
check your local repo as well as the one on GitHub and make sure that the tags 
match the versions you expect.

> On Sep 10, 2017, at 2:52 PM, Chris  wrote:
> 
> I've been informed at https://issues.sonatype.org/browse/OSSRH-34445 that:
> "The logs show that the build is trying to checkout the release branch, but
> whatever it checks out probably still has 0.9.2.7-SNAPSHOT as the version
> instead of 0.9.2.8
> 
> Once the build things it's building a SNAPSHOT version, it has no choice
> but to deploy to the Snapshots repo"
> 
> I've changed my release shell script a little bit since then to properly
> integrate the Proguard step, but I'm still having the same issue. A more
> up-to-date output log is here: https://pastebin.ca/3866418 The script I'm
> running is at
> https://github.com/Pr0methean/BetterRandom/blob/66901100812a4bca1243ac7639c34a837d6aecfa/release.sh
> and
> the pom.xml is at
> https://github.com/Pr0methean/BetterRandom/blob/master/betterrandom/pom.xml
> .
> 
> What do I need to do differently to generate a release with a non-snapshot
> tag?



Re: Are multi-release jars supported?

2017-08-28 Thread Russell Gold
Hi Robert,

My main issue with that solution is that you wind up with four maven projects 
for each jar - which is really painful for multi-module projects. I submitted a 
feature request <https://youtrack.jetbrains.com/issue/IDEA-168946> to Jetbrains 
for IntellijIDEA back in March, but I suspect that there won’t be much 
incentive for them to move on it until they see how the tools will handle it. 
It’s a bit of a chicken-and-egg problem. People don’t want to lose the IDE 
benefits, so they aren’t pushing for a tooling improvement, but until they do, 
the pattern that the IDEs should support isn’t well-defined, so the IDEs won’t 
bother making the needed changes.

I have found a really hackish work-around using soft links :)

As for the necessity, we’ve found that we need to support a range of JDK 
versions from 1.7-9, and there are APIs in the JDK itself which were removed in 
9 which our older libraries need, and replacements don’t work in 1.7. The 
module system turns out to break some 1.8-based approaches in 9, and 
alternative APIs aren’t available until 9, which means that the only way to 
support both 1.8 and 9 is an MR jar. The impression I have from Mark Reinhold 
is that the existence of the MR jar technique will motivate them to be even 
more aggressive in removing legacy APIs.

I’m thinking that improving on the modified lifecycle approach might be the 
quickest way to get there in the short term, and will do some experimentation. 

Thanks,
Russ

> On Aug 28, 2017, at 1:11 PM, Robert Scholte <rfscho...@apache.org> wrote:
> 
> Hi Russ,
> 
> I think Hervés approach[1] is still the most cleanest possible solution.
> Main advantages:
> - works with every IDE as it is a standard multimodule project.
> - real unit testing for every version due to its isolation as Maven module.
> 
> The assembly-part at the end is the most ugly part.
> 
> With Maven it is quite easy to exceed the original intention of multirelease 
> jars.
> It should only change the JDK/JRE related code, but with JDK activated 
> profiles you can control dependencies as well.
> 
> Solving this within a single maven projects would probably be the ultimate 
> goals (it should result in a single jar), but with the current architecture 
> of Maven it is simply not possible keeping the advantages mentioned.
> 
> For that reason I did not pay any extra attention to this subject. There is a 
> reasonable solution and one might wonder if these multirelease jars are a 
> good solution or will only overcomplicate things. Yes, there are cases where 
> multirelease jars will help (also within Maven itself), but in general I 
> don't think it will be used that much.
> 
> Any suggestions to improve this are welcome :)
> 
> Robert
> 
> [1] https://github.com/hboutemy/maven-jep238
> 
> On Mon, 28 Aug 2017 16:18:40 +0200, Russell Gold <russell.g...@oracle.com> 
> wrote:
> 
>> I have found a number of workarounds for MR jars, including 
>> https://github.com/metlos/multi-release-jar-maven-plugin, which makes the 
>> jars relatively easy to build, but lacks support for unit tests and doesn’t 
>> allow building in lower JDKs. Is there built-in maven support now? If not, 
>> is there a road map?
>> 
>> I recognize that one of the problems in that the editors don’t appear to 
>> support the innovations, including multiple classes with the same name but 
>> different JDKs; I am hoping that maven support would prod the editor 
>> maintainers, once they know how the tools expect the directories to be laid 
>> out.
>> 
>> Thanks,
>> Russ
>> -
>> 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
> 



Are multi-release jars supported?

2017-08-28 Thread Russell Gold
I have found a number of workarounds for MR jars, including 
https://github.com/metlos/multi-release-jar-maven-plugin, which makes the jars 
relatively easy to build, but lacks support for unit tests and doesn’t allow 
building in lower JDKs. Is there built-in maven support now? If not, is there a 
road map?

I recognize that one of the problems in that the editors don’t appear to 
support the innovations, including multiple classes with the same name but 
different JDKs; I am hoping that maven support would prod the editor 
maintainers, once they know how the tools expect the directories to be laid out.

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



Re: How does maven handle Java module dependencies?

2017-08-28 Thread Russell Gold
Hi Tibor,

My offer to help stands; I sincerely hope that the suggested command line is 
not the way things go; in my regular projects, we have been working very hard 
to avoid the use of various —add-* switches, as they are stopgaps. Of course, 
one of my real hopes is to have all of this work with multi-release jars, with 
such builds rerunning tests with both the old and new versions :)

Regards,
Russ 


> On Aug 28, 2017, at 6:24 AM, Robert Scholte <rfscho...@apache.org> wrote:
> 
> Hi Russ,
> 
> All maven-compiler-plugin 3.6.x are already based on this idea. So if you use 
> maven-compiler-plugin 3.6.2 (current) it'll work as explained.
> 
> And yes, surefire needs some help on this, but I like to leave Tibor in the 
> lead for this. JUnit5 and Java9 both have impact, but the focus has been 
> mainly on JUnit 5 for now.
> 
> The main missing feature it to run surefire with the modulepath[1].
> Tibor can explain it better, but this is my understanding:
> surefire creates an executable jar with a manifest file containing the 
> classpath to ensure it all fits on the cmdline.
> With Java 9 this has to be transformed an @args file, so the way to call this 
> jar will change as well.
> 
> I got some feedback from Alan Bateman as well (and he's willing to help as 
> well):
> "I assumed the challenge for test execute would be getting the CLI options 
> right. I would expect it will end up like this:
> 
> -p 
> :::
> --add-modules 
> --patch-module =
> --add-reads =junit
> --add-exports /=junit
> -m junit/org.junit.runner.JUnitCore 
> 
> which is complicated. The `--add-reads` option will depend on which test 
> framework is used. The `--add-exports` options will be repeated for each 
> package contains tests invoked by the test framework."
> 
> So there's enough to improve to make it all work.
> I would say "any help is appreciated", but I'll leave it up to Tibor.
> 
> thanks
> Robert
> 
> [1] https://issues.apache.org/jira/browse/SUREFIRE-1262
> 
> On Mon, 28 Aug 2017 04:16:21 +0200, Russell Gold <russell.g...@oracle.com> 
> wrote:
> 
>> Hi Robert,
>> 
>> That sounds great. Any idea on timing of the release? What about the 
>> surefire plugin? Is there something I can do to help?  I am actively working 
>> on Java 9 issues in a few projects, including both the module system and 
>> multi-release jars, so I am very motivated to do what I can to help maven 
>> get there.
>> 
>> Thanks,
>> Russ
>> 
>>> On Aug 27, 2017, at 8:38 AM, Robert Scholte <rfscho...@apache.org> wrote:
>>> 
>>> Hi Russ,
>>> 
>>> this is how it works:
>>> in case there's a module descriptor, the module-path with be used. With the 
>>> help of plexus-java it is possible to divide all jars over the module-path 
>>> and classpath. This mechanism is implemented in the maven-compiler-plugin 
>>> (will do an official release soon with the latest improvements), other 
>>> plugins can/should use this too.
>>> 
>>> This means that you actually don't need to change anything in your pom.xml. 
>>> With the module descriptor and all the dependencies there's enough 
>>> information to decide which jars belong on the modulepath and which on the 
>>> classpath. So in the end there's no need for new scopes anymore, although 
>>> that was my first thought as well.
>>> 
>>> To create an installer, I think you're referring to JLink. Karl Heinz is 
>>> preparing the maven-jlink-plugin.
>>> 
>>> thanks,
>>> Robert
>>> 
>>> On Sun, 27 Aug 2017 13:50:46 +0200, Russell Gold <russell.g...@oracle.com> 
>>> wrote:
>>> 
>>>> I’m sure this must have been described somewhere; is there an overall 
>>>> direction document for supporting the java platform module system?
>>>> 
>>>> case 1)
>>>> 
>>>> I want to compile against another project on the module path rather than 
>>>> the class path. I do this in order to ensure compile-time checking for 
>>>> attempts to compile against non-exported packages.
>>>> 
>>>> case 2)
>>>> 
>>>> I want to test against another project on the module path. This would 
>>>> allow me to catch reflective access attempts against that module’s 
>>>> internals
>>>> 
>>>> case 3)
>>>> 
>>>> I want to use the module dependencies to create an installer, with the 
>>>> dependent modules on the module path. In theory, if Maven understands the 
>&g

Re: How does maven handle Java module dependencies?

2017-08-27 Thread Russell Gold
Hi Robert,

That sounds great. Any idea on timing of the release? What about the surefire 
plugin? Is there something I can do to help?  I am actively working on Java 9 
issues in a few projects, including both the module system and multi-release 
jars, so I am very motivated to do what I can to help maven get there.

Thanks,
Russ

> On Aug 27, 2017, at 8:38 AM, Robert Scholte <rfscho...@apache.org> wrote:
> 
> Hi Russ,
> 
> this is how it works:
> in case there's a module descriptor, the module-path with be used. With the 
> help of plexus-java it is possible to divide all jars over the module-path 
> and classpath. This mechanism is implemented in the maven-compiler-plugin 
> (will do an official release soon with the latest improvements), other 
> plugins can/should use this too.
> 
> This means that you actually don't need to change anything in your pom.xml. 
> With the module descriptor and all the dependencies there's enough 
> information to decide which jars belong on the modulepath and which on the 
> classpath. So in the end there's no need for new scopes anymore, although 
> that was my first thought as well.
> 
> To create an installer, I think you're referring to JLink. Karl Heinz is 
> preparing the maven-jlink-plugin.
> 
> thanks,
> Robert
> 
> On Sun, 27 Aug 2017 13:50:46 +0200, Russell Gold <russell.g...@oracle.com> 
> wrote:
> 
>> I’m sure this must have been described somewhere; is there an overall 
>> direction document for supporting the java platform module system?
>> 
>> case 1)
>> 
>> I want to compile against another project on the module path rather than the 
>> class path. I do this in order to ensure compile-time checking for attempts 
>> to compile against non-exported packages.
>> 
>> case 2)
>> 
>> I want to test against another project on the module path. This would allow 
>> me to catch reflective access attempts against that module’s internals
>> 
>> case 3)
>> 
>> I want to use the module dependencies to create an installer, with the 
>> dependent modules on the module path. In theory, if Maven understands the 
>> above 2 cases, it would also be able to verify the requires clauses in my 
>> project’s module-info.
>> 
>> So how will we be doing this in maven? Is it already supported? My first 
>> thought was that we need two new scopes: module (case 1) and module-test 
>> (case 2), but has this already been planned?
>> 
>> Thanks,
>> Russ
>> -
>> 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 does maven handle Java module dependencies?

2017-08-27 Thread Russell Gold
A bit more research turned up this page 
https://www.sitepoint.com/maven-cannot-generate-module-declaration/ in which 
Robert explains why my “first thought” below is a non-starter, unless the pom 
spec is upgraded. So it sounds now as though we are waiting on ASM to read 
module-info files…? Is there really nothing to be done in the meantime?

> On Aug 27, 2017, at 7:50 AM, Russell Gold <russell.g...@oracle.com> wrote:
> 
> I’m sure this must have been described somewhere; is there an overall 
> direction document for supporting the java platform module system?
> 
> case 1)
> 
> I want to compile against another project on the module path rather than the 
> class path. I do this in order to ensure compile-time checking for attempts 
> to compile against non-exported packages. 
> 
> case 2)
> 
> I want to test against another project on the module path. This would allow 
> me to catch reflective access attempts against that module’s internals
> 
> case 3)
> 
> I want to use the module dependencies to create an installer, with the 
> dependent modules on the module path. In theory, if Maven understands the 
> above 2 cases, it would also be able to verify the requires clauses in my 
> project’s module-info.
> 
> So how will we be doing this in maven? Is it already supported? My first 
> thought was that we need two new scopes: module (case 1) and module-test 
> (case 2), but has this already been planned?
> 
> Thanks,
> Russ
> -
> 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



How does maven handle Java module dependencies?

2017-08-27 Thread Russell Gold
I’m sure this must have been described somewhere; is there an overall direction 
document for supporting the java platform module system?

case 1)

I want to compile against another project on the module path rather than the 
class path. I do this in order to ensure compile-time checking for attempts to 
compile against non-exported packages. 

case 2)

I want to test against another project on the module path. This would allow me 
to catch reflective access attempts against that module’s internals

case 3)

I want to use the module dependencies to create an installer, with the 
dependent modules on the module path. In theory, if Maven understands the above 
2 cases, it would also be able to verify the requires clauses in my project’s 
module-info.

So how will we be doing this in maven? Is it already supported? My first 
thought was that we need two new scopes: module (case 1) and module-test (case 
2), but has this already been planned?

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



Re: Transitive dependencies and version management

2017-08-17 Thread Russell Gold
Have you considered using snapshot versions for C? If both A and B depend on a 
snapshot, they will automatically take the latest version in the repository. 

https://stackoverflow.com/questions/5901378/what-exactly-is-a-maven-snapshot-and-why-do-we-need-it#5901460

> On Aug 17, 2017, at 8:34 PM, Halper, Andrew  wrote:
> 
> Greetings,
> 
> I was wondering if someone might be able to help with a Maven version
> management problem we've encountered.
> 
> We have several interdependent, legacy Java projects, that have recently
> been re-cast as Maven projects. Now that we have the first iteration done,
> it's apparent that one salient characteristic of this particular group of
> projects is: there are about a half-dozen "front-end" projects that depend
> on an intermediate layer of several projects, which in turn depend on a
> rather large, "monolithic" type project at the back. For the sake of
> brevity, a set of projects A, depends (selectively) on a set of projects B,
> which in turn depend on a single project c (the monolithic one).
> 
> A colleague would like to be able to increment the version number of
> project c, then recompile the set of projects A, without having to
> re-specify c's prerequisite version number occurrences in each pom.xml file
> of each (intermediate level) project in B each time project c's version is
> incremented. This would almost surely be desired only in development, and
> not in a test or production environment.
> 
> Could anyone tell me if there is an intrinsic Maven feature that could be
> employed here? The present, proposed solution to the problem is to declare
> the  of each of c's dependency declarations in each B project's
> pom.xml as "provided", but I am uneasy with this. For example, what if
> someone wanted to compile a project in B in isolation from the projects in
> A?
> 
> Thanks very much,
> -- 
> Andy Halper
> USGS WMA Software Engineering
> 520 N Park Ave Ste 221
> Tucson AZ 85719


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



Re: options

2017-08-17 Thread Russell Gold
Hi Tomaž,

What do you mean by, “downloaded”? 

Do you mean where the local maven repository is located? You can configure that 
in settings.xml  

Regards,
Russ

> On Aug 17, 2017, at 5:25 AM, Tomaž Majerhold  wrote:
> 
> Hello!
> 
> Is it possible(some options switches ) at runtime to determine 
> where(location)  artifacts has ben downloaded?
> 
> It would be useful information for running maven in docker.
> 
> Regards, Tomaž
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 



Re: Unable to do a release with Java 9

2017-08-16 Thread Russell Gold
Thanks, Robert.

I’ve done some further experimentation, and was able to upload a repository for 
a different project to a different repository successfully. I’m not yet sure 
what the problem is - the repository? Something in the configuration? I’ll have 
to try some things.

I’d actually upgraded the javadoc plugin, but the site plugin appears to be 
picking up an older one. I suspect that if the site plugin or the master POM 
isn’t updated, a lot of people will start running into this. I’m just at the 
front of it because my project includes an MR jar and needs Java 9.

Thanks,
Russ

> On Aug 16, 2017, at 5:11 PM, Robert Scholte <rfscho...@apache.org> wrote:
> 
> Hi Russ,
> 
> a quick scan of the code and the dependencies of the maven-gpg-plugin 
> suggests there's no need for any changes; this should work with Java 9 as 
> well.
> MSITE-794 is actually a maven-javadoc-plugin issue which has been fixed. 
> Looks like one of the report plugin is picking up an older version of this 
> plugin.
> 
> And I haven't done any releases yet with Java 9. We're testing it, but 
> personally I am waiting for an official release before pushing something with 
> it to Central.
> 
> Anyhow, I think we need more info. I would expect at least some logging when 
> the signing would fail.
> 
> thanks,
> Robert
> 
> On Wed, 16 Aug 2017 19:21:13 +0200, Russell Gold <russell.g...@oracle.com> 
> wrote:
> 
>> This is the first time I have tried doing a release since the -ea designator 
>> was removed from Java 9.
>> 
>> I have upgraded the enforcer and javadoc plugins to 3.0.0-M1
>> I have filed a bug <https://issues.apache.org/jira/browse/MSITE-794> against 
>> the site plugin
>> 
>> But when I try to close the uploaded repository in Nexus, it fails, 
>> complaining that the public key is missing. I see no recent updates to the 
>> gpg plugin.
>> 
>> Has anybody succeeded in doing a release with Java 9 (build 175 or higher)?
>> 
>> Thanks,
>> Russ
> 
> -
> 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



Unable to do a release with Java 9

2017-08-16 Thread Russell Gold
This is the first time I have tried doing a release since the -ea designator 
was removed from Java 9.

I have upgraded the enforcer and javadoc plugins to 3.0.0-M1
I have filed a bug  against 
the site plugin 

But when I try to close the uploaded repository in Nexus, it fails, complaining 
that the public key is missing. I see no recent updates to the gpg plugin.

Has anybody succeeded in doing a release with Java 9 (build 175 or higher)?

Thanks,
Russ

Re: dependency question

2017-04-07 Thread Russell Gold
That’s the way it works: when you specify a snapshot, it takes the latest. 

There are some corner cases where it won’t. I think it only checks for a new 
snapshot every few hours or so, so if you are putting out a lot you might 
conceivably miss one. You can reset that if you need to
.
> On Apr 7, 2017, at 11:27 AM, Magnanao, Hector <hector.magna...@sap.com> wrote:
> 
> If the builds for A are always getting a unique build number as a snapshot 
> build,  how am I sure that B will always get the latest snapshot of A ?  Is 
> there a way to name the A snapshot builds with a unique build number each 
> time for this scenario.
> 
> -Original Message-
> From: Russell Gold [mailto:russell.g...@oracle.com] 
> Sent: Thursday, April 6, 2017 2:27 PM
> To: Maven Users List <users@maven.apache.org>
> Subject: Re: dependency question
> 
> The simplest way is simply to use a snapshot version of A. That way B will 
> always use the latest snapshot. When you finally release A, you can have B 
> point to the released version instead of the snapshot.
> 
>> On Apr 6, 2017, at 2:52 PM, Magnanao, Hector <hector.magna...@sap.com> wrote:
>> 
>> I have to 2 java projects a and b in maven.  The B project uses the A build 
>> as a dependency.  How do I ensure the whenever the A project has a new 
>> build,  the B project will always use that latest build in A.  A is being 
>> built with a unique build number each time it gets built.  So is A has build 
>> # 10 as the newest build,  the B project has to use build #10 of A.
>> 
>> 
>> Hector Magnanao Jr.
>> SCM Analyst
>> SAP Fieldglass
>> Skype:  (331) 702-6142
>> Mobile:  (847) 857-8401
>> Email: hector.magna...@sap.com
>> 
> 
> 
> -
> 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: dependency question

2017-04-06 Thread Russell Gold
The simplest way is simply to use a snapshot version of A. That way B will 
always use the latest snapshot. When you finally release A, you can have B 
point to the released version instead of the snapshot.

> On Apr 6, 2017, at 2:52 PM, Magnanao, Hector  wrote:
> 
> I have to 2 java projects a and b in maven.  The B project uses the A build 
> as a dependency.  How do I ensure the whenever the A project has a new build, 
>  the B project will always use that latest build in A.  A is being built with 
> a unique build number each time it gets built.  So is A has build # 10 as the 
> newest build,  the B project has to use build #10 of A.
> 
> 
> Hector Magnanao Jr.
> SCM Analyst
> SAP Fieldglass
> Skype:  (331) 702-6142
> Mobile:  (847) 857-8401
> Email: hector.magna...@sap.com
> 


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



Re: How to add class file to build & classpath?

2017-04-06 Thread Russell Gold
Hi David,

Is this class generated from data files rather than compiled classes? If so, 
can you bind the plugin run with the generate-resources phase? That would make 
it available at compile time. 


> On Apr 6, 2017, at 11:48 AM, David Hoffer  wrote:
> 
> I'm using exec-maven-plugin to call a main in my code that uses javassist
> to generate a class file at build time.  My code places the class file in
> the ./target/classes folder so it gets included in the modules normal
> binary jar.
> 
> However the rest of the build and other code needs to know that the class
> exists.  I've added that module/artifact as a dependency but the build and
> the runtime classpath has no idea that class exists.
> 
> How do I add it to the build and runtime classpath?
> 
> -Dave


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



Build using toolchains version, but run unit tests against various JDKs?

2017-03-03 Thread Russell Gold
I am using the toolchains plugin to ensure that the jars are produced with the 
correct JDK version; however, I want to be able to unit test against both that 
version and later versions. Is there a way to do that? The surefire plugin just 
selects the same version as was used to build.

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



Re: Is it time to change the defaults for source and target?

2017-01-18 Thread Russell Gold
The rule is three-back. If you run Maven with Java 9 and do not set target and 
source (or release) explicitly, it uses the default of 1.5, which the compiler 
rejects with

[ERROR] Source option 1.5 is no longer supported. Use 1.6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.

 Russ

> On Jan 18, 2017, at 3:30 PM, Jochen Wiedmann <jochen.wiedm...@gmail.com> 
> wrote:
> 
> On Wed, Jan 18, 2017 at 4:37 PM, Russell Gold <russell.g...@oracle.com> wrote:
> 
>> These settings are incompatible with Java 9.
> 
> How so?
> 
> 
> 
> -- 
> The next time you hear: "Don't reinvent the wheel!"
> 
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 



Is it time to change the defaults for source and target?

2017-01-18 Thread Russell Gold
Currently, the maven-compiler-plugin defaults to 1.5 for the values of “source” 
and “target.” But Java 1.5 was end-of-lifed some time ago, and Maven doesn’t 
even run with lower than 1.6. These settings are incompatible with Java 9. 
Would it not make sense now to change those defaults to at least 1.6, if not 
1.7?
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Adding an add-on jar to a project

2015-09-07 Thread Russell Gold
I’ve tried that. Note that the missing directory is under target, meaning that 
it is generated. I have not been able to determine what the “staging” directory 
is. I suspect that there is a problem in the site generation.

Thanks,
Russ

> On Sep 7, 2015, at 4:07 AM, Adrien Rivard <adrien.riv...@gmail.com> wrote:
> 
> Try building directly the tag of the version you  are releasing, it seems
> it is missing a directory compared to your trunk version.
> 
> 
> 
> On Mon, Sep 7, 2015 at 9:55 AM, Niraj Chaudhary <niraj.m.chaudh...@gmail.com
>> wrote:
> 
>> Please confirm if this link is useful?
>> 
>> 
>> http://onjavahell.blogspot.in/2009/12/releasing-multi-module-project-using.html
>> 
>> Cheers,
>> Niraj
>> 
>> On Mon, Sep 7, 2015 at 2:18 AM, Russell Gold <r...@gold-family.us> wrote:
>> 
>>> Hi,
>>> 
>>> I am trying to update my library, Simplestub with an optional add-on jar,
>>> simplestub-asm. It seemed to me that the simplest thing would be to
>> covert
>>> it to a multi-module project, so I moved the original project down a
>> level,
>>> created a parent pom in its place, and the add-on as a second nested
>>> module. It builds and tests just fine, but when I attempt to do mvn
>>> release:perform, I get failures:
>>> 
>>>>[INFO]
>>> 
>>>>[INFO] Reactor Summary:
>>>>[INFO]
>>>>[INFO] SimpleStub . SUCCESS
>>> [02:09 min]
>>>>[INFO] SimpleStub Jar . FAILURE
>>> [ 20.757 s]
>>>>[INFO] SimpleStub ASM extension ... SKIPPED
>>>>[INFO]
>>> 
>>>>[INFO] BUILD FAILURE
>>>>[INFO]
>>> 
>>>>[INFO] Total time: 02:30 min
>>>>[INFO] Finished at: 2015-09-06T16:29:13-04:00
>>>>[INFO] Final Memory: 40M/160M
>>>>[INFO]
>>> 
>>>>[ERROR] Failed to execute goal
>>> org.apache.maven.plugins:maven-scm-publish-plugin:1.0-beta-2:publish-scm
>>> (scm-publish) on project simplestub: Configured content directory does
>> not
>>> exist:
>>> 
>> /Users/russgold/projects/simplestub/target/checkout/simplestub/target/staging
>>> -> [Help 1]
>>> 
>>> 
>>> What am I missing, here?
>>> 
>>> I have considered putting the add-on into a separate GitHub repo; it
>>> contributes nothing to the web site, and I could certainly release it
>>> separately; I’m just troubled at having to do that. Multi-module projects
>>> should work, and I have gotten them working the past, but I seem to be
>>> overlooking something.
>>> 
>>> Any suggestions?
>>> 
>>> The repo is at https://github.com/meterware/simplestub <
>>> https://github.com/meterware/simplestub>
>>> 
>>> Thanks,
>>> Russ
>>> 
>>> 
>>> 
>>> -
>>> Author, Getting Started with Apache Maven <
>>> http://www.packtpub.com/getting-started-with-apache-maven/video>
>>> Author, HttpUnit <http://www.httpunit.org> and SimpleStub <
>>> http://simplestub.meterware.com>
>>> 
>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>> and listen to the Misfile radio play <
>>> http://www.fuzzyfacetheater.com/misfile/>!
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
> 
> 
> 
> -- 
> Adrien Rivard

-
Author, Getting Started with Apache Maven 
<http://www.packtpub.com/getting-started-with-apache-maven/video>
Author, HttpUnit <http://www.httpunit.org> and SimpleStub 
<http://simplestub.meterware.com>

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









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



Re: Adding an add-on jar to a project

2015-09-07 Thread Russell Gold
No, sadly. At least it doesn’t appear to help my problem.

> On Sep 7, 2015, at 3:55 AM, Niraj Chaudhary <niraj.m.chaudh...@gmail.com> 
> wrote:
> 
> Please confirm if this link is useful?
> 
> http://onjavahell.blogspot.in/2009/12/releasing-multi-module-project-using.html
> 
> Cheers,
> Niraj
> 
> On Mon, Sep 7, 2015 at 2:18 AM, Russell Gold <r...@gold-family.us> wrote:
> 
>> Hi,
>> 
>> I am trying to update my library, Simplestub with an optional add-on jar,
>> simplestub-asm. It seemed to me that the simplest thing would be to covert
>> it to a multi-module project, so I moved the original project down a level,
>> created a parent pom in its place, and the add-on as a second nested
>> module. It builds and tests just fine, but when I attempt to do mvn
>> release:perform, I get failures:
>> 
>>>[INFO]
>> 
>>>[INFO] Reactor Summary:
>>>[INFO]
>>>[INFO] SimpleStub . SUCCESS
>> [02:09 min]
>>>[INFO] SimpleStub Jar . FAILURE
>> [ 20.757 s]
>>>[INFO] SimpleStub ASM extension ... SKIPPED
>>>[INFO]
>> 
>>>[INFO] BUILD FAILURE
>>>[INFO]
>> 
>>>[INFO] Total time: 02:30 min
>>>[INFO] Finished at: 2015-09-06T16:29:13-04:00
>>>[INFO] Final Memory: 40M/160M
>>>[INFO]
>> 
>>>[ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-scm-publish-plugin:1.0-beta-2:publish-scm
>> (scm-publish) on project simplestub: Configured content directory does not
>> exist:
>> /Users/russgold/projects/simplestub/target/checkout/simplestub/target/staging
>> -> [Help 1]
>> 
>> 
>> What am I missing, here?
>> 
>> I have considered putting the add-on into a separate GitHub repo; it
>> contributes nothing to the web site, and I could certainly release it
>> separately; I’m just troubled at having to do that. Multi-module projects
>> should work, and I have gotten them working the past, but I seem to be
>> overlooking something.
>> 
>> Any suggestions?
>> 
>> The repo is at https://github.com/meterware/simplestub <
>> https://github.com/meterware/simplestub>
>> 
>> Thanks,
>> Russ
>> 
>> 
>> 
>> -
>> Author, Getting Started with Apache Maven <
>> http://www.packtpub.com/getting-started-with-apache-maven/video>
>> Author, HttpUnit <http://www.httpunit.org> and SimpleStub <
>> http://simplestub.meterware.com>
>> 
>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>> and listen to the Misfile radio play <
>> http://www.fuzzyfacetheater.com/misfile/>!

-
Author, Getting Started with Apache Maven 
<http://www.packtpub.com/getting-started-with-apache-maven/video>
Author, HttpUnit <http://www.httpunit.org> and SimpleStub 
<http://simplestub.meterware.com>

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









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



Adding an add-on jar to a project

2015-09-06 Thread Russell Gold
Hi,

I am trying to update my library, Simplestub with an optional add-on jar, 
simplestub-asm. It seemed to me that the simplest thing would be to covert it 
to a multi-module project, so I moved the original project down a level, 
created a parent pom in its place, and the add-on as a second nested module. It 
builds and tests just fine, but when I attempt to do mvn release:perform, I get 
failures:

> [INFO] 
> 
> [INFO] Reactor Summary:
> [INFO] 
> [INFO] SimpleStub . SUCCESS 
> [02:09 min]
> [INFO] SimpleStub Jar . FAILURE [ 
> 20.757 s]
> [INFO] SimpleStub ASM extension ... SKIPPED
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time: 02:30 min
> [INFO] Finished at: 2015-09-06T16:29:13-04:00
> [INFO] Final Memory: 40M/160M
> [INFO] 
> 
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-scm-publish-plugin:1.0-beta-2:publish-scm 
> (scm-publish) on project simplestub: Configured content directory does not 
> exist: 
> /Users/russgold/projects/simplestub/target/checkout/simplestub/target/staging 
> -> [Help 1]


What am I missing, here?

I have considered putting the add-on into a separate GitHub repo; it 
contributes nothing to the web site, and I could certainly release it 
separately; I’m just troubled at having to do that. Multi-module projects 
should work, and I have gotten them working the past, but I seem to be 
overlooking something.

Any suggestions?

The repo is at https://github.com/meterware/simplestub 


Thanks,
Russ



-
Author, Getting Started with Apache Maven 

Author, HttpUnit  and SimpleStub 


Come read my webnovel, Take a Lemon , 
and listen to the Misfile radio play !










Re: Problems compiling source java with different encodings

2015-08-25 Thread Russell Gold
Do you have the following in your pom.xml?

properties
project.build.sourceEncodingUTF-8/project.build.sourceEncoding
/properties

If not, do you know what encoding is being used in your source file?


 On Aug 25, 2015, at 4:01 PM, Néstor Boscán nesto...@gmail.com wrote:
 
 Hi
 
 I have a legacy code that compiles correctly using IDEA or JDeveloper. But
 if I try to use maven compile it generates error because there are unknoen
 characters in the comments. It looks like the legacy code has different
 types of character encoding in the file. Is there a way to compile using
 maven that will not take into consideration the comments?
 
 Regards,
 
 Néstor


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



Re: compile error with aspose.pdf

2015-08-25 Thread Russell Gold
What happens when you run:

mvn -X compile?

do you really mean to have a package named aspose.pdf?



 On Aug 25, 2015, at 2:59 PM, Magnanao, Hector hector.magna...@sap.com wrote:
 
 Can anyone tell me how to resolve this compile error ?  I've uploaded the jar 
 locally and I still get the error.
 
 [ERROR] Failed to execute goal 
 org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) 
 on project foundation: Compilation failure: Compilation failure:
 [ERROR] 
 /C:/Foundation/foundation/src/main/java/com/mycompany/app/cache/LicenseService.java:[35,23]
  cannot find symbol
 [ERROR] symbol:   class License
 [ERROR] location: package aspose.pdf
 [ERROR] 
 /C:/Foundation/foundation/src/main/java/com/mycompany/app/cache/LicenseService.java:[35,59]
  cannot find symbol
 [ERROR] symbol:   class License
 
 Hector Magnanao Jr.
 SCM Analyst
 
 Fieldglass, Inc.
 O: (331) 702-6142
 M: (773) 474-3051
 hector.magna...@sap.com
 www.fieldglass.com
 
 Fieldglass is now part of SAP
 
 This email contains confidential information.  If you are not the intended 
 recipient, do not read, distribute or reproduce this transmission (including 
 any attachments). If you have received this email in error, please notify the 
 sender by email reply.
 


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



Re: Finding transitive dependencies imported into our code

2015-08-07 Thread Russell Gold
mvn -X compile

Look at the listing; it will show you all of the dependencies.

 On Aug 7, 2015, at 7:14 AM, James Green james.mk.gr...@gmail.com wrote:
 
 See in-line
 
 On 7 August 2015 at 12:05, Björn Raupach raupach.bjo...@googlemail.com
 wrote:
 
 hi,
 
 On 07 Aug 2015, at 12:33, James Green james.mk.gr...@gmail.com wrote:
 
 Hi,
 
 I want to know about any imports within our package base that are
 resolved
 by a transitive dependency.
 
 There must be a command or tool for this - I'm not sure I've ever seen
 one
 though?
 
 Maybe this helps: mvn dependency:resolve
 
 
 Nope. Allow me to describe my use-case.
 
 I have been given a source code project. It has a dependency that we have
 no clear need for. I remove that dependency. The build now fails because
 our sources import something the now-removed dependency transitively
 provided.
 
 I want to know I don't have any other source-code dependencies not listed
 in dependencies.
 
 I can not see such a command listed under
 https://maven.apache.org/plugins/maven-dependency-plugin/
 
 Thanks,
 
 James


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



Re: E-Book Beter Builds with Maven seems to be missing

2014-11-24 Thread Russell Gold
I found it on Scribd - I assume this is the one you mean.

http://www.scribd.com/doc/238927/Better-Builds-With-Maven

 On Nov 11, 2014, at 3:09 AM, Nick Stolwijk nick.stolw...@gmail.com wrote:
 
 Hi all,
 
 It seems the link from the External Resources[1] to the e-book Beter
 Builds with Maven'[2] is broken.
 
 Is this still being hosted elsewhere? (I couldn't find it with a quick
 search) Or should we remove it from our site?
 
 [1] http://maven.apache.org/articles.html
 [2] http://www.maestrodev.com/better-build-maven
 
 With regards,
 
 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

-
Author, Getting Started with Apache Maven 
http://www.packtpub.com/getting-started-with-apache-maven/video
Author, HttpUnit http://www.httpunit.org and SimpleStub 
http://simplestub.meterware.com

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









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



Re: Help with converting existing ant build to maven is required

2014-04-29 Thread Russell Gold
HI Maxim,

Here is how I do child projects:

parent
groupIdcom.meterware.totalizer/groupId
artifactIdtotalizer/artifactId
version1.0-SNAPSHOT/version
relativePath../relativePath
/parent

artifactIdserver/artifactId


Note that I am specifying the parent project, but neither the group nor the 
version for the child project - just the artifactId. The others are 
automatically inherited.

Regards,
Russ

On Apr 26, 2014, at 3:38 AM, Maxim Solodovnik solomax...@gmail.com wrote:

 Hello All,
 
 sorry for the keeping silence too long :)
 finally I was able to start migration and more questions are come up: :)
 
 1) Is there any way to use parent project version in child projects? I
 currently use variable for this [1] but it results too many warnings
 
 2) I have lots of Forking PROJECT VERSION and same tasks are performed
 again and again :( is there any way to disable forking?
 
 3) somehow task in phase process-test-resources is executed even if
 -DskipTests=true is specified:
 mvn eclipse:eclipse -DskipTests=true
 Or in case of eclipse:eclipse it is expected behavior?
 
 4) While running mvn site I get lots of
 Caused by: java.lang.ClassNotFoundException:
 org.sonatype.aether.version.VersionConstraint
 at
 org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
 I have tried many solutions from the google none of them are working :(
 
 
 solomax@solomax-laptop:~/work/openmeetings/trunk/singlewebapp$ mvn -version
 Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9;
 2014-02-15T00:37:52+07:00)
 Maven home: /opt/maven
 Java version: 1.7.0_51, vendor: Oracle Corporation
 Java home: /opt/jdk1.7.0_51/jre
 Default locale: en_US, platform encoding: UTF-8
 OS name: linux, version: 3.13.0-24-generic, arch: amd64, family:
 unix
 
 
 Thanks in advance :)
 
 
 
 On Thu, Mar 13, 2014 at 10:46 PM, Ron Wheeler 
 rwhee...@artifact-software.com wrote:
 
 Good approach.
 Ron
 
 On 13/03/2014 9:58 AM, Baptiste Mathus wrote:
 
 Well, though I agree Maven isn't designed to be an end-user tool, using it
 to build the end-user distribution is actually totally supported.
 IMO, if what you're trying to do is building your product from some
 sources
 and binaries, then Maven can obviously do it.
 
 If what you need for production is an installer, then creating an
 installer
 using izpack is indeed a good idea, but you would just build that
 installer
 during your Maven build (http://izpack.codehaus.org/
 izpack-maven-plugin/e.g.).
 
 You seem to actually have two kind of phases:
 * the first one, typically compile and package your sources using binaries
 coming from a repo manager (be it a corporately managed one, or directly
 from Central)
 * the second one, creating the end-user distribution, is typically done
 with Maven using maven-assembly-plugin.
 
 Don't hesitate to ask questions, because I don't think we've gone so far
 until now to understand your building steps.
 
 Cheers
 
 
 2014-03-13 14:24 GMT+01:00 Maxim Solodovnik solomax...@gmail.com:
 
 Thanks Ron,
 
 I'll take a look at it, but I'm afraid distribute application in
 partially
 compiled state is not an option.
 Currently it works out of the box and this is the requirement.
 
 Will try to study maven and postpone the migration for now
 
 
 On Thu, Mar 13, 2014 at 8:18 PM, Ron Wheeler 
 rwhee...@artifact-software.com
 
 wrote:
 IMHO, Maven is a software build tool and trying to make it a
 installation
 tool is much too hard.
 
 You might find that your life will be a lot easier with IzPack as the
 
 tool
 
 to create your installer.
 It will allow you to package up your maven artifacts with other
 resources
 into different OS-specific installers that can be distributed easily.
 It supports install time execution of your procedures so that you can
 start RED-5 or execute the flex processes required to build and install
 
 the
 
 Flash assets.
 
 
 Ron
 
 
 
 On 13/03/2014 4:51 AM, Maxim Solodovnik wrote:
 
 Hello Baptiste,
 
 Thanks for your quick reply!
 
 Red5-server is custom tomcat (zip/tgz with scripts, libraries,
 configs
 etc.).
 We need to pack it in our distribution, not sure if it can be done
 
 Maven
 
 way :(
 
 2) tgz contains flex based Flash compiler with all necessary libraries
 
 and
 
 binaries necessary to build Flash part of our application.
 
 
 
 
 
 On Thu, Mar 13, 2014 at 5:15 AM, Baptiste Mathus m...@batmat.net
 wrote:
 
  IIUC, your project openmeetings depends on red5 libraries.
 
 About your questions:
 
 1) Not actually a Maven issue, but you seem to think the way to go it
 
 to
 
 build that dependency. As the project is ASLv2, you would far better
 
 make
 
 sure/ask it be uploaded to Maven Central. Then just just the
 
 dependency
 
 in a normal way/
 Maven is actually very straightforward if you follow the Maven Way
 
 (yeah,
 
 sounds like a sect somehow, you may think ;-)).
 
 2) Once again, what does contain that tgz? If it contains jars and 

Re: Different profiles with different surefire excludes and includes doesn't work

2014-04-08 Thread Russell Gold
HI Lahiru,

I see that both of your profiles are active by default, so you’re going to get 
both.

That means that Maven has to combine them for you, which is likely to result in 
something you don’t want. 

Regards,
Russ

On Apr 8, 2014, at 12:02 PM, Lahiru Gunathilake glah...@gmail.com wrote:

 Hi All,
 
 I made my parent pom[1] with multiple profiles, and my requirement is the
 enable different types of tests for each profiles.
 
 When I just put the default profiles and test it my excludes in default
 profile works fine, but when i add another new profile with a different
 name (ex: gridTests) and try the default profile, it actually run my
 excludes in the new profiles. I have copied my profile configuration below.
 
 Can someone please help me whats wrong I am doing or is it a bug in maven.
 This is my maven environment.
 
 Apache Maven 3.0.2 (r1056850; 2011-01-08 19:58:10-0500)
 Java version: 1.6.0_24, vendor: Apple Inc.
 Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
 Default locale: si, platform encoding: MacRoman
 OS name: mac os x, version: 10.6.8, arch: x86_64, family: mac
 
 
 [1]http://pastebin.com/xwvjH45H
 
 Lahiru
 
 -- 
 System Analyst Programmer
 PTI Lab
 Indiana University


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



Re: Configuring SCM for github

2014-03-19 Thread Russell Gold
HI Eric, I think you are missing the “.git” extensions in your urls. Here’s the 
ones I use.

scm
urlhttps://github.com/meterware/simplestub.git/url

developerConnectionscm:git:https://github.com/meterware/simplestub.git/developerConnection

connectionscm:git:https://github.com/meterware/simplestub.git/connection
/scm

On Mar 19, 2014, at 2:58 PM, Eric Kolotyluk eric.koloty...@gmail.com wrote:

 I am having trouble getting mvn release:prepare to work with github
 
  scm
 connectionscm:git:http://github.com/kolotyluk/java-file-utilities/connection
 urlscm:git:http://github.com/kolotyluk/java-file-utilities/url
 developerConnectionscm:git:https://github.com/kolotyluk/java-file-utilities/developerConnection
tagjava-file-utilities-0.0.1/tag
  /scm
 
 When I try to prepare the release I get
 
  [INFO] Checking in modified POMs...
  [INFO] Executing: cmd.exe /X /C git add -- pom.xml
  [INFO] Working directory: 
 D:\Users\Eric\Software\Project\Repositories\java-file-utilities
  [INFO] Executing: cmd.exe /X /C git status
  [INFO] Working directory: 
 D:\Users\Eric\Software\Project\Repositories\java-file-utilities
  [INFO] Executing: cmd.exe /X /C git commit --verbose -F 
 C:\Users\Eric\AppData\Local\Temp\maven-scm-559613294.commit pom.xml
  [INFO] Working directory: 
 D:\Users\Eric\Software\Project\Repositories\java-file-utilities
  [INFO] Executing: cmd.exe /X /C git symbolic-ref HEAD
  [INFO] Working directory: 
 D:\Users\Eric\Software\Project\Repositories\java-file-utilities
  [INFO] Executing: cmd.exe /X /C git push 
 https://github.com/kolotyluk/java-file-utilities master:master
  [INFO] Working directory: 
 D:\Users\Eric\Software\Project\Repositories\java-file-utilities
 
 and mvn just hangs forever at that point. Is this a credentials problem or 
 something else?
 
 Cheers, Eric
 
 -
 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: 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/!









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: short and snappy description of what Maven is

2014-01-06 Thread Russell Gold
Of course, you could say that about Gradle, too. And ant now does have the 
ability to use those dependency features.

I went through this when creating my video course (not in the sig because this 
is work email). It’s not clear to me that you can make a one sentence 
description that will provide sufficiently useful information unless something 
like:

Maven is a build tool which consumes and produces artifacts managed in a 
repository.

But that is not going to help people coming new to the project.

I think I am missing the motivation here.Is the target for this description 
people deciding whether to try Maven? People trying to learn how to use it?

On Jan 6, 2014, at 12:43 PM, Lyons, Roy roy.ly...@cmegroup.com wrote:

 on https://cwiki.apache.org/confluence/display/MAVEN/New+Main+Site it says:
 
 We need a short and snappy description of what Maven is:
 
 Apache Maven is a software project management and comprehension tool.
 
 Is just not an easy to understand description of what Maven is.
 
 
 
 
 I would like to submit my short description for review.
 
 Apache Maven is a convention-over-configuration build tool which has great 
 dependency management features.
 
 I know that it does more than that - but I feel that at its core, this is 
 what it really is.
 
 -
 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: short and snappy description of what Maven is

2014-01-06 Thread Russell Gold
Several sentences sounds good. But here’s another question. Comparing Maven to 
ant is almost too easy in terms of advantages. Is gradle now a serious 
competitor (I had been working on converting an enormous project to maven, but 
the architect decided to switch to gradle, so I am particularly sensitive to 
the issue). I can see some superficial advantages of gradle that might appeal 
to some projects. Is it better to ignore or address this?

On Jan 6, 2014, at 3:02 PM, Stephen Connolly stephen.alan.conno...@gmail.com 
wrote:

 On Monday, 6 January 2014, Ron Wheeler wrote:
 
 I think that the target has to be people deciding whether to try Maven.
 They initially want to know what it does and why it is better than Ant or
 whatever they are using now.
 
 Trying to teach Maven in a single sentence is too much to ask.
 
 Maven is a build tool which consumes and produces artifacts managed in a
 repository. doesn't sound like it will help build my application.
 At the start, one doesn't have any artifacts or own a repository.
 
 Apache Maven is a convention-over-configuration build tool which has
 great dependency management features.
 
 
 I think we should hint at the descriptive philosophy rather than the
 procedural philosophy most tools take
 
 
 is pretty clear for a single sentence description and it true.
 Maybe we can come up with a follow-up sentence to amplify/explain this one.
 Most programmers or project managers should be able to find the time to
 read 2 or maybe 3 sentences before deciding on a build tool.
 As long as each sentence draws the person deeper into Maven, that would
 work.
 
 
 Yes that is the idea
 
 
 
 Ron
 
 
 On 06/01/2014 12:57 PM, Russell Gold wrote:
 
 Of course, you could say that about Gradle, too. And ant now does have
 the ability to use those dependency features.
 
 I went through this when creating my video course (not in the sig because
 this is work email). It’s not clear to me that you can make a one sentence
 description that will provide sufficiently useful information unless
 something like:
 
 Maven is a build tool which consumes and produces artifacts managed in a
 repository.
 
 But that is not going to help people coming new to the project.
 
 I think I am missing the motivation here.Is the target for this
 description people deciding whether to try Maven? People trying to learn
 how to use it?
 
 On Jan 6, 2014, at 12:43 PM, Lyons, Roy roy.ly...@cmegroup.com wrote:
 
 on https://cwiki.apache.org/confluence/display/MAVEN/New+Main+Site it
 says:
 
 We need a short and snappy description of what Maven is:
 
 Apache Maven is a software project management and comprehension tool.
 
 Is just not an easy to understand description of what Maven is.
 
 
 
 
 I would like to submit my short description for review.
 
 Apache Maven is a convention-over-configuration build tool which has
 great dependency management features.
 
 I know that it does more than that - but I feel that at its core, this
 is what it really is.
 
 -
 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
 
 
 
 
 --
 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
 
 
 
 -- 
 Sent from my phone


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



Re: short and snappy description of what Maven is

2014-01-06 Thread Russell Gold
I missed this earlier - I agree. The biggest advantage I find with Maven over 
tools that have adopted its dependency management philosophy is that every 
build essentially follows a predictable pattern, rather than being free form. A 
new developer automatically knows how to invoke it. That is most definitely not 
guaranteed to be true with any other build system that I know of.

So something like: 

Maven is a build tool which not only simplifies the common tasks of defining a 
build, but also makes it easy for new developers to know how to use the created 
build.

On Jan 6, 2014, at 3:02 PM, Stephen Connolly stephen.alan.conno...@gmail.com 
wrote:

 I think we should hint at the descriptive philosophy rather than the
 procedural philosophy most tools take


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



Re: How to run a script only for top-level project using maven-antrun-plugin?

2013-12-23 Thread Russell Gold
HI Sumit,

The simplest thing might be to make a separate module which does nothing but 
run your script. Then it would only run when executing that module.

If you are doing this once for each build, you don’t even need the profile.

Regards,
Russ

On Dec 23, 2013, at 3:16 PM, Sumit Kumar skbrnwl-...@yahoo.com wrote:

 Hi,
 
 
 I want to create a profile  that can help me run an auto-generated script 
 onto the target m/c. Since i would want this on a build m/c to be executed 
 only once, i figured it would be better to keep this target in a separate 
 profile. Here is what the skeleton looks like in my parent component's 
 pom.xml (i chose parent component, because there are 3 or 4 sub components 
 who would need this script's output).
 
 
 profile
   idrun-script/id
   build
 plugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-antrun-plugin/artifactId
 version${maven-antrun-plugin.version}/version

 configuration
   skipTestsfalse/skipTests
 /configuration
 executions
   execution
 idrun-script/id
 phaseinitialize/phase
 goals
  
 goalrun/goal
 /goals
 configuration
   target
 echo file=target/install-foo.sh
 
 /echo
 exec executable=sh dir=${basedir}
 failonerror=true
   arg line=target/install-foo.sh /
 /exec
   /target
 /configuration
   /execution
 /executions
   /plugin
 /plugins
   /build

 /profile
 
 My problem is that this script gets executed for each and every sub component 
 of the parent component. Is there a way to ensure that this script 
 install-foo.sh is executed only once? I was running mvn initialize 
 -Prun-script I tried with generate-sources phase as well and had the script 
 running for all the sub-components. Any pointers will be very helpful.
 
 
 Thanks,
 -Sumit

-
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: Fine versioning on multi-modules project ?...

2013-12-21 Thread Russell Gold
HI Benoit,

Given you scenario, it really sounds as though your project is essentially a 
single project, and your modules should just inherit the version from the 
parent. Maven tools, especially the release plugin, make this easy.

If not, I would regard what you are creating is a set of interrelated projects 
rather than a single multi-module project, and I would suggest dispensing with 
keeping the versions in the parent. Instead, as long as the apis for module A 
are unchanged, leave B and C dependent on the previous version. They should be 
able to function with the old API, and you simply install the latest version of 
A. If you add an API to A that B needs, you simply update B to recognize the 
new version, while C remains unaware. The only time you would need to update a 
dependency version would be if you actually have to change or remove an API, or 
rely on changed functionality.

But the multi-module project with a single shared version is the simplest 
approach, IMHO.

Regards,
Russ

On Dec 20, 2013, at 3:06 PM, Benoît Berthonneau ben...@berthonneau.com wrote:

 Hi all,
 
 
 
 I need your point of view/opinion/help on the way to version modules on
 multi-modules Maven project. My question: is it really possible ?
 
 
 
 I’ve the following (simplified) Maven project:
 
  Parent (version 1.0)
 
  |__ module A (version 1.0)
 
  |__ module B (version 1.0, that depends on module A)
 
  |__ module C (version 1.0, that depends on module B and A)
 
  |__ module “packaging” (which create an archive with all needed
 libraries/modules to start my application)
 
 
 
 All modules have their own version number (that’s the key of my question)
 
 Since all modules are executed in the same JVM, I need to be sure that
 modules B  C are using the same version of module A. For this reason, the
 version is specified in the dependencyManagement section of the parent.
 
 
 
 Now, I’ve updated module A (a minor modification, with no impact on
 interfaces, or API), so I need to update the version to 1.1
 
 This new version have to be also specified on the parent. This update force
 me to update the parent to 1.1
 
 This new parent version needs to be taken into account on all other modules
 (B, C, packaging)
 
 So, I need to update B, C, packaging version to something like 1.0.1
 
 
 
 At the end, all modules version have been changed ?!...
 
 
 
 How could I avoid this ? (I think that I have already the answer…)
 
 
 
 Thanks !
 
 Benoît.
 

-
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: Maven Site Generation for foreign projects

2013-12-18 Thread Russell Gold
Hi Ralf,

You should be able to create your own pages to do just about anything you want 
- but you could lose the automatic reporting that Maven supports per module, if 
you are not generating the site from the module poms themselves. Why do you not 
want to configure the build pom for site generation? It shouldn’t add all that 
much.

Regards,
Russ

On Dec 18, 2013, at 3:11 PM, Ralf Zahn ralf.z...@ars.de wrote:

 Hi,
 
 does the maven-site-plugin support the generation of websites that include 
 artifacts (that are downloaded into the site directory during maven build 
 from the maven repository) and a download page for them?
 
 I have a POM that includes modules (dependent from the profile that is 
 currently active) and do not want to configure this pom for site 
 generation. Instead, I have another project for site generation that can 
 refer to the modules (artifacts within the maven repository). The result 
 should be a web site that hosts these artifacts incl. a download page.
 
 My current solution is
 - use the maven dependency plugin to copy the artifacts into the site 
 output directory (path is managed with one maven property per artifact)
 - download.apt.vm that creates one link per artifact using the maven 
 property
 
 But this is not that generic as it could be. Is there any support for 
 that?
 
 Greetings,
 Ralf Zahn
 
 ARS Computer und Consulting GmbH, http://www.ars.de
 Ridlerstrasse 55, 80339 Muenchen, Deutschland
 
 Application Development Services, Business Transformation Services, IT 
 Infrastruktur Services
 Beratung und Vertrieb zu IBM Software, System x, POWER Systems, Storage
 License Management Services, IBM Passport Advantage Lizenzierung
 
 Handelsregister Muenchen, HRB 101829, USt-ID: DE 155 068 909
 Geschaeftsfuehrer: Michael Arbesmeier, Kai-Uwe Rommel, Roland Schock, 
 Joachim Gucker
 

-
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: Question: Maven Pathes includes and others

2013-12-18 Thread Russell Gold
Hi Martin,

On Dec 13, 2013, at 9:37 AM, Hoffmann Martin (UniCredit Business Integrated 
Solutions) martin.hoffm...@unicredit.de wrote:

environmentVariables

 HVBAPPSDATA${basedir}/${project.parent.relativePath}/HVBAPPSDATA
/environmentVariables


Can you confirm that this is being defined correctly? My initial reaction is 
that this is actually pointing to the directory above your project, which would 
cause the file not to be found.

But in general, I presume that you are getting some kind of error message, or 
else can get the test to dump the path it is using to find the property file. 
If you could show us that and compare it with the proper path, that would be 
useful information.


Regards,
Russ
-
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: Premature decomposition of projects

2013-11-22 Thread Russell Gold
It’s also an attempt to create a modular system, in hopes of minimizing 
codebase size and providing custom functionality. It’s thus closely related to 
a lot of the modularity ideas that have come and gone over time, without the 
judgment of what is properly a “module.” I’ve seen multi-hundred module 
projects.

On Nov 22, 2013, at 1:33 PM, Ron Wheeler rwhee...@artifact-software.com wrote:

 Looks like a kludge to get around a poor SOA architecture with too many 
 inter-module dependencies and an unwillingness to build mock objects for 
 testing.
 
 In our house, SNAPSHOTS posted to Nexus come with a warranty that they meet a 
 subset of the spec that is known.
 If someone doesn't like that level of instability, they should make mock 
 objects that they understand.
 
 Ron
 
 
 On 22/11/2013 11:11 AM, Viktor Sadovnikov wrote:
 Hello,
 
 Here is an interesting article about dependencies management and builds
 with Maven, which can become unnecessary overcomplicated
 http://bit.ly/1dn9ZZL
 
 With regards,
 Viktor
 
 
 
 -- 
 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
 

-
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: Is it possible to release a child module that isn't listed in the parent's list of modules?

2013-11-19 Thread Russell Gold
The release plugin does an awful lot more than deploy. The usual case is that 
during development, your version is set to a snapshot - the plugin changes it 
to a release version, commits the change to CM and tags it, among other things. 
Deploy won’t do any of that.

That said, your point about the versions is a good one. It makes no sense to 
set the snapshot back to match the version just released. 

Regards,
Russ

On Nov 19, 2013, at 10:36 AM, Ron Wheeler rwhee...@artifact-software.com 
wrote:

 I never us the release plug-in so you can take my comments with a grain of 
 salt.
 
 From reading the docs I am not sure that these are right.
 
 -DdevelopmentVersion=52.0.0-SNAPSHOT -DreleaseVersion=52.0.0
 
 
 My interpretation is that you are trying to get maven to go backwards.
 You are saying to release 52.0.0 and make a new snapshot of 52.0.0-SNAPSHOT 
 which is not right.
 
 -DdevelopmentVersion=52.0.1-SNAPSHOT -DreleaseVersion=52.0.0
 
 seems to be the right arguments.
 
 I am not sure why you are even using the release plug-in at all. If you just 
 want to deploy a release of one module just use the deploy command.
 Release wants to do a some magic to your project to get it setup for the next 
 development cycle and I am not sure that you really want to do all this at 
 this time.
 
 If you just want to deploy the current release and start working on 
 52.0.1-SNAPSHOT for one module, you can just deploy and change the pom to 
 point the 52.0.1-SNAPSHOT parent and you are ready for the next development 
 cycle. - Not worth wrestling with the release plug-in.
 
 Ron
 
 
 On 19/11/2013 10:09 AM, laredotornado-3 wrote:
 I hadn't specified a Maven release version anywhere, so I assume you meant
 like this
 
 mvn -B -DdevelopmentVersion=52.0.0-SNAPSHOT -DreleaseVersion=52.0.0
 -Dusername=* -Dtag=myprojectt-52.0.0 -DskipTests -P prod -Dresume=false
 -DdryRun=true org.apache.maven.plugins:maven-release-plugin:2.4.2:prepare
 
 However, I get the same errors, whether I specify the project version like
 this:
 
 parent
 artifactIdsubco/artifactId
 groupIdorg.mainco.subco/groupId
 version52.0.0/version
 /parent
 
 or like this
 
 parent
 artifactIdsubco/artifactId
 groupIdorg.mainco.subco/groupId
 version52.0.0-SNAPSHOT/version
 /parent
 
 Was there something more I needed to do? -
 
 
 
 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Is-it-possible-to-release-a-child-module-that-isn-t-listed-in-the-parent-s-list-of-modules-tp5775784p5775848.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
 
 
 
 
 -- 
 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



Re: Maven Extension automatic deployment

2013-11-17 Thread Russell Gold
Hi James,

There are some things I don’t understand about your scenario. You say you 
“temporarily” have a maven build extension. What does that mean? Are you 
currently using ant? And using ant tasks for maven to build the maven portions? 
Or now using maven and having it call an old build tool? More information would 
help us to help you.

Regards,
Russ

On Nov 15, 2013, at 1:31 PM, James Hutton james.a.hut...@gmail.com wrote:

 Hi,
 I have a project where I need to temporarily have a maven build extension
 (because we're migrating to maven) and did not know if there is any way to
 get the maven extension artifact to automatically download.  I have seen
 that if the artifact is in my local repository that it does not need to be
 in my lib/ext folder but if it hasn't already been downloaded maven throws
 an error that it can't find the artifact.  Are there any options or steps I
 can document that would prevent me from having to get the artifact deployed
 into all of my maven installations or local repositories?  I saw some
 documentation on the Eclipse Tycho project that they seem to believe it
 should automatically download, but it did not for me (I think there is a
 proxy issue).  My extension is still in a snapshot state, could it be that
 if I made a release it would automatically download?
 
 Thanks,
 James

-
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: maven-failsafe-plugin: what is it actually intended for?

2013-11-15 Thread Russell Gold
It appears that there are multiple use cases for failsafe. I tend to use it for 
slow tests that don’t necessarily need to pass at the moment, but for which I 
want to know the percentage passing. Accordingly, I bind the integration-test 
goal but NOT the verify goal.

On Nov 15, 2013, at 1:57 AM, Vincent Latombe vincent.lato...@gmail.com wrote:

 maven-failsafe-plugin implies some specific steps are required *before*
 (pre-integration-test) and *after* (post-integration-test) the test
 execution, which allows to do fire up a container then turn it off after
 the tests (for example).
 
 Then, only after these, the test results are evaluated during 'verify'
 phase and will fail the build if needed.
 
 This is unlike maven-surefire-plugin, that performs both the tests
 execution and verification in the same step, which prevents you from doing
 any kind of cleanup outside of test execution.
 
 So, using failsafe or surefire boils down to a single question : do you
 need to perform any set up/teardown outside of the test execution
 framework? If yes, use failsafe, if no, use surefire
 
 Cheers,
 
 Vincent
 
 Vincent
 
 
 2013/11/15 Vincent Latombe vincent.lato...@gmail.com
 
 you mean 'verify', not 'validate'
 
 Vincent
 
 
 2013/11/14 Matthew Adams matt...@matthewadams.me
 
 Here's a bit less philosophical, more practical description of Surefire v.
 Failsafe.
 
 Remember that if you use the maven-surefire-plugin, it's going to execute
 during the Maven test phase by default, and fail the build on errors
 _during that phase_ if any tests fail.
 
 The maven-failsafe-plugin executes during Maven's integration-test and
 validate phases.  *Remember to specify both goals!*  See
 http://maven.apache.org/surefire/maven-failsafe-plugin/usage.html and
 notice that _both_ goals, integration-test  validate, need to be
 specified.  This allows the integration tests to execute  possibly fail
 without _immediately_ failing the build.  The failing of the build happens
 via maven-failsafe-plugin during the validate phase, so that other plugins
 can clean things up during Maven's post-integration-test phase, which
 precedes validate.
 
 HTH,
 Matthew
 
 
 On Thu, Nov 14, 2013 at 4:30 PM, Matthew Adams matt...@matthewadams.me
 wrote:
 
 On Wed, Nov 13, 2013 at 10:39 AM, Ron Wheeler 
 rwhee...@artifact-software.com wrote:
 
 On 13/11/2013 11:16 AM, Matthew Adams wrote:
 
 I don't think timing should be the heuristic here.  The fact that unit
 tests take less is a result of the fact that what you're testing, aka
 the
 unit, tends to be small.  After all, a unit test should test a
 unit.
 
 So what is your definition?
 
 A unit test is test code that tests a unit in isolation.  It's
 intentionally ambiguous, because a unit is relative and may differ.
 
 
 
 An integration test, then, if I were defining it strictly, would be
 anything that's not a unit test.  In practice, this usually means
 replacing
 any mocks and/or stubs in your unit tests with the real
 implementations,
 plus using any other supporting infrastructure, like databases,
 dependency
 injection contexts, etc.
 
 Not sure that this is true for all integration tests. You may be able
 to
 test the integration of two projects (a web service and a database
 access
 layer) while still using mocks and stubs (mock of a database
 persistence
 layer).
 People frequently test with Jetty when the final project will run on
 Tomcat.
 It all depends on what part of the system integration is being tested.
 
 
 I didn't say it had to be what's used in production.  The key difference
 is that you're using _something_, in addition to the unit.
 
 -matthew
 
 
 
 
 --
 mailto:matt...@matthewadams.me matt...@matthewadams.me
 skype:matthewadams12
 googletalk:matt...@matthewadams.me
 http://matthewadams.me
 http://www.linkedin.com/in/matthewadams
 
 
 

-
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: Access denied downloading artifact from nexus

2013-11-14 Thread Russell Gold
HI David. Try accessing 
http://nexusprohost.com:8084/nexus/content/groups/cditspoc/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom
 via your browser. That will test if it is a maven problem or a nexus problem.

On Nov 14, 2013, at 4:35 PM, KARR, DAVID dk0...@att.com wrote:

 (Sorry for the initial blank body.  Not sure what happened there.)
 
 I'm having trouble downloading an artifact from a nexus pro repo in a Maven 
 build on a build server.  I don't know if this is a Maven problem, or a Nexus 
 problem, although it's probably the former.
 
 I'm working on a Maven build with several peer modules in a flat directory 
 structure.  I had to manually install one artifact to my local repo that 
 isn't available on a public repo.  It's a jar for coherence, so I don't 
 have to keep calling it the artifact.
 
 I'm now working on integrating this with a Nexus Pro repo.  I installed the 
 artifact in the repo.  I changed my settings.xml (actually doing this in a 
 separately named file first and specifying that on the command line) to add a 
 profile which references the new repository, along with a server element 
 (not in the profile) containing my login credentials.  I set that profile on 
 the command line.
 
 This is an excerpt of my build log:
 ---
 14-Nov-2013 09:50:30  [DEBUG] Using connector WagonRepositoryConnector with 
 priority 0 for http://nexusprohost.com:8084/nexus/content/groups/cditspoc as 
 myuid
 14-Nov-2013 09:50:30  Downloading: 
 http://nexusprohost.com:8084/nexus/content/groups/cditspoc/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom
 14-Nov-2013 09:50:31  
 14-Nov-2013 09:50:31  [DEBUG] Writing resolution tracking file 
 /volatile/maven/repository/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom.lastUpdated
 .
 Failed to read artifact descriptor for 
 com.oracle.coherence:coherence:jar:12.1.2-0-0: Could not transfer artifact 
 com.oracle.coherence:coherence:pom:12.1.2-0-0 from/to myrepositoryid 
 (http://nexusprohost.com:8084/nexus/content/groups/cditspoc): Access denied 
 to: 
 http://nexusprohost.com:8084/nexus/content/groups/cditspoc/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom,
  ReasonPhrase:Forbidden. - [Help 1]
 ---
 
 I've deployed this artifact to that repo, with the following coordinates:
 
 dependency
  groupIdcom.oracle.coherence/groupId
  artifactIdcoherence/artifactId
  version12.1.2-0-0/version
  typepom/type
 /
 
 
 My settings.xml specifies the .../cditspoc repository, so that part 
 obviously works.  I have a server element 
 whose id matches the repository id, and it specifies the login credentials I 
 use to log into the mavencentral site.
 
 What else could be wrong?
 
 
 
 -
 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: Access denied downloading artifact from nexus

2013-11-14 Thread Russell Gold
OK, that narrows things down. While it is possible to work with a repo that 
requires credentials to download artifacts, doing so will require you to supply 
credentials in your settings.xml. Is there some reason you want to do this? I 
know coherence is commercial rather than open-source. Are only certain 
individuals in your organization granted the right to use it?

On Nov 14, 2013, at 4:56 PM, KARR, DAVID dk0...@att.com wrote:

 -Original Message-
 From: Russell Gold [mailto:r...@gold-family.us]
 Sent: Thursday, November 14, 2013 1:44 PM
 To: Maven Users List
 Subject: Re: Access denied downloading artifact from nexus
 
 HI David. Try accessing
 http://nexusprohost.com:8084/nexus/content/groups/cditspoc/com/oracle/coheren
 ce/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom via your browser. That will
 test if it is a maven problem or a nexus problem.
 
 Oh, yeah, I forgot to report those results.
 
 When I pasted it into my browser, it prompted for credentials and then 
 presented a blank page.  That pom is not an empty file.
 
 I then tried the following command line on my laptop (not on the build 
 server):
 
 % wgetcat --user=myuid --password=mypassword 
 http://nexusprohost.com:8084/nexus/content/groups/cditspoc/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom
 --2013-11-14 09:47:21--  
 http://nexusprohost.com:8084/nexus/content/groups/cditspoc/com/oracle/coherence/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom
 Resolving nexusprohost.com (nexusprohost.com)... ipaddress
 Connecting to nexusprohost.com (nexusprohost.com)|ipaddress|:8084... 
 connected.
 HTTP request sent, awaiting response... 401 Unauthorized
 Reusing existing connection to nexusprohost.com:8084.
 HTTP request sent, awaiting response... 403 Forbidden
 2013-11-14 09:47:27 ERROR 403: Forbidden.
 -
 
 On Nov 14, 2013, at 4:35 PM, KARR, DAVID dk0...@att.com wrote:
 
 (Sorry for the initial blank body.  Not sure what happened there.)
 
 I'm having trouble downloading an artifact from a nexus pro repo in a Maven
 build on a build server.  I don't know if this is a Maven problem, or a Nexus
 problem, although it's probably the former.
 
 I'm working on a Maven build with several peer modules in a flat directory
 structure.  I had to manually install one artifact to my local repo that
 isn't available on a public repo.  It's a jar for coherence, so I don't
 have to keep calling it the artifact.
 
 I'm now working on integrating this with a Nexus Pro repo.  I installed the
 artifact in the repo.  I changed my settings.xml (actually doing this in a
 separately named file first and specifying that on the command line) to add a
 profile which references the new repository, along with a server element
 (not in the profile) containing my login credentials.  I set that profile on
 the command line.
 
 This is an excerpt of my build log:
 ---
 14-Nov-2013 09:50:30[DEBUG] Using connector WagonRepositoryConnector
 with priority 0 for
 http://nexusprohost.com:8084/nexus/content/groups/cditspoc as myuid
 14-Nov-2013 09:50:30Downloading:
 http://nexusprohost.com:8084/nexus/content/groups/cditspoc/com/oracle/coheren
 ce/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom
 14-Nov-2013 09:50:31
 14-Nov-2013 09:50:31[DEBUG] Writing resolution tracking file
 /volatile/maven/repository/com/oracle/coherence/coherence/12.1.2-0-
 0/coherence-12.1.2-0-0.pom.lastUpdated
 .
 Failed to read artifact descriptor for
 com.oracle.coherence:coherence:jar:12.1.2-0-0: Could not transfer artifact
 com.oracle.coherence:coherence:pom:12.1.2-0-0 from/to myrepositoryid
 (http://nexusprohost.com:8084/nexus/content/groups/cditspoc): Access denied
 to:
 http://nexusprohost.com:8084/nexus/content/groups/cditspoc/com/oracle/coheren
 ce/coherence/12.1.2-0-0/coherence-12.1.2-0-0.pom, ReasonPhrase:Forbidden. -
 [Help 1]
 ---
 
 I've deployed this artifact to that repo, with the following coordinates:
 
 dependency
 groupIdcom.oracle.coherence/groupId
 artifactIdcoherence/artifactId
 version12.1.2-0-0/version
 typepom/type
 /
 
 
 My settings.xml specifies the .../cditspoc repository, so that part
 obviously works.  I have a server element
 whose id matches the repository id, and it specifies the login credentials
 I use to log into the mavencentral site.
 
 What else could be wrong?
 
 
 
 -
 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: maven-failsafe-plugin: what is it actually intended for?

2013-11-13 Thread Russell Gold
Hi James,

Start with the basic Agile presumption about unit tests: they are very fast 
(you should be able to run about 100 unit tests in a second), so that you don’t 
mind running them with every compile, and must always run at 100% before 
checkin. Integration tests are pretty much anything else. They generally 
involve I/O, complex processes, interaction with other systems, but most 
importantly: they are frequently comprehensive and slow (so that you don’t want 
to run them every time), and most significantly, you can define them so that 
they don’t always have to pass.

It is this last aspect that explains the use of two separate goals. One one of 
integration tests is to give developers something to aim for. While unit tests 
are written by developers as they add features, integration tests can be 
designed by testers from requirements before the relevant features are ready. 
In this way, they can act as a measure of how much work still needs to be done. 
In theory, if your testers are fast enough, you could define “done” as 
happening when the integration tests pass at 100%.

If you’re interested, I explain this in the final section of my maven video 
course (see my sig)

Regards,
Russ

On Nov 13, 2013, at 10:20 AM, James Green james.mk.gr...@gmail.com wrote:

 I love the FAQ entry that states that it is intended for running
 integration tests.
 
 The next entry should read: What do you call an integration test?
 
 I've asked around and no-one comes up with a consistent answer. I guess it
 depends on what is executing the integration test. In this case maven is
 invoking someone after the packaging phase so should I expect to run tests
 against the packaged binary artefact? Is that the purpose here?
 
 Thanks,
 
 James

-
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: best way to attach source for debugging maven plugin

2013-11-05 Thread Russell Gold
Bringing in the source should be a function of your editor. What are you using? 
It works fine for me in IntelliJ

- Russ

On Nov 5, 2013, at 6:09 PM, Steve Cohen sco...@javactivity.org wrote:

 On 11/05/2013 04:22 PM, Olivier Lamy wrote:
 Use mvnDebug cli instead of mvn
 
 --
 Olivier
 On Nov 6, 2013 8:09 AM, Steve Cohen sco...@javactivity.org wrote:
 
 I have a need to debug the maven-assembly-plugin which is not functioning
 correctly.  I have found the instructions for setting up a debugging
 environment for maven itself within eclipse.
 
 What is the best way to get the source for this plugin so that it can be
 used by the debugging process.  I know I can download it from svn, and
 attach in Eclipse, but is there a maven command to do that?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 Thanks, I am using the mvnDebug cli.  That does seems to bring in the Maven 
 (core and plugin source) but it does not bring in the source for the Codehaus 
 Plexus stuff called by the plugin, which I also need to see for this 
 debugging.
 
 -
 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/!









Simplified syntax?

2013-11-01 Thread Russell Gold
Has there been any discussion to consider simplifying the syntaxof pom 
files, such as allowing them to be written in JSON?
-
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: How can I force a Maven task to depend on other Maven tasks?

2013-10-31 Thread Russell Gold
‘mvn test’ should compile any code that needs to be compiled. It sounds as 
though you might have intermittent tests. Can you show us a log of such a test 
run followed by a “compile test” run?

- Russ

On Oct 31, 2013, at 11:00 AM, Andrew Pennebaker apenneba...@42six.com wrote:

 When I run `mvn test`, I sometimes get misleading reports (all unit tests
 pass), when in fact, upon manually recompiling the code with `mvn compile`
 and running `mvn test` again, the new code shows test failures.
 
 Is this normal behavior for a Maven project? How can I force a Maven task
 to depend on other Maven tasks?
 
 -- 
 Cheers,
 
 Andrew Pennebaker
 apenneba...@42six.com

-
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: How can I force a Maven task to depend on other Maven tasks?

2013-10-31 Thread Russell Gold
No need to specify. Any plugins bound to generate-sources will run before the 
compile phase. Are you using custom plugins? Multiple modules?

Maybe show us your pom?

On Oct 31, 2013, at 11:23 AM, Andrew Pennebaker apenneba...@42six.com wrote:

 It sounds as though you might have intermittent tests.
 
 
 Good guess, but no. In my case, I had refactored the arity of some
 constructors, without updating all the code calling the constructors. On my
 machine, `mvn test` showed everything passing. Wasn't until a coworker ran
 `mvn test` on her computer that we saw a test failure.
 
 Also, on her computer, `mvn install` failed due to missing generated
 sources. Would be nice if I could specify in the pom that the
 `generate-sources` task is required before `mvn compile`.
 
 I'd like Maven tasks to work more like Make tasks, so that everything
 downstream gets updated based on upstream file changes.
 
 -- 
 Cheers,
 
 Andrew Pennebaker
 apenneba...@42six.com

-
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: Best Practice for testing code that uses provided dependencies

2013-10-27 Thread Russell Gold
I’m actually running into the same issue, and my plan was s to take advantage 
of the situation to provide test versions of the classes. What I found was that 
the “provided” dependency wound up in the test class path.

So I think that the fact that it is provided should have no impact on how you 
test it.

- Russ

On Oct 27, 2013, at 7:22 PM, Ron Wheeler rwhee...@artifact-software.com wrote:

 We have code that depends on provided libraries.
 
 What is the best way to test the code?
 
 I don't particularly want to add the shared libraries to the project since 
 they are large and will add a big load into the SCM and make it hard to check 
 out the project.
 
 Can I add the dependency twice, once as provided and once as test?
 Any comments or suggestions?
 
 Ron
 
 -- 
 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
 

-
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: Best Practice for testing code that uses provided dependencies

2013-10-27 Thread Russell Gold

On Oct 27, 2013, at 9:38 PM, Ron Wheeler rwhee...@artifact-software.com wrote:

 On 27/10/2013 7:59 PM, Russell Gold wrote:
 I’m actually running into the same issue, and my plan was s to take 
 advantage of the situation to provide test versions of the classes. What I 
 found was that the “provided” dependency wound up in the test class path.
 
 So I think that the fact that it is provided should have no impact on how 
 you test it.
 I am not sure what you mean.
 If scope is provided, does that mean that you have to add the jar to the 
 project?

 Or does provided turn out to be like compile when the tests are run?

Yes; if scope is “provided”, maven will make sure the jar is available on the 
compile class path as well as the test compile and test run class paths; 
however, anything that depends on your module will not inherit the dependency 
transitively, I believe (although I have tried this) that if you use an 
assembly plugin to package your project, it will ignore the provided 
dependency. I’m not sure what you mean by “add the jar to the project.”

 
 I guess that Eclipse does not understand that. It can not resolve the 
 imports. Not really a maven problem

It seems to work in IntellijIDEA, though.

 
 
 - Russ
 
 On Oct 27, 2013, at 7:22 PM, Ron Wheeler rwhee...@artifact-software.com 
 wrote:
 
 We have code that depends on provided libraries.
 
 What is the best way to test the code?
 
 I don't particularly want to add the shared libraries to the project since 
 they are large and will add a big load into the SCM and make it hard to 
 check out the project.
 
 Can I add the dependency twice, once as provided and once as test?
 Any comments or suggestions?
 
 Ron
 
 -- 
 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
 
 -
 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/!
 
 
 
 
 
 
 
 
 
 
 -- 
 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

-
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: how to convert unique snaphot into non-unique snaphot on downloading from nexus

2013-10-26 Thread Russell Gold
Hi sahil,

That’s not exactly what I meant. How are your repository tags set up? How is 
your nexus repo configured? Are you certain than Maven is treated snapshots as 
snapshots rather than releases? What commands are you using to upload them? 
Maven should not actually be aware of the time stamps if configured properly, I 
believe. At least not in any way that the user should notice.

Thanks,
Russ

On Oct 25, 2013, at 4:52 PM, sahil_tech sahilaggarwal1...@gmail.com wrote:

 Hi Russell,
 I am using maven version 3 and I have configured the maven jobs in Hudson
 (mvn clean deploy) to deploy the unique snapshots artifacts into a nexus
 hosted repository and for that I have configured distribution management tag
 in project parent pom.xml. 
 I am using maven-war-plugin to collect all artifact dependencies, classes
 and resources of the web application and packaging them into a web
 application archive. But, now while packaging I am getting snapshot
 dependencies with timestamp in WEB-INF/lib of war file. 
 To copy the flex artifacts (swf artifact) into my gui war project, I am
 using org.sonatype.flexmojos:flexmojos-maven-plugin: copy-flex-resources
 during process-resource phase. But, it again copying flex artifacts with
 timestamp.
 
 
 
 
 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/how-to-convert-unique-snaphot-into-non-unique-snaphot-on-downloading-from-nexus-tp5773312p5773845.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/!









Adding to Books on Maven?

2013-10-25 Thread Russell Gold
How does one get added to the list of available Maven publications on the site 
(http://maven.apache.org/articles.html)?
-
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: how to convert unique snaphot into non-unique snaphot on downloading from nexus

2013-10-25 Thread Russell Gold
Can you explain how you are copying the artifacts currently? You say that your 
dependencies are being packaged with a timestamp. How are you doing this? And 
then you say that you are copying the flex artifact with a plugin. What plugin 
is that?

I think that you need to explain a bit more what is going on, here.

- Russ

On Oct 18, 2013, at 10:45 AM, sahil_tech sahilaggarwal1...@gmail.com wrote:

 Hi,
 I am building snapshots artifacts in CI tool Hudson and deploying them into
 nexus using distribution management in my pom.xml and Snapshot is getting
 replaced by timestamp in final artifact name on uploading into nexus because
 non-unique snapshots are no more valid in maven 3, that is fine.
 
 Also, on looking for dependency in nexus repo, it always fetch the latest
 snapshot artifact as I can see the time stamp and build number in debug
 logs.
 
 But, now the problem that I am facing.
 
 1. in WEB-INF/lib of war file.. dependencies are packaging with timestamp.
 2. In my project, I am using plugin to copy flex code into my war file but
 that again copy the flex artifact with timestamp. But, I have hard coded the
 artifact name in my jsp as gui-flex-14.0-SNAPHOT.swc. Due to this I am
 getting blank screen.
 
 So, please let me know is there any way to convert unique snapshot artifacts
 into non-unique on downloading from nexus. 
 
 In simple words, I am proposing that the Maven client download a snapshot
 artifact named A-1.0.0-20110302.160157-17.jar and then rename it to
 A-1.0.0-SNAPSHOT.jar when it stores the file locally.
 
 
 
 
 
 
 
 
 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/how-to-convert-unique-snaphot-into-non-unique-snaphot-on-downloading-from-nexus-tp5773312.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: Maven - slf4j noclassdeffound error

2013-10-24 Thread Russell Gold
Did you by any chance install using apt-get? I've seen a number of cases where 
doing so leads to errors like this. Try installing manually from the website.

On Oct 24, 2013, at 12:31 AM, gunrock seenu gunrockse...@gmail.com wrote:

 ~/M101J$ mvn --version
 Apache Maven 3.0.4
 Maven home: /usr/share/maven
 Java version: 1.7.0_40, vendor: Oracle Corporation
 Java home: /usr/lib/jvm/jdk1.7.0_40/jre
 Default locale: en_US, platform encoding: UTF-8
 OS name: linux, version: 3.8.0-31-generic, arch: amd64, family: unix
 
 
 strange thing I observed is when I went on the command line and invoke mvn
 compile , it failed with
 
 ~/M101J/src/main/java/com/tengen/HelloWorldSparkStyle.java:[19,10] error:
 annotations are not supported in -source 1.3
 
 made me think what if I generated the project from intellij - this time it
 worked. I had previously generated the project directly on command line and
 imported it into intelliJ and that seem to be the reason why it was not
 working well.
 
 thank you all for your pointers. this one stumps me.

-
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: Getting restSQL to work with maven

2013-10-24 Thread Russell Gold
Hi Robert,

Did you add this to your POM? If so, Eclipse should try to download the jar 
from maven central into your local repo. If you didn't, just putting it in the 
repo probably won't do much.

- Russ

On Oct 24, 2013, at 5:47 PM, Robert Dailey wrote:

 So my goal right now is to generate an Eclipse project for my maven
 project. I successfully have done this using:
 
 mvn eclipse:eclipse
 
 Now in my Activator.java file I am adding a new dependency:
 
 import org.restsql.core.Config;
 
 Eclipse tells me it cannot resolve org.restsql. So what I did was
 use install:install-file to install restSQL:
 
 mvn install:install-file
 -Dfile=C:\Users\rdailey\Downloads\restsql-0.8.6.jar
 -DgroupId=org.restsql -DartifactId=restsql -Dversion=0.8.6
 -Dpackaging=jar
 
 This seems to have gone well:
 
 [INFO] --- maven-install-plugin:2.5.1:install-file (default-cli) @
 repository ---
 [INFO] pom.xml not found in restsql-0.8.6.jar
 [INFO] Installing C:\Users\rdailey\Downloads\restsql-0.8.6.jar to
 C:\maven-repo\org\restsql\restsql\0.8.6\restsql-0.8.6.jar
 [INFO] Installing
 C:\Users\rdailey\AppData\Local\Temp\mvninstall5055305258717126807.pom
 to C:\maven-repo\org\restsql\restsql\0.8.6\restsql-0.8.6.pom
 
 Now when I go back to my eclipse project, it still can't resolve it.
 Am I missing something? If it's in the repo now, shouldn't it resolve?
 
 -
 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: Blacklisting during Dependency Location

2013-10-23 Thread Russell Gold
Hi Robert,

In all of the repositories I've seen, you never had to login to see 
dependencies. They were always publicly readable; logging in was always just to 
control who could upload. I suspect that your repository is misconfigured.

- Russ

On Oct 23, 2013, at 12:57 AM, Robert Kuropkat rkurop...@t-sciences.com wrote:

 
 Must login to see the dependencies.  So in the settings.xml we have a 
 repositories section to define the repository location and a server 
 section to match the repository id with a username and password.
 
 Robert
 
 
 On 10/23/2013 12:06 AM, Russell Gold wrote:
 Are you saying that it takes a login to see the dependencies? So once you 
 login, you are presented with a set of directories?
 
 Or possibly you are pointing to the control address rather than the 
 dependency address?
 
  - Russ
 
 On Oct 23, 2013, at 12:01 AM, Robert Kuropkat rkurop...@t-sciences.com 
 wrote:
 
 I am trying to use the site goal but some of our internal repositories are 
 getting blacklisted as being invalid.  There are no network issues, I can 
 access the repository just fine and it downloads dependencies as needed.  I 
 don't want to disable this feature.  How do I actually make it work?
 
 I have two internal nexus repositories, one works, the other doesn't.
 
 repo1 (works) - on my local laptop, mega default setup.
 
 repo2 (blacklisted) - corporate network, connected via VPN, setup like a 
 real repository.  Requires login.
 
 Everything in the output of mvn -e -X site seems to look fine clear up 
 until it says the repo is invalid and blacklisted.  The site report is 
 completed.  Going to the Dependency Location web page and clicking on the 
 link provided for the blacklisted repo pops up the exected login prompt and 
 then displays the repository.
 
 I suspect, the reason repo2 gets blacklisted by the dependency location 
 part of the site goal is because it requires a login and is not using the 
 server information in the settings.xml.
 
 While I know there is no network issue, I would not rule out repo2 being 
 malconfigured.  I just can't figure out where to start looking.
 
 As I said, I really want this feature to work so disabling it with 
 -Ddependency.locations.enabled=false is uninteresting.
 
 Robert Kuropkat
 
 
 -
 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/!
 
 
 
 
 
 
 
 
 
 
 -
 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: Maven - slf4j noclassdeffound issue

2013-10-23 Thread Russell Gold
Hi Seenu,

What does the source code look like for spark.route.RouteMatcherFactory?

- Russ

On Oct 23, 2013, at 7:52 AM, Seenu gunrockse...@gmail.com wrote:

 I am using intellij and maven, 
 
 I have used the following pom.xml : 
 
 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.0http://maven.apache.org/xsd/maven-4.0.0.xsd;
  
  modelVersion4.0.0/modelVersion 
 
  groupIdcom.tengen/groupId 
  artifactIdM101J/artifactId 
  version1.0-SNAPSHOT/version 
  packagingjar/packaging 
 
  nameM101J/name 
  urlhttp://maven.apache.org/url 
 
  properties 
project.build.sourceEncodingUTF-8/project.build.sourceEncoding 
 
  /properties 
 
  dependencies 
  dependency 
  groupIdorg.mongodb/groupId 
  artifactIdmongo-java-driver/artifactId 
  version2.11.3/version 
  /dependency 
 
 
 
  dependency 
  groupIdcom.sparkjava/groupId 
  artifactIdspark-core/artifactId 
  version1.1/version 
  /dependency 
 
dependency 
  groupIdjunit/groupId 
  artifactIdjunit/artifactId 
  version4.9/version 
  scopetest/scope 
/dependency 
 
  /dependencies 
 /project 
 
 -- 
 
 package com.tengen; 
 
 
 import spark.Request; 
 import spark.Response; 
 import spark.Route; 
 import spark.Spark; 
 
 /** 
 * Created with IntelliJ IDEA. 
 * User: seenu 
 * Date: 10/19/13 
 * Time: 7:44 PM 
 * To change this template use File | Settings | File Templates. 
 */ 
 public class HelloWorldSparkStyle { 
  public static void main(String[] args){ 
 Spark.get(new Route(/) { 
 @Override 
 public Object handle(Request request, Response response) { 
 return Hello World from Spark!;  //To change body of 
 implemented methods use File | Settings | File Templates. 
 } 
 }); 
  } 
 } 
 
 
 
 
 
 -- 
 
 
 when I run, via intellij here is what I see, 
 
 /usr/lib/jvm/jdk1.7.0_40/bin/java -Didea.launcher.port=7536 
 -Didea.launcher.bin.path=/home/sree/IDEA/idea-IC-129.1359/bin 
 -Dfile.encoding=UTF-8 -classpath 
 /usr/lib/jvm/jdk1.7.0_40/jre/lib/jfr.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/jsse.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/deploy.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/javaws.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/management-agent.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/charsets.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/jce.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/jfxrt.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/plugin.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/resources.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/rt.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext/localedata.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext/dnsns.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext/sunec.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext/zipfs.jar:/home/sree/M101J/out/production/main:/home/sree/.m2/repository/org/mongodb/mongo-java-driver/2.11.3/mongo-java-driver-2.11.3.jar:/home/sree/.m2/repository/com/sparkjava/spark-core/1.1/spark-core-1.1.jar:/home/sree/IDEA/idea-IC-129.1359/lib/idea_rt.jar
  com.intellij.rt.execution.application.AppMain 
 com.tengen.HelloWorldSparkStyle 
 Exception in thread main java.lang.NoClassDefFoundError: 
 org/slf4j/LoggerFactory 
at spark.route.RouteMatcherFactory.clinit(RouteMatcherFactory.java:27) 
at spark.Spark.init(Spark.java:299) 
at spark.Spark.addRoute(Spark.java:282) 
at spark.Spark.get(Spark.java:168) 
at com.tengen.HelloWorldSparkStyle.main(HelloWorldSparkStyle.java:18) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  
at java.lang.reflect.Method.invoke(Method.java:606) 
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) 
 Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory 
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
... 10 more 
 
 Process finished with exit code 1 
 
 
 - 
 
 
 what could be wrong here? can someone please point me whre to look? I was 
 hoping maven would put the slf4j-api into the classpath when I add dependency 
 but it is not. 
 
 Sent from my iPhone

-
Author, Getting Started with Apache Maven 

Re: Problem downloading dependencies

2013-10-22 Thread Russell Gold
Hi Robert,

I don't see the artifact you want in the repository you listed. I don't see it 
in Maven Central, either. So:

1) What makes you think such an artifact exists? It looks to me as though all 
of the spring artifacts have names beginning with spring-osgi
2) Why are you trying to use a snapshot? Prefer the releases unless you have 
some specific reason to look for unreleased features.

Regards,
Russ

On Oct 21, 2013, at 3:35 PM, Robert Dailey rcdailey.li...@gmail.com wrote:

 Hi,
 
 I'm very new to maven so I have no idea what's causing this error. I
 have a sample application and I type mvn clean install -U, which
 seems to grab all dependencies except one:
 
 [WARNING] The POM for
 org.springframework.osgi:servlet-api.osgi:jar:2.5-SNAPSHOT is missing,
 no dependency information available
 
 Because of this, building my project eventually has an error:
 
 [INFO] 
 
 [INFO] Reactor Summary:
 [INFO]
 [INFO] simple-bundle . SUCCESS [1.029s]
 [INFO] simpleweb-war . SUCCESS [2.764s]
 [INFO] simple-kar  FAILURE [3.378s]
 [INFO] simpleweb . SKIPPED
 [INFO] 
 
 [INFO] BUILD FAILURE
 [INFO] 
 
 [INFO] Total time: 7.632s
 [INFO] Finished at: Mon Oct 21 14:25:17 CDT 2013
 [INFO] Final Memory: 29M/561M
 [INFO] 
 
 [ERROR] Failed to execute goal on project simple-kar: Could not
 resolve dependencies for project com.good.server:simple-kar:pom:1.0:
 Could not find artifact
 org.springframework.osgi:servlet-api.osgi:jar:2.5-SNAPSHOT in
 repository.springsource.snapshot
 (http://repo.springsource.org/snapshot) - [Help 1]
 
 I have tried messing around with repositories in my pom.xml, but
 that doesn't seem to help. Here is my project pom.xml (for
 simple-kar). Any idea whats going on?
 
 ?xml version=1.0 encoding=UTF-8?
 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
 
groupIdcom.good.server/groupId
artifactIdsimple-kar/artifactId
version1.0/version
packagingpom/packaging
 
repositories
repository
idrepository.springsource.snapshot/id
nameSpringSource Snapshot Repository/name
urlhttp://repo.springsource.org/snapshot/url
/repository
repository
idmvnrepository/id
urlhttp://repo1.maven.org/maven2/url
!--snapshots
enabledfalse/enabled
/snapshots
releases
enabledtrue/enabled
/releases--
/repository
/repositories
 
 properties
 java.version1.7/java.version
 org.springframework.version3.1.1.RELEASE
 /org.springframework.version
 project.build.sourceEncodingUTF-8/project.build.sourceEncoding
 /properties
 
 dependencies
 dependency
 groupIdjavax.servlet/groupId
 artifactIdjavax.servlet-api/artifactId
 version3.0.1/version
 scopeprovided/scope
 /dependency
dependency
groupIdorg.springframework.osgi/groupId
artifactIdspring-osgi-web/artifactId
version1.1.2/version
/dependency
 /dependencies
 
build
plugins
plugin
groupIdorg.apache.karaf.tooling/groupId
artifactIdfeatures-maven-plugin/artifactId
version2.2.8/version
executions
execution
idcreate-kar/id
goals
goalcreate-kar/goal
/goals
configuration
 
 featuresFilesrc/main/resources/features.xml/featuresFile
/configuration
/execution
/executions
/plugin
/plugins
/build
 
 /project
 
 -
 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: passing the deployed artifact URL to another system

2013-10-22 Thread Russell Gold
HI Adam,

I'd think this would be easier to handle using the artifacts' GAV coordinates 
directly rather than the remote URL. Those should be predictable and you'd 
probably use Maven to download them anyway. So why not use the coordinates as 
your key?

- Russ

On Oct 22, 2013, at 6:10 AM, Adam Downer adam.dow...@gamesys.co.uk wrote:

 Hi Curtis,
 
 A little bit more background information. I hope this illustrates better
 what I am trying to achieve.
 
 The tool I am writing is not another repository of actual software or any
 of the information already stored in nexus (SHA1's etc.) but a database of
 extra metadata about deployable artifacts that nexus doesn't already store
 using the absolute URL as a key. It is focused on deployments of my
 companies own software. It will not be trying to store data on third party
 jars which, as you correctly point out, I can't hope to maintain an index
 for all that and with nexus running a proxy group for optimal access to
 all the external repos the devs use, the resolved download location could
 be different in each case.
 
 If I understand correctly, you are trying to derive a remote repository
 path from a GAV. Is that correct? Firstly, I will second what Stephen
 pointed out: the deploy path (i.e., for upload) is not the same thing as
 the resolution path (i.e., for downloading again later). I am guessing
 your
 application actually cares about where these artifacts (and their POMs)
 can
 be downloaded, rather than what path was actually used at deploy time.
 
 If so, is there something wrong with simply having a hardcoded list of
 repository base URLs, from which you can scan for the GAVs? That's pretty
 much what Maven does with its repositories elements.
 
 If by remote repository path you mean maven central or other externally
 host location, no I am not trying to do that. This is only for my locally
 hosted internal release repository which contains a finite set of known
 projects. I don't really want to guess at the path based on GAV as I will
 have to make assumptions about the repo location which means hard coding
 it which, in turn, means more maintenance should I change the nexus
 service in some way. As I see it, the maven deploy has code takes all this
 into account when it is building the artifact. So I don't want to reinvent
 the wheel, just take advantage of code that already does what I want, but
 doesn't expose it in a way I can currently use.
 
 The tools database will contain the fully resolved nexus URL of an
 artefact:
 http://nexus.mycompany/content/repositories/repo_name/group/artifact/versio
 n/artifact.jar
 
 Not an interpreted route to the artefact:
 http://nexus.mycompany/service/local/artifact/maven/resolve?g=groupa=artif
 actv=1.2.3r=repo_namee=jar
 
 The absolute URL of the artefact is used by our deployment scripts to
 download the artefact it wants to deploy. I am going to make our
 deployment scripts query the new application to check for certain flags
 (smoke tested, etc.) before allowing the deploy to proceed.
 
 
 To that end I need to populate the database as new items get built. My
 thought was to use maven to do this as (at build time) maven knows the
 absolute URL of the artifact. Or at least it gives the impression it does
 as it displays it in the console during the deploy phase.
 
 [INFO] [deploy:deploy {execution: default-deploy}]
 [INFO] Retrieving previous build number from deploy-snapshots
 Uploading:
 
 http://nexus.mycompany/content/repositories/repo_name/group/artifact/versi
 o
 n/artifact.jar
 
 
 If there is an alternative way to achieve this I am open to any
 suggestions. For instance maybe I should write a script which runs from
 the nexus box and fires off constructed URLs to a rest endpoint as the
 file system changes. But this doesn't seem as elegant a solution as a
 maven based one.
 
 Regards
 
 Adam D
 
 
 -
 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: passing the deployed artifact URL to another system

2013-10-22 Thread Russell Gold
individual timestamped snapshots? No. 

I clearly do not understand your goals, here. In general, you cannot get at 
older snapshots via maven, so I don't understand why keeping information on it 
is useful.

Regards,
Russ

On Oct 22, 2013, at 9:39 AM, Adam Downer adam.dow...@gamesys.co.uk wrote:

 Hi Russ,
 Can you specify individual timestamped snapshots in a GAV based request?
 
 Anders,
 I will look into the nexus pro/plugin | Artifactory route, thanks.
 
 Regards
 
 Adam D
 
 
 On 22/10/2013 13:13, Russell Gold r...@gold-family.us wrote:
 
 HI Adam,
 
 I'd think this would be easier to handle using the artifacts' GAV
 coordinates directly rather than the remote URL. Those should be
 predictable and you'd probably use Maven to download them anyway. So why
 not use the coordinates as your key?
 
 - Russ
 
 On Oct 22, 2013, at 6:10 AM, Adam Downer adam.dow...@gamesys.co.uk
 wrote:
 
 Hi Curtis,
 
 A little bit more background information. I hope this illustrates better
 what I am trying to achieve.
 
 The tool I am writing is not another repository of actual software or
 any
 of the information already stored in nexus (SHA1's etc.) but a database
 of
 extra metadata about deployable artifacts that nexus doesn't already
 store
 using the absolute URL as a key. It is focused on deployments of my
 companies own software. It will not be trying to store data on third
 party
 jars which, as you correctly point out, I can't hope to maintain an
 index
 for all that and with nexus running a proxy group for optimal access to
 all the external repos the devs use, the resolved download location
 could
 be different in each case.
 
 If I understand correctly, you are trying to derive a remote repository
 path from a GAV. Is that correct? Firstly, I will second what Stephen
 pointed out: the deploy path (i.e., for upload) is not the same thing
 as
 the resolution path (i.e., for downloading again later). I am guessing
 your
 application actually cares about where these artifacts (and their POMs)
 can
 be downloaded, rather than what path was actually used at deploy time.
 
 If so, is there something wrong with simply having a hardcoded list of
 repository base URLs, from which you can scan for the GAVs? That's
 pretty
 much what Maven does with its repositories elements.
 
 If by remote repository path you mean maven central or other externally
 host location, no I am not trying to do that. This is only for my
 locally
 hosted internal release repository which contains a finite set of known
 projects. I don't really want to guess at the path based on GAV as I
 will
 have to make assumptions about the repo location which means hard coding
 it which, in turn, means more maintenance should I change the nexus
 service in some way. As I see it, the maven deploy has code takes all
 this
 into account when it is building the artifact. So I don't want to
 reinvent
 the wheel, just take advantage of code that already does what I want,
 but
 doesn't expose it in a way I can currently use.
 
 The tools database will contain the fully resolved nexus URL of an
 artefact:
 
 http://nexus.mycompany/content/repositories/repo_name/group/artifact/vers
 io
 n/artifact.jar
 
 Not an interpreted route to the artefact:
 
 http://nexus.mycompany/service/local/artifact/maven/resolve?g=groupa=art
 if
 actv=1.2.3r=repo_namee=jar
 
 The absolute URL of the artefact is used by our deployment scripts to
 download the artefact it wants to deploy. I am going to make our
 deployment scripts query the new application to check for certain flags
 (smoke tested, etc.) before allowing the deploy to proceed.
 
 
 To that end I need to populate the database as new items get built. My
 thought was to use maven to do this as (at build time) maven knows the
 absolute URL of the artifact. Or at least it gives the impression it
 does
 as it displays it in the console during the deploy phase.
 
 [INFO] [deploy:deploy {execution: default-deploy}]
 [INFO] Retrieving previous build number from deploy-snapshots
 Uploading:
 
 
 http://nexus.mycompany/content/repositories/repo_name/group/artifact/ver
 si
 o
 n/artifact.jar
 
 
 If there is an alternative way to achieve this I am open to any
 suggestions. For instance maybe I should write a script which runs from
 the nexus box and fires off constructed URLs to a rest endpoint as the
 file system changes. But this doesn't seem as elegant a solution as a
 maven based one.
 
 Regards
 
 Adam D
 
 
 -
 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: Blacklisting during Dependency Location

2013-10-22 Thread Russell Gold
Are you saying that it takes a login to see the dependencies? So once you 
login, you are presented with a set of directories?

Or possibly you are pointing to the control address rather than the dependency 
address?

 - Russ

On Oct 23, 2013, at 12:01 AM, Robert Kuropkat rkurop...@t-sciences.com wrote:

 
 I am trying to use the site goal but some of our internal repositories are 
 getting blacklisted as being invalid.  There are no network issues, I can 
 access the repository just fine and it downloads dependencies as needed.  I 
 don't want to disable this feature.  How do I actually make it work?
 
 I have two internal nexus repositories, one works, the other doesn't.
 
 repo1 (works) - on my local laptop, mega default setup.
 
 repo2 (blacklisted) - corporate network, connected via VPN, setup like a real 
 repository.  Requires login.
 
 Everything in the output of mvn -e -X site seems to look fine clear up until 
 it says the repo is invalid and blacklisted.  The site report is completed.  
 Going to the Dependency Location web page and clicking on the link provided 
 for the blacklisted repo pops up the exected login prompt and then displays 
 the repository.
 
 I suspect, the reason repo2 gets blacklisted by the dependency location part 
 of the site goal is because it requires a login and is not using the server 
 information in the settings.xml.
 
 While I know there is no network issue, I would not rule out repo2 being 
 malconfigured.  I just can't figure out where to start looking.
 
 As I said, I really want this feature to work so disabling it with 
 -Ddependency.locations.enabled=false is uninteresting.
 
 Robert Kuropkat
 
 
 -
 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/!









  1   2   3   >