Re: Browsing Maven central buggy?

2024-01-24 Thread John Patrick
search.maven.org also has bugs often and sometimes misses releases in the
search index
also the new sonatype seams very slow and sluggish when trying to use and
often doesn't find things i would expect the previous search to find. i.e.
when using the fully qualified class search
in my view, we need to stop using central as a dumping group and have
something like linux, where it's index by java version or maven major/minor
version, so active projects republish, and dead ld dependencies can be
archieved, and if you need to mirror or proxy central it's a leaner
repository
John


On Wed, 24 Jan 2024 at 17:36, Manfred Moser  wrote:

> Well.. you cant really just show this video without pointing to more
> help. So to get started ...
>
> https://github.com/maveniverse/mima
>
> used with
>
> https://www.jbang.dev/
>
> Any other tips Tamas?
>
> Manfred
>
>
> On 2024-01-24 09:22, Tamás Cservenák wrote:
> > Or something like this:
> > https://asciinema.org/a/0dLOAfWxyxTg6zgcYSDX6FQwm
> >
> > ;)
> >
> > T
> >
> > On Wed, Jan 24, 2024 at 6:13 PM Manfred Moser 
> > wrote:
> >
> >> I suggest to use the maintained search and browse frontend from Sonatype
> >> instead.
> >>
> >> https://search.maven.org/ .. same as https://central.sonatype.com/
> >>
> >> And browse at https://central.sonatype.com/search
> >>
> >> It sits on top of the same data and is very nice indeed .. props to
> >> Brian Fox and team btw!
> >>
> >> Manfred
> >>
> >> On 2024-01-24 08:57, Tamás Cservenák wrote:
> >>> Howdy,
> >>>
> >>> Yes, this is a known problem, but it does not affect Maven, as it does
> >> not
> >>> "browse".
> >>> Basically you have to go directly to the directory you are looking for,
> >> and
> >>> not rely on HTML "index page" as that seems not maintained since a
> while.
> >>>
> >>> T
> >>>
> >>> On Wed, Jan 24, 2024 at 5:50 PM Thorsten Heit 
> >> wrote:
>  Hi,
> 
>  browsing Maven Central using a webbrowser seems, well, a bit buggy:
> 
>  In https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-bom/
>  for example I only see versions 2.x up to 2.22.0 and 3.0.0-alpha1
>  whereas 2.22.1 and 3.0.0-beta1 both exist; they are simply not
> visible.
> 
>  The same happens for a few other GAV coordinates such as
>  https://repo1.maven.org/maven2/org/apache/tika/tika-bom/3.0.0-BETA/
> or
> 
> 
> >>
> https://repo1.maven.org/maven2/me/qoomon/maven-git-versioning-extension/9.7.0
>  :
>  The directories exist, but one level above these versions are not
> shown.
> 
>  Is this a known problem?
> 
> 
>  Thorsten
> 
>  -
>  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: Can the jar plugin respect .gitignore?

2023-11-11 Thread John Patrick
my .gitignore includes target, so that would probably cause more issues
with the assembly plugin.


On Fri, 10 Nov 2023 at 21:34,  wrote:

> I think there are two issues with this, first of all git is not the only
> SCM, so why prefer it’s file.
>
> But secondly it is very common that binary result artifacts are git
> ignored and exactly the stuff you want to package. For example target/
>
> Are you thinking about -src archives, only?
>
> Having said that, supporting the file format and patterns might be a good
> idea (if it can be sorted out which directory level should be relevant) and
> having a easy way to enable .*ignore.
>
> Joseph Kessselman wrote on 10. Nov 2023 19:42 (GMT +01:00):
>
> > (Or, equivalently be told to take exclude list from a file in .gitignore
> > syntax and then be told .gitignore was that file.)
> >
> > If not, I'd consider that worth adding.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Maven slow

2023-04-06 Thread John Patrick
 Hi Tommy,

Maybe look at setting up
https://github.com/khmarbaise/maven-buildtime-profiler to see if you can
see where the time is being spent or not being spent.

On Thu, 6 Apr 2023 at 16:29, François Guillot 
wrote:

> Hi
>
> Disclaimer: I'm a engineer @ Gradle
>
> You can also try the Gradle Enterprise Maven extension (
> https://docs.gradle.com/enterprise/maven-extension/)
> Or the new Maven Cache extension
> https://maven.apache.org/extensions/maven-build-cache-extension/
> to benefit from build caching for some goal executions of your project.
>
> I won't dive here into a comparison between the two. Just wanted to share
> this for awareness.
>
> François
>
> Le jeu. 6 avr. 2023, 17:23, Mantas Gridinas  a écrit
> :
>
> > Well maven still has to go through all the lifecycle, which involves
> > generating resources, compiling, packaging, running tests, checking
> > snapshots, etc. So depending on your plugin, repository configuration you
> > could get faster/slower subsequent builds. Unlike gradle, maven doesn't
> > cache steps so the slowness is mostly due to having to go through the
> > lifecycle.
> >
> > As far as I remember, the mailing list mentioned the takari lifecycle
> which
> > changes a bit how maven works. You might want to experiment with it.
> > http://takari.io/book/40-lifecycle.html
> >
> >
> > On Thu, Apr 6, 2023, 18:15 Tommy Svensson  wrote:
> >
> > > Hello maven users,
> > >
> > > I have an observation that does not make sense to me:
> > >
> > > I have a multi module build of about 5 modules.
> > >
> > > I do an "mvn clean install" and it takes 43 seconds.
> > >
> > > I then do an "mvn install" and it takes 43 seconds !
> > >
> > > The second time everything was already built, so no compilation at all
> > > should have been done. So why does it still take 43 seconds ? I can do
> > "mvn
> > > install" over and over again and it takes 43 seconds. No diff between
> > "mvn
> > > clean install" and "mvn install" when everything is already built.
> > >
> > > Is the compile so extremely fast that it doesn't even take a second
> while
> > > everything else maven does takes 43 seconds ?
> > >
> > > I have a Mac M1 with 10 cores and 64 GB of memory (and no buss,
> processor
> > > and memory in same chip). The maven speed difference between my machine
> > and
> > > the work machine (Intel I5 2 cores and 8GB memory) doesn't really
> differ
> > > that much. That is with maven. For other things there is a big
> > difference.
> > >
> > > Is there any good explanation for this ? I have used maven for a very
> > long
> > > time and this is the first time I have noticed this. New faster
> machines
> > > have always improved build speed before.
> > >
> > > I'm running Apache Maven 3.8.5
> (3599d3414f046de2324203b78ddcf9b5e4388aa0)
> > > That is what the latest version of IDEA gives me.
> > >
> > >
> > > BR,
> > > Tommy Svensson
> > >
> > >
> > >
> > >
> >
>


Maven Wrapper merge issues during release

2022-06-27 Thread John Patrick
Anyone having issues with maven wrapper, when you upgrade the jar as part
of a release?

i.e.
develop branch
.mvn/wrapper/maven-wrapper.jar is 3.1.1

main branch
.mvn/wrapper/maven-wrapper.jar is 3.1.0

I'm using gitflow-maven-plugin (
https://github.com/aleksandr-m/gitflow-maven-plugin) but the merge fails as
the jar is being locked by the running process...

The solution i've got is to do manual commit to main with updated
maven-wrapper.jar, then try the release again.

Anyone else seen this issue or got a better work around?

John


Re: [ANN]switch from maven to gradle

2022-06-15 Thread John Patrick
Looking at the Snyk Java/JVM ecosystem report 2018 vs 2021, the usage of
Maven is growing still. But yes Gradle growth also grew over the same
period.

2018
- Maven 68%
- Gradle 16%

2021
- Maven 76%
- Gradle 38%

Sources;
https://snyk.io/blog/jvm-ecosystem-report-2018/
https://snyk.io/jvm-ecosystem-report-2021/

Their are also several posts of people moving back to Maven after migrating
to Gradle, see;
https://phauer.com/2018/moving-back-from-gradle-to-maven/

Also I think build tooling is, love it or hate it. I've tried Gradle a few
times but keep coming back to Maven. You get this constantly with lots of
Languages, when will X die, when will Y replace X. Usually people doing
click bate, but after those initial posts they go quite...

John
Maven user since 2004
- It has issues but I prefer these issues over Gradle's.


On Tue, 14 Jun 2022 at 20:59, Andres Almiray  wrote:

> Hi Manuel, welcome to the list.
> Please find answers inlined.
>
> Sent from my primitive tricorder
>
> > On 14 Jun 2022, at 20:10, Manuel Dahmen  wrote:
> >
> > hello,
> > switch from maven to gradle, publish on maven central, is it possible
> from
> > maven?
>
> Yes, it’s possible to switch a project built with Maven to be built with
> Gradle instead. Both build tools offer similar capabilities yet in
> different fashions.
>
> To be fair there’s no 100% automatic, fool-proof way to translate a Maven
> project into a Gradle one due to differences in their models and how
> plugins work. You can try invoking “gradle init” at the root of your
> project then manually edit the generated Gradle files til you get wat you
> need. For this to work you need to know Gradle well.
>
> Gradle can publish artifacts to Maven Central, there are 3rd party plugins
> that take care of that, of which the most popular appears to be
> https://plugins.gradle.org/plugin/io.github.gradle-nexus.publish-plugin
>
> > when will maven be replaced by gradle?
>
> That’s a very broad question but the answer is likely never. If the
> intention of the question is to find out if Maven will be replaced as the
> dominant build tool then the answer is no, not going to happen any time
> soon. An organization/company may deem necessary to make the switch which
> takes lots of effort, there’s no “try me” option, you must complete the
> switch to the best of your abilities in order to measure if making the
> switch was worth it. Chicken-egg problem.
>
> > I m trying to implement a Java desktop /android app. with a common
> library.
> > The basic idea is to name a class or interface wrapper with custom
> > implementations. which are not treated by jdk or Android sdk, I think.
> > But ui are custom too, like  ImageIO or Bitmap, awt Color and android
> Color.
>
> If you’re building a multi-project build with at least one Android
> component then that means you must use Gradle. Why bring Maven into the mix?
>
> > I think it s complicated, where could I find resources on this theme?
>
> Most likely at the Gradle doc site. Also, join their Slack and/or forum to
> ask questions.
>
> > -- sorry for my poor English
>
> You’re doing great!


Re: Determine Maven Dependencies after a build

2022-04-13 Thread John Patrick
I don't think you can.
The only way would be to use metadata from those GAV and see when it was
released/deployed.
Of if your don't use use " -ntp,--no-transfer-progress" AND a new workspace
per build AND have that log, then you would see what if downloads.
Or you use a local/company repository manager like nexus and still have the
access logs.
Of your creating a artifact which includes it's dependencies, then either
check the dependency checksum or jar metadata

But gut tells me you can't.

John


On Wed, 13 Apr 2022 at 19:26, Creager, Greg 
wrote:

> I am trying to reproduce a build that was done a week ago. Our maven pom
> files use range in many places ([1.0,1.1), when I go look at the pom of the
> published project, it just shows the range, not the actual version chosen:
>
> Published pom:
> 
>com.hp.cp.dfe.shared
>common-types
>[1.0,1.1)
> 
>
>
> How do I determine exact versions of dependencies used in a prior build?
> In Apache ivy the published ivy.xml shows the exact version chosen, I was
> expecting maven to have the same and I am assuming I just am not using the
> right util.
>


Re: Remove SNAPSHOT from all sub-modules, but honor version

2022-04-02 Thread John Patrick
Try https://github.com/aleksandr-m/gitflow-maven-plugin
So for me dropping the -SNAPSHOT would mean I'm creating a gitflow release
branch for testing, which would be as simply using that plugin as `mvn
gitflow:release-start`.
Not tried it with different modules having different version so it might
not work.
Personally everything in the same repo having the same version number I
find easier, so if you want different modules with different versions then
I would put them if separate repositories.
Cheers,
John


On Sat, 2 Apr 2022 at 11:14, Mantas Gridinas  wrote:

> From what I gather you want versions plugin by mojohaus. "Set" goal has
> flag for removing snapshot declarations as -DremoveSnapshot.
>
> https://www.mojohaus.org/versions-maven-plugin/
>
> On Sat, Apr 2, 2022, 11:32 Mike Deitrick  wrote:
>
> > Any guidance on this matter?
> >
> > On Fri, Mar 4, 2022, 7:53 AM Mike Deitrick 
> > wrote:
> >
> > > Hello,
> > >
> > > A couple days ago I submitted a question on Stack Overflow about this
> > > topic. It can be found here
> > > <
> >
> https://stackoverflow.com/questions/71329400/remove-snapshot-from-all-maven-sub-modules-but-honor-version
> > >.
> > > For the purposes of preserving this conversation, I will also provide
> my
> > > question below, along with some things I've found along the way. The
> > > commenter mentioned that the version of all modules within a
> multi-module
> > > project should be the same to drop -SNAPSHOT with the mvn versions:set
> > command.
> > > Furthermore, a section in the POM file title Aggregation (or
> > Multi-Module)
> > >  seems
> to
> > > provide some insight into what's going on, but my inferences might be
> > > incorrect about versions needing to be consistent based on the content
> in
> > > that section.
> > >
> > > So, what is the official practice for versions of sub-modules in a
> > > multi-module project? Should all versions be the same as the version in
> > the
> > > parent POM? If it's acceptable for sub-module versions to be different,
> > how
> > > does one accomplish stripping -SNAPSHOT from all modules (preferably
> > with a
> > > Maven plugin versus running commands to iterate over all
> sub-directories
> > to
> > > find child POMs and drop -SNAPSHOT from each)?
> > >
> > > Thank you.
> > > Mike
> > >
> > > ---
> > >
> > > I am working on a multi-module project. For the purposes of this
> exercise
> > > we can assume there are two sub-modules. The articles Maven Simple
> > > Project Archetype
> > >  and
> Create
> > > an archetype from a multi-module project
> > > <
> >
> https://maven.apache.org/archetype/maven-archetype-plugin/examples/create-multi-module-project.html
> >
> > can
> > > be referenced to follow along.
> > >
> > > Parent - 1.0.0-SNAPSHOT
> > > ChildA - 1.2.3-SNAPSHOT
> > > ChildB - 1.0.0-SNAPSHOT
> > >
> > > When I run mvn versions:set -D removeSnapshot -D processAllModules I
> > > expect the versions to change as indicated below.
> > >
> > > Parent - 1.0.0
> > > ChildA - 1.2.3
> > > ChildB - 1.0.0
> > >
> > > But, it seems -SNAPSHOT is stripped from all versions except the
> children
> > > that have a different version from the parent.
> > >
> > > Parent - 1.0.0
> > > ChildA - 1.2.3-SNAPSHOT
> > > ChildB - 1.0.0
> > >
> > > Is there any way to run the mvn versions:set command to honor the
> version
> > > number, while stripping the -SNAPSHOT postfix?
> > > --
> > >
> > > *UPDATE #1*
> > >
> > > Running mvn versions:set -D removeSnapshot=true yields the same results
> > > as running mvn versions:set -D removeSnapshot -D processAllModules.
> > >
> > > Parent - 1.0.0
> > > ChildA - 1.2.3-SNAPSHOT
> > > ChildB - 1.0.0
> > >
> > >
> >
>


Re: Getting the groupid, artifact id, and version of the package under test

2022-03-30 Thread John Patrick
I would do this via a profile, default value and surefire config, so
something like;


  
withJavaAgent

  -javaagent:C:\JARS\agent.jar

  


  


  maven-surefire-plugin
  
${myJavaAgent}
-DtheGroup=${project.groupId} -DtheArtifact=${project.artifactId}
  


Then if you want to override on the command line it's; mvn test
-DmyJavaAgent="-javaagent:C:\JARS\agent.jar"
Or; mvn test -PwithJavaAgent

John


On Wed, 30 Mar 2022 at 06:45, Laurian Angelescu 
wrote:

> I am working on a Java agent that instruments test suites and the code
> under test. The agent runs by invoking the following command on the command
> line:
>
> mvn test -DargLine="-javaagent:C:\JARS\agent.jar"
>
> The apache surefire plugin takes care of running the tests and pushing the
> -DargLine argument to the test JVM.
>
> But for hierarchical projects, I believe multiple JVMs are instantiated,
> one for each child package configured with pom.xml, as *mvn test *is
> recusively invoked downstream. I would like to keep track of each such
> child by capturing in mid-flight the group id, artifact id and version if
> it's available and passing this information into the agent.
>
> Is there a way to accomplish this data capture? Assume JUnit test suites.
>


Re: question java 1.7 support

2022-03-26 Thread John Patrick
Most people and use cases have the Java Home is the same version you put in
source/target/release.

The part I was trying to highlight was, if you set release and have Java
Home and Path to Java 1.7 (as the title of the email indicates), then it
won't work, so you need to use source and target.
If it was a type and the person has Java Home and Path set to Java 17, then
use release.

Also what I posted is the text from the maven compiler plugin.


On Sat, 26 Mar 2022 at 15:05, Alexander Kriegisch 
wrote:

> John Patrick schrieb am 26.03.2022 16:12 (GMT +07:00):
>
> > I thought maven.compiler.release only supports Java 9 and newer (The
> > -release argument for the Java compiler, supported since Java9).
>
> Small correction: The javac compiler option '--release N' exists since
> JDK 9, but you can also compile to older versions. A little overview,
> quickly compiled from what I happen to have installed locally (no 12):
>
>
> javac | --release
> --|--
>9  | 6-9
>   10  | 6-10
>   11  | 6-11
>   13  | 7-13
>   14  | 7-14
>   15  | 7-15
>   16  | 7-16
>   17  | 7-17
>   18  | 7-18
>
>
> BTW, most people around here probably know, but for those who do not:
> '--release N' is **not** the same as '-source N -target N', but also
> ensures that code is cross-compiled not just to the byte code level N
> like with '-target N', but also to the exact JDK API of that version -
> basically a more user-friendly way to set an older JDK as boot classpath
> for compilation, without the need to install extra JDKs or toolchains.
> Each JDK 9+ contains a compressed set of legacy API descriptions
> utilised by '--release N'.
>
> I.e., while the compiler option really just exists since JDK 9, you can
> still target certain older bytecode and/or JDK API versions. And if you
> need really old bytecode targets in a brandnew and well-maintained
> compiler, you can use ECJ. Current version 3.29.0 still supports source
> and target versions as old as 1.3 (and of course up to 18) - a unique
> selling point in comparison to Javac.
>
> --
> Alexander Kriegisch
> https://scrum-master.de
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: question java 1.7 support

2022-03-26 Thread John Patrick
Alexander,
Your email says Java 1.7, your sdkman says 17 and your maven pom says 1.17.

I thought maven.compiler.release only supports Java 9 and newer (The
-release argument for the Java compiler, supported since Java9).

If you are wanting Java 1.7 (released July 2011) then use user properties;
1.7
1.7
also;
delete user property maven.compiler.release
from maven-compiler-plugin configuration, delete source and target.


If you want Java 17 (released September 2021), then use user property;
17
also;
delete user property maven.compiler.source
delete user property maven.compiler.target
from maven-compiler-plugin configuration, delete source and target.

John


On Sat, 26 Mar 2022 at 04:11, Olivier Lamy  wrote:

> On Sat, 26 Mar 2022 at 2:06 pm, Nils Breunese  wrote:
>
> > Olivier Lamy  wrote:
> >
> > > should be 1.7 not 1.17 ;)
> >
> > No, 1.7 is for Java 7. For Java 17 it should be just 17.
>
>
> The email subject says “ question java 1.7 support”
> But yeah should be simply 17
> Use release flag rather than sources and target
>
> >
> >
> > Nils.
> >
> > > On Sat, 26 Mar 2022 at 13:48, Alexander Ushakov <
> > > alexander.ushakov.em...@gmail.com> wrote:
> > >
> > >> Hello!
> > >>
> > >> I am trying to play with Apache Kafka and craft next pom.xml
> > >>
> > >> ```xml
> > >>
> > >>  > >> 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;>
> > >>   4.0.0
> > >>   streams.examples
> > >>   streams.examples
> > >>   0.1
> > >>   jar
> > >>   Kafka Streams Demo Application
> > >>   
> > >>
> UTF-8
> > >>  3.1.0
> > >>  1.7.7
> > >>  1.2.17
> > >>  1.17
> > >>   
> > >>   
> > >>  
> > >> apache.snapshots
> > >> Apache Development Snapshot Repository
> > >> 
> > >> https://repository.apache.org/content/repositories/snapshots/
> > >> 
> > >>false
> > >> 
> > >> 
> > >>true
> > >> 
> > >>  
> > >>   
> > >>   
> > >>  
> > >> 
> > >>org.apache.maven.plugins
> > >>maven-compiler-plugin
> > >>3.1
> > >>
> > >>   1.17
> > >>   1.17
> > >>
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >>  
> > >>   
> > >>   
> > >>  
> > >> org.apache.kafka
> > >> kafka-streams
> > >> ${kafka.version}
> > >>  
> > >>  
> > >> org.slf4j
> > >> slf4j-api
> > >> ${slf4j.version}
> > >>  
> > >>  
> > >> org.slf4j
> > >> slf4j-simple
> > >> ${slf4j.version}
> > >>  
> > >>   
> > >>
> > >> ```
> > >>
> > >> command
> > >>
> > >> ```sh
> > >> mvn clean package
> > >> ```
> > >>
> > >> results with error
> > >>
> > >> ```
> > >> [ERROR] Failed to execute goal
> > >> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
> > >> (default-compile) on project streams.examples: Fatal error compiling:
> > >> error: invalid target release: 1.17 -> [Help 1]
> > >> ```
> > >>
> > >> Java and Maven has been installed through SdkMan. Java 17.
> > >>
> > >> Can someone, please, suggest the solution?
> > >>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>


Re: Can't get Surefire to run any JUnit 5 tests

2022-03-20 Thread John Patrick
I've update my example with more of my setup
https://gist.github.com/nhojpatrick/e598205e23ff3ee226673d11bc339bf6

For your example you talk about suite, I've not used suite, based upon
jupiter and vintage, I would expect you would need to add
junit-platfore-suite-engine as a dependency so the suite engine enables and
scans for tests.

All integration tests end IT and for simplicity are under src/test/java,
all component/unit tests are also under src/test/java.

I've got both JUnit v4 and JUnit v5 unit tests and integration tests as I'm
migrating from one to the other when time allows.

I've got maven wrapper so I simply do;
./mvnw clean install

Before anyone comments, I don't do `./mvnw clean verify` because 90% of the
time it causes more issues with multimodule projects, normally when I need
to use `-rf,--resume-from`.

John



On Sun, 20 Mar 2022 at 00:45, David Karr  wrote:

> On Sat, Mar 19, 2022 at 5:06 PM Tibor Digana 
> wrote:
>
> > My advice is not to listen to everyone but rather understand how things
> > work.
> > Open this link in your browser
> > https://repo1.maven.org/maven2/org/junit/platform/
> > It is groupId of some JUnit5 artifacts.
> > Do you see junit-platform-suite-api?
> > Scroll up and you will see junit-platform-suite. What's that? It's the
> impl
> > of the api.
> > So, now you know what you miss in the dependencies.
> >
> > This way just discover the entire hierarchy in
> > https://repo1.maven.org/maven2/org/junit/ and the POMs and their
> > dependencies and transitive dependencies.
> > Then you would understand most of the typical troubles.
> > No magic, the trick is to read the content of the repo and the content of
> > POMs.
> >
> > I always have to do this when I am helping the users. All the time.
> > The job starts with this if it is a simple problem. Always the same, all
> > the time.
> >
>
> Ok, I appreciate that. However, perhaps I didn't emphasize the correct
> thing in my last response. Fixing the compile error was simple to do.  The
> last problem I have is the problem with running a component test suite from
> the command line. This is actually the first problem I was made aware of
> when I first started examining this entire functional area.
>
>
> > T
> >
> >
> >
> >
> > On Sat, Mar 19, 2022 at 10:57 PM KARR, DAVID  wrote:
> >
> > > This is progress.  I at least now see both Junit 5 and Junit 4 tests
> > > running successfully.
> > >
> > > I have a couple of related questions, one of which is likely entirely
> > > Junit-related, but which you might have run into, and the other is more
> > on
> > > Surefire.
> > >
> > > We also have some test suites, which is where we base our "component"
> and
> > > "integration" tests, neither of which run as unit tests.  I'm focusing
> in
> > > the component tests first, but I think whatever we do to fix the
> > component
> > > tests will be the same for the integration tests.
> > >
> > > With the dependencies you specified, that results in compile errors for
> > > missing classes in "org.junit.platform.suite.api.*".  That is in the
> > > "junit-platform-suite-api" dependency.  It's simple enough to include
> > that
> > > dependency, and that resolves that compile error.  I assume that's the
> > best
> > > resolution for that?
> > >
> > > Finally, the issue that is actually one of the first trouble spots we
> > > noticed, which is being able to execute test suites from the mvn
> command
> > > line.
> > >
> > > With Junit4, we would execute our component tests with just this:
> > >
> > > mvn -Dtest=ComponentTestSuite test
> > >
> > > With these new frameworks, this fails with "No tests were executed".
> I've
> > > tried numerous variations of this.
> > >
> > > The minimal class I have is this:
> > >
> > > import org.junit.platform.suite.api.SelectClasses;
> > > import org.junit.platform.suite.api.Suite;
> > >
> > > @Suite
> > > @SelectClasses(NoteResourceCT.class)
> > > public class ComponentTestSuite {
> > > }
> > >
> > > I have heard some mentions of "Tags" in Junit5 and "groups" in
> Surefire.
> > > I have experimented with those, but I still haven't gotten anything to
> > work.
> > >
> > > > -Original Message-
> > > > From: Tibor Digana 
> > > > Sent: Saturday, March 19, 2022 1:55 PM
> > > > To: Maven Users List 
> > > > Subject: Re: Can't get Surefire to run any JUnit 5 tests
> > > >
> > > > No problem, pls see the project again, there is an update.
> > > > T
> > > >
> > > > On Sat, Mar 19, 2022 at 9:32 PM KARR, DAVID  wrote:
> > > >
> > > > > One thing that I see I neglected to mention in this post, but
> which I
> > > > > did mention in the SO posting I linked to, is that I have both
> Junit5
> > > > > and
> > > > > Junit4 tests in scope.  I believe that is at least one element that
> > > > > makes this more complicated.
> > > > >
> > > > > > -Original Message-
> > > > > > From: Tibor Digana 
> > > > > > Sent: Saturday, March 19, 2022 1:27 PM
> > > > > > 

Re: Can't get Surefire to run any JUnit 5 tests

2022-03-19 Thread John Patrick
>From your stackoverflow post I move your your junit-jupiter-engine
dependency to a project dependency instead of a test dependency.
Eclipse is probably working as it's own IDE logic/dependencies/support, not
maven's.

I've also switched over to using the bom, so have config like.
https://gist.github.com/nhojpatrick/e598205e23ff3ee226673d11bc339bf6

I did have issues with surefire v2.x and early junit v5 but since surfire
v3.0.0-M2 I don't think I've had any issues.

John



On Sat, 19 Mar 2022 at 06:19, Dan Tran  wrote:

> may relate to this  https://issues.apache.org/jira/browse/SUREFIRE-2033
>
> -D
>
> On Fri, Mar 18, 2022 at 10:53 PM David Karr 
> wrote:
>
> > I, along with two other people on my team, have spent days and days now
> > trying to figure out why we cannot get Surefire to execute JUnit 5 tests.
> > We've all been working independently, so we don't all take the same path,
> > but it didn't really matter, as all three of us are pretty much stuck at
> > the same point.  We can execute JUnit 5 tests in Eclipse, but Surefire
> just
> > refuses to have anything to do with JUnit 5 tests.  We've all read
> numerous
> > threads and posts on how to do it, and it just does not work.
> >
> > Most recently, I posted this question with some details of what I had
> done
> > so far:
> >
> >
> https://stackoverflow.com/questions/71531001/why-is-surefire-not-executing-my-junit5-tests
> > .
> >
> > I have no idea whether the problems lie in JUnit 5, or in Surefire, or
> some
> > combination.  I wish I could get some debug output that told me
> SOMETHING.
> > It just does not run JUnit 5 tests.
> >
>


Re: maven cannot find symbol class EJBClientResult

2022-03-06 Thread John Patrick
Is this an old company project?
As maven-compiler-plugin is showing as v3.5.1 and that was released in Feb
2016.
Also the group id com.mypack is not in maven central so probably in an
internal company nexus or artifactory.
So you might need to search for someone who previous built it.

If you search for EJBClientResult.java within your structure do you find it?

Does `mvn clean verify -DskipTests` work? as it might be it's within a
module of your parent project.

John



On Sun, 6 Mar 2022 at 16:06, albert kao  wrote:

> My codes has these compile errors:
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
> (default-compile) on project proj2-war: Compilation failure: Compilation
> failure:
> [ERROR]
>
> /C:/proj2/proj2-parent/proj2-war/src/main/java/com/mypack/web/common/MyClass.java:[220,340]
> cannot find symbol
> [ERROR] symbol: class EJBClientResult
> [ERROR] location: package mypack.ejb.myproj2
>
> when running
>
> cd C:\proj2\proj2-parent
> mvn clean compile
>
>
>
> The missing EJBClientResult class is in the mypack.common-2021.03.jar file.
>
> Another similar project which use the same jar file compile successfully.
>
> cd C:\proj1\proj1-parent
> mvn clean compile
>
> so the same jar file is present in my maven local repository and maven is
> setup properly.
>
> I had done a "mvn clean install" for both projects.
>
> To debug, run
>
> mvn -X clean compile
>
>
> proj1-parent output:
>
> [DEBUG] com.mypack:mypack.common:jar:2021.03:compile
>
> [DEBUG] Adding URL
>
> [file:/C:/Users/ak/.m2/repository/com/mypack/mypack.common/2021.03/mypack.common-2021.03.jar]
>
> [DEBUG] (f) classpathElements
>
> C:\Users\ak\.m2\repository\com\mypack\mypack.common\2021.03\mypack.common-2021.03.jar
>
> BUILD SUCCESS
>
>
> proj2-parent output:
>
> [DEBUG] com.mypack:mypack.common:jar:2021.03:compile
>
> [DEBUG] (f) classpathElements
>
> C:\Users\ak\.m2\repository\com\mypack\mypack.common\2021.03\mypack.common-2021.03.jar
>
>
> [ERROR]
>
> /C:/proj2/proj2-parent/proj2-war/src/main/java/com/mypack/web/common/MyClass.java:[220,340]
> cannot find symbol
> [ERROR] symbol: class EJBClientResult
> [ERROR] location: package mypack.ejb.myproj2
>
>
>
> Both projects have the same dependency in the pom.xml:
>
> 
> com.mypack
> mypack.common
> 2021.03
> 
>
>
>
> How to fix this compile error?
> Please help.
> Thanks.
>


Re: Run all tests (also in dependent modules), fail build at end

2022-02-26 Thread John Patrick
So yes, using -Dmaven.test.failure.ignore=true changes the exit code from 1
to 0. So if your linking commands you might not spot a previous command
actually silently errored.
As I want jenkins to fail at that step, and not progress to subsequent
steps. Not point wasting computing resources once all compile issues are
know and all tests issues for tests that could be execute are known.
I could probably configure another plugin to parse the output and detect
that no tests have failed, but decided not to investigate that.
John

On Sat, 26 Feb 2022 at 11:41, Falko Modler  wrote:

> John, is there a reason why you don't use
> -Dmaven.test.failure.ignore=true? This has been my Jenkins setup for
> years and with that I don't need two mvn runs.
>
> Apart from that I can relate to Alexander's use case in that locally you
> simply don't have those Jenkins reporting tools, telling you which tests
> failed overall.
> This can be rather annoying, especially when building in parallel, as
> test result will be all over the place.
>
> I'm not convinced though that this should be a general mvn flag.
> Ideally, surefire chould provide something for that (e.g. an extension).
> Next best thing is a separate extension, which I think was discussed
> here before.
>
> Cheers,
>
> Falko
>
> Am 26.02.2022 um 12:18 schrieb John Patrick:
> > So I understand the option, but for the average developer understanding
> the
> > intermixed output might be a nightmare. If someone is building the code
> > they can just do -SkipTests and -fae, fix those, then go back to run the
> > tests.
> >
> > I do a similar setup on Jenkins, with this kind of Jenkinsfile structure;
> >
> > try {
> >withEnv(...)
> >  configFileProvider(...)
> >try {
> >  ./mvnw clean install -DskipTests -fae
> >} finally {
> >  ./mvnw verify -fae
> >}
> >  }
> >}
> > } finally {
> >recordIssues enabledForFailure: true, tools: [mavenConsole()]
> >recordIssues aggregatingResults: true, enabledForFailure: true, tools:
> > [java(pattern: '**/src/main/java/**')]
> >recordIssues aggregatingResults: true, enabledForFailure: true, tools:
> > [junitParser(pattern:
> > '**/target/failsafe-reports/*.xml,**/target/surefire-reports/*.xml')]
> > publishCoverage adapters:
> > [jacocoAdapter('**/target/site/jacoco/jacoco.xml')]
> > }
> >
> > - Every compile error is captured assuming it's dependencies compile
> > - Every test is execute where the module builds
> > - Report issues and coverage for everything that executed
> >
> > John
> >
> >
> > On Sat, 26 Feb 2022 at 10:37, Delany  wrote:
> >
> >> I understand your use case Alex, just not your process. As this is the
> >> users list Im not about to solve the issue of a missing
> --fail-all-at-end
> >> switch, but I could try to think of workarounds.
> >> Delany
> >>
> >>
> >> On Sat, 26 Feb 2022 at 09:32, Alexander Kriegisch <
> >> alexan...@kriegisch.name>
> >> wrote:
> >>
> >>> Delany,
> >>>
> >>> you are completely misunderstanding my use case. I am building with
> >>> every push, that is the pain, because I have a choice to
> >>>
> >>>-- either see all test results with '-fn' but get a wrong build
> result
> >>>   (passed)
> >>>
> >>>-- or fewer test results with '-fae' and a correct build result
> >>>   (failed).
> >>>
> >>> I do *not* wish to run tests in a later phase. I have no idea where you
> >>> got that idea from. I simply want the build to continue for modules
> >>> dependent on ones with failing tests, so I can find out if they build
> >>> successfully and whether or not they also have failing tests. Then in
> >>> the end, after all modules have been built and all tests run (for those
> >>> modules which could actually be built without compile errors, of
> >>> course), I want to see an overall test result and a properly failed
> >>> build. In plain English: I want what '-fae' always should have done to
> >>> begin with. I really don't know what is so difficult to understand
> about
> >>> this simple requirement: build as much as possible, test as much as
> >>> possible, then report the correct result at the end. I want failed
> tests
> >>> to fail the build in the end, but I do not want them to keep dependent
> >>> modules from being built and tested.
> &g

Re: Run all tests (also in dependent modules), fail build at end

2022-02-26 Thread John Patrick
So I understand the option, but for the average developer understanding the
intermixed output might be a nightmare. If someone is building the code
they can just do -SkipTests and -fae, fix those, then go back to run the
tests.

I do a similar setup on Jenkins, with this kind of Jenkinsfile structure;

try {
  withEnv(...)
configFileProvider(...)
  try {
./mvnw clean install -DskipTests -fae
  } finally {
./mvnw verify -fae
  }
}
  }
} finally {
  recordIssues enabledForFailure: true, tools: [mavenConsole()]
  recordIssues aggregatingResults: true, enabledForFailure: true, tools:
[java(pattern: '**/src/main/java/**')]
  recordIssues aggregatingResults: true, enabledForFailure: true, tools:
[junitParser(pattern:
'**/target/failsafe-reports/*.xml,**/target/surefire-reports/*.xml')]
   publishCoverage adapters:
[jacocoAdapter('**/target/site/jacoco/jacoco.xml')]
}

- Every compile error is captured assuming it's dependencies compile
- Every test is execute where the module builds
- Report issues and coverage for everything that executed

John


On Sat, 26 Feb 2022 at 10:37, Delany  wrote:

> I understand your use case Alex, just not your process. As this is the
> users list Im not about to solve the issue of a missing --fail-all-at-end
> switch, but I could try to think of workarounds.
> Delany
>
>
> On Sat, 26 Feb 2022 at 09:32, Alexander Kriegisch <
> alexan...@kriegisch.name>
> wrote:
>
> > Delany,
> >
> > you are completely misunderstanding my use case. I am building with
> > every push, that is the pain, because I have a choice to
> >
> >   -- either see all test results with '-fn' but get a wrong build result
> >  (passed)
> >
> >   -- or fewer test results with '-fae' and a correct build result
> >  (failed).
> >
> > I do *not* wish to run tests in a later phase. I have no idea where you
> > got that idea from. I simply want the build to continue for modules
> > dependent on ones with failing tests, so I can find out if they build
> > successfully and whether or not they also have failing tests. Then in
> > the end, after all modules have been built and all tests run (for those
> > modules which could actually be built without compile errors, of
> > course), I want to see an overall test result and a properly failed
> > build. In plain English: I want what '-fae' always should have done to
> > begin with. I really don't know what is so difficult to understand about
> > this simple requirement: build as much as possible, test as much as
> > possible, then report the correct result at the end. I want failed tests
> > to fail the build in the end, but I do not want them to keep dependent
> > modules from being built and tested.
> >
> > --
> > Alexander Kriegisch
> > https://scrum-master.de
> >
> >
> > Delany schrieb am 26.02.2022 14:17 (GMT +07:00):
> >
> > > Oh its not, im just being thorough.
> > > It just seems like your build iteration isn't frequent enough. If
> you're
> > > not building on every MR/PR or with every push, maybe you need a
> separate
> > > test build. Or maybe your reactor is too large and you need to split it
> > > into separate projects. You could also leave the reactor but build via
> a
> > > script that looks for pom files and tests them one at a time. Ugly, but
> > > effective.
> > > Bottom line is that install and deploy phases don't create dependencies
> > > within a reactor, so its no biggy that they delay their execution until
> > > after. Anything that happens before then does, and its not unreasonable
> > to
> > > expect development to work within that constraint.
> > > Delany
> > >
> > >
> > > On Fri, 25 Feb 2022 at 19:40, Alexander Kriegisch <
> > alexan...@kriegisch.name>
> > > wrote:
> > >
> > >> Thanks for digging, Delany. However, I am failing to see how this is
> > >> meant to solve my problem. Could you elaborate, please?
> > >> --
> > >> Alexander Kriegisch
> > >> https://scrum-master.de
> > >>
> > >>
> > >> Delany schrieb am 25.02.2022 18:05 (GMT +07:00):
> > >>
> > >> > Alexander, here it is: https://github.com/raydac/mvn-finisher
> > >> > Delany
> > >> >
> > >> > On Mon, 7 Feb 2022 at 08:17, Delany 
> > wrote:
> > >> >
> > >> >> Someone already wrote an "at end maven plugin". I used it for a
> while
> > >> but
> > >> >> removed it. Can't for the life of me find it in
> > >> >> github/google/confluence/git log. Sorry!
> > >> >> Delany
> > >> >>
> > >> >>
> > >> >> On Mon, 7 Feb 2022 at 04:38, Alexander Kriegisch <
> > >> alexan...@kriegisch.name>
> > >> >> wrote:
> > >> >>
> > >> >>> >> In case you are ready to make you own plugin, it is relatively
> > easy.
> > >> >>>
> > >> >>> I am not, Lasse. I also want this to work on the command line and
> > not
> > >> >>> depend on CI-system-specific workarounds. But thank you for your
> > >> >>> insightful ideas, I really appreciate them.
> > >> >>>
> > >> >>> Tibor, actually I wanted to avoid a potentially lengthy debate on
> > basic
> > >> >>> principles, but I agree on 

Re: How do you get "import in3.*;" to work in a Java program when using Maven?

2021-01-17 Thread John Patrick
So what I can tell is the documentation got change on 18 Dec 2019 to
mention maven. But the project has never published it into maven
central.

It also looks like it now uses gradle to build and from what I'm aware
of gradle it doesn't have anything configured to even publish.


On Sun, 17 Jan 2021 at 22:35, Alub Quinata  wrote:
>
> Yes, I tried that.  It did not work.
> 
> From: Martin Gainty 
> Sent: Sunday, January 17, 2021 5:05 PM
> To: Maven Users List 
> Subject: Re: How do you get "import in3.*;" to work in a Java program when 
> using Maven?
>
> did you try simplifying version to numeric version
> 2.5.4 ?
>
> 
> From: Alub Quinata 
> Sent: Sunday, January 17, 2021 4:46 PM
> To: users@maven.apache.org 
> Subject: How do you get "import in3.*;" to work in a Java program when using 
> Maven?
>
> I have a working pom.xml file, and I want to use Incubed in3.  I added these 
> lines to my Maven pom.xml file:
>
> 
>   it.slock
>   in3
>   v2.5.4
> 
>
>
> I was trying to follow the directions here: 
> https://github.com/blockchainsllc/in3/packages/72045?version=v2.5.4
>
> I tried different versions of in3 too.  Whenever I ran "mvn install", I got 
> an error like this:
>
> Could not resolve dependencies for project org.foobar:jar:0.1.0: Could not 
> find artifact it.slock:in3:jar:2.5.4 in central 
> (https://repo.maven.apache.org/maven2)
>
> I looked on different Maven repositories for "in3" or "it.slock", but I could 
> not find anything.  How do you use pom.xml to build in3 for Java?

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



Re: Maven 3.6.3 configuration enquiry

2021-01-07 Thread John Patrick
I use https://github.com/takari/maven-wrapper which is being adopted
and merged into maven as a core plugin as part of maven v3.7.0.

For me it allows each git commit to control what version of maven to
use, the developer and cicd for the same commit will be using the same
version of maven as they will both be building using mvnw.

Setup your maven wrapper for 3.3.9, change your cicd to use mvnw,
check it all works with 3.3.9.
Create a new branch and update maven wrapper to use 3.6.3 (simple
properties file change aka "mvn -N io.takari:maven:0.7.7:wrapper
-Dmaven=3.6.3"), commit and push, check your cicd still passes and
then merge into your develop/main branch.
Need to check or test an older commit or release, checkout that
branch/tag/commit because your using mvnw you don't need to remember
what version of maven was needed to build it as source control and
mvnw will handle it for you.

Some people have mention issues with some maven plugins when using the
maven wrapper, I've not had any issues in the 4 years I've been using
the takari maven wapper. But I don't use the maven release plugin, I
currently use https://github.com/aleksandr-m/gitflow-maven-plugin.

John

On Thu, 7 Jan 2021 at 21:51, Bernd Eckenfels  wrote:
>
> This (setting automatically of M2_HOME) does not work in all cases, 
> especially not if the launch script is not used (IDE or Maven Agents), but it 
> would be best to not set it, if not needed (agreed).
>
>
> --
> http://bernd.eckenfels.net
> 
> Von: Jörg Schaible 
> Gesendet: Thursday, January 7, 2021 10:38:45 PM
> An: Maven Users List 
> Betreff: Re: Maven 3.6.3 configuration enquiry
>
> Am Donnerstag, 7. Januar 2021, 20:23:27 CET schrieb Bernd Eckenfels:
> > You did not say what build servers you use, but normally you can have many
> > different maven versions installed in different directories. Usually CI
> > servers are fine to pick one (some like Jenkins can even install them
> > dynamically).
> >
> > If you do it, you need to watch out for not using/inheriting environment
> > variables (especially PATH, java and maven home), when using a user/global
> > settings.xml it should be valid for all versions (it usually is) or specify
> > a unique file for each environment with the -s flag. Also make sure to
> > specify the full path to the mvn launcher. Some plugins like maven release
> > plugin also prefer if you set the correct M2_HOME env variable.
>
> Best is not to set it at all. Then it is automatically set by the individual
> shell script that starts Maven (bin/mvn or bin/mvn.cmd) and will automatically
> point to the current Maven in use.
>
> [snip]
>
> Cheers,
> Jörg
>
>
>
>
> -
> 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: Reporting in maven. help please

2020-11-29 Thread John Patrick
Is this the documentation you said you are reading
https://maven.apache.org/plugins/index.html, as it has a reporting
section for maven maintained plugins.

but to highlight some, take a look at;
checkstyle https://maven.apache.org/plugins/maven-checkstyle-plugin/
pmd/cpd https://maven.apache.org/plugins/maven-pmd-plugin/
spotbugs (was findbugs) https://spotbugs.github.io/spotbugs-maven-plugin/

harder setup as requires installing separate tooling, and most overlap
with checkstyle, pmd and sportbugs in the free version.
sonarqube 
https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/

for your dependencies look at owasp and
https://jeremylong.github.io/DependencyCheck/dependency-check-maven/index.html

If you're on github or bitbucket and are an open source project then
they have lots of both apps or integration tooling that can check
dependencies, code coverage. But if it's a closed private repo then it
will cost you something $$$ per month.

John

On Sun, 29 Nov 2020 at 17:47, Aitor Iturriondobeitia
 wrote:
>
> Hello
> i am new using maven and i am reading documentation.
> Can you say me which plugins can i use for reporting the code quality?
> any example?
> thanks

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



Re: Version ranges: bug or feature

2020-11-11 Thread John Patrick
Ranges can be used in released artifacts which I have done myself, but
it means you won't have reproducible builds. So be careful and be
aware if you use them...

>From your version range I assume you want any v6.7.x and newer but not
any v7.x release. So I would have done
[6.7.0,6.999.999)

I have used open source projects that got it wrong, so my project
worked for a few years then started due to a dependency getting ranges
wrong. So I was depending upon a v4.0.x implementation, then a v4.x.1
release was made and the v4.0.x implementation picked up the v4.1.x
api and they were not compatible so build failures.

To get around the speed if using version ranges etc... I have;
- stopped deploying snapshots into repositories
- each build workspace gets its own local repository
- if a project has dependencies, and the dependency has a branch of
the same name then it is built 1st so that SNAPSHOT version in the
workspace local repository. this save needing to deploy snapshots and
also needing to do extra releases

John

On Wed, 11 Nov 2020 at 00:06, Maxim Solodovnik  wrote:
>
> So ranges can't be used in release artifacts?
>
> I thought maybe `SNAPSHOT` in range will turn on some Maven magic
> and it will check snapshots in addition to releases ...
>
> On Wed, 11 Nov 2020 at 06:29, Tomo Suzuki 
> wrote:
>
> > I expect Maven to check all possible versions that match the range criteria
> > and to pick the highest one. (Sorry if I might not grasp your question)
> >
> > The suffixes (-SNAPSHOT) in version ranges do not work as a filter.
> > (Probably this is not the point?)
> >
> > The mentioned version strings (6.7.1-SNAPSHOT, 6.7.2-SNAPSHOT and
> > 6.7.3-SNAPSHOT) are all higher than “6.7.0” and lower than
> > “7.0.0-SNAPSHOT“.
> >
> >
> > On Tue, Nov 10, 2020 at 10:34 Maxim Solodovnik 
> > wrote:
> >
> > > Thanks for the quick answer Tomo,
> > >
> > > According to out build logs (available for ex. here [1])
> > > `7.0.0-SNAPSHOT` in the range results in checking all snapshot versions
> > in
> > > all snapshot repositories available
> > >
> > > so 6.7.1-SNAPSHOT, 6.7.2-SNAPSHOT, 6.7.3-SNAPSHOT etc are being checked
> > ...
> > > Is this expected
> > >
> > >
> > >
> > https://ci-builds.apache.org/job/OpenMeetings/job/openmeetings/133/consoleFull
> > >
> > >
> > >
> > > On Tue, 10 Nov 2020 at 21:49, Tomo Suzuki 
> > > wrote:
> > >
> > > > I avoid using version ranges because it introduces unexpected results
> > in
> > > > the dependency graphs.
> > > >
> > > > > [6.7.0,7.0.0-SNAPSHOT)
> > > >
> > > > I felt the intention of the range is the highest version before
> > > > 7.0.0-SNAPSHOT (without including 7.0.0-SNAPSHOT version).
> > > > As per [1], this range includes versions such as "7.0.0-alpha" and
> > > > "7.0.0-rc".
> > > >
> > > > [1]:
> > > >
> > > >
> > >
> > https://maven.apache.org/ref/3.6.3/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html
> > > > ,
> > > >
> > > >
> > > >
> > > > On Tue, Nov 10, 2020 at 8:54 AM Maxim Solodovnik  > >
> > > > wrote:
> > > >
> > > > > Hello Maven experts,
> > > > >
> > > > > one sub-dependencies of our project has following
> > > > >   [6.7.0,7.0.0-SNAPSHOT)
> > > > > [1]
> > > > >
> > > > > as a result metadata for all available SNAPSHOT version is being
> > > checked
> > > > in
> > > > > all SNAPSHOT repositories
> > > > > this takes time
> > > > > (full story is here
> > https://groups.google.com/g/kurento/c/7B5k_cZ2Ya0)
> > > > >
> > > > > this is reproducible using both local build and build at
> > > > > ci-builds.apache.org
> > > > >
> > > > > Is this expected behavior?
> > > > > Is it Ok to use range dependency with SNAPSHOT in release version of
> > > > > library?
> > > > >
> > > > >
> > > > >
> > > > > [1]
> > > > >
> > > > >
> > > >
> > >
> > https://repo1.maven.org/maven2/org/kurento/kms-api-elements/6.15.0/kms-api-elements-6.15.0.pom
> > > > >
> > > > > --
> > > > > Best regards,
> > > > > Maxim
> > > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Tomo
> > > >
> > >
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> > --
> > Regards,
> > Tomo
> >
>
>
> --
> Best regards,
> Maxim

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



Re: Maven Dependency Plugin

2020-10-26 Thread John Patrick
I'm out of the loop regarding the 3.7.0 release schedule so can't
answer that myself, you'll need to ask the developers mailing list.

The email about maven-wrapper-plugin v3.0.1 is this one from the
developers mailing list
https://lists.apache.org/thread.html/r7cb5dd04726af22f3c69092a7057e2674383deab09caf3fe80bef98e%40%3Cdev.maven.apache.org%3E

There are a few other emails about maven-wrapper-plugin and was an
issue with v3.0.0 which is why v3.0.1 was released.

I'm 99.999% sure it was only intended to work with v3.7.0 and newer
versions only, so feel free to raise a pr.

John

On Mon, 26 Oct 2020 at 11:33, Markus Karg  wrote:
>
> Thank you for this information. It is a bit misleading that the line says "as 
> introduced" (past tense) for a release that actually does not exist yet. 
> Would it be OK if I file a PR to clarify that? What is the anticipated 
> release date of Maven 3.7.0 that I could announce there?
> -Markus
>
>
> -Ursprüngliche Nachricht-
> Von: John Patrick 
> Gesendet: Montag, 26. Oktober 2020 12:07
> An: Maven Users List 
> Betreff: Re: Maven Dependency Plugin
>
> If you read the opening line it talks about Maven 3.7.0, which is not yet 
> released.
>
> If you want to use a maven wrapper before v3.7.0, then use this 
> https://github.com/takari/maven-wrapper. The upgrade from takari to maven is 
> easy but does allow you to change your documentation, process and ci process 
> instead of waiting until v3.7.0.
>
> I did test the maven-wrapper-plugin a few months ago and I had to add a 
> staging repo of something like this before it worked 
> https://repository.apache.org/service/local/repositories/maven-XXX/content/.
> But can't remember what XXX it was as I've got ~10 in my settings.xml 
> commented out.
>
> John
>
> On Mon, 26 Oct 2020 at 10:53, Markus Karg  wrote:
> >
> > When I am using this plugin 
> > https://maven.apache.org/plugins/maven-wrapper-plugin/ then Maven fails 
> > because it apparently cannot find needed runtime files on Maven Central. 
> > This limitation is not told on that page. Is that a bug or am I doing 
> > something wrong?
> > -Markus
> >
> >
>
> -
> 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 Dependency Plugin

2020-10-26 Thread John Patrick
If you read the opening line it talks about Maven 3.7.0, which is not
yet released.

If you want to use a maven wrapper before v3.7.0, then use this
https://github.com/takari/maven-wrapper. The upgrade from takari to
maven is easy but does allow you to change your documentation, process
and ci process instead of waiting until v3.7.0.

I did test the maven-wrapper-plugin a few months ago and I had to add
a staging repo of something like this before it worked
https://repository.apache.org/service/local/repositories/maven-XXX/content/.
But can't remember what XXX it was as I've got ~10 in my settings.xml
commented out.

John

On Mon, 26 Oct 2020 at 10:53, Markus Karg  wrote:
>
> When I am using this plugin 
> https://maven.apache.org/plugins/maven-wrapper-plugin/ then Maven fails 
> because it apparently cannot find needed runtime files on Maven Central. This 
> limitation is not told on that page. Is that a bug or am I doing something 
> wrong?
> -Markus
>
>

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



Re: Build with dependencies + debug in NetBeans in a single Maven invocation

2020-10-21 Thread John Patrick
So some quick feedback...

You mention maven is rather slow... It's taking me an average of 6
seconds for a command line 'mvn clean install' to build all 4 pom's.
I've got a MacBookPro (2013 model), 2.8 GHz Dual-Core Intel Core i7,
16GB Ram and SSD. I'm using Java 11.0.8 and Maven 3.6.3.

So debugging it within IntelliJ (Ultimate 2020.3 EAP version), I
loaded it as a Maven project. But simply running FileReadTestApp as an
Application and not via Maven, it was opening within 4-6 seconds... I
confirmed changes within JavaCommon were seen by FileReadTest, by
adding a System.out.println in the init method of UserPreferences, and
i saw the latest message i typed only seconds before in the console
output.

Regarding the gui builder you are using, not sure how to get that to
regenerate, but pure java code changes within IntelliJ are only taken
a matter of seconds for the latest changes to be seen and so used
within your app.

Installed NetBeans 12.1, it does feel very slow and sluggish. So
opening FileReadTestApp and selecting Run and it's taking 10-15
seconds before the maven output starts to appear then another 10-15
seconds before your gui appears, doing any changes to UserPreferences
are not picked up. Clicking Build with Dependencies, I'm seeing this;

No output for about 10 seconds
Maven takes about 10 seconds to build dependencies
No output for about 10 seconds
Maven takes about 10 seconds before exec and then another 5 seconds
and the gui appears.

So maybe use IntelliJ when editing java code and switch to NetBeans if
you need to change the gui...

John

On Wed, 21 Oct 2020 at 17:44, R. Diez  wrote:
>
>
> First of all, thanks for your answer.
>
> I did not get your e-mail, I only saw your answer in the mailing list 
> archive, so I hope the e-mail address I found for you somewhere else is the
> right one.
>
>
> > So execute [1] I believe is because you have checked "Build With
> > Dependencies" so it does a force rebuild of all projects
> > [...]
> > Why do you feel you need to do a forced rebuild? I'm sure NetBeans has
> > a compile on depend option. Did you have issues and then checking
> > "Build With Dependencies" fix that issue?
>
> That's correct. If I do not tick that option, then any changes to the common 
> library JavaCommon are not recompiled. So I am not debugging the latest
> source code state.
>
> I have no custom plug-ins, code generation or anything fancy. NetBeans just 
> does not rebuild dependencies automatically for Maven projects as far as I
> can tell. It is yet another reason to migrate away from NetBeans, but like I 
> said, I cannot do it yet because the projects are using the NetBeans GUI
> builder (Matisse). 8-(
>
>
> > [...]
> > Maven can execute the same command line goals to all projects in a
> > single innovation, but it can't execute different command line goals
> > to different projects in a single innovation. So you might need to use
> > a profile or something and push the exec into that profile and then
> > run the profile. So after it does the build, it then does the exec.
>
> That sounds a little complicated, given my very limited experience with Maven.
>
>
> > Might sound a strange question but why do you have to use exec to run
> > your application. If it's loaded into NetBeans as a maven project can
> > you just run the main class manually instead of via exec?
>
> I do not actually know. Those steps are what NetBeans does by default when 
> you create a new Maven project. I haven't figured out yet how NetBeans
> knows from the definition of such actions that a particular action wants to 
> debug and not just build, so it should actually connect the debugger. If
> it is documented at all, I haven't found it yet.
>
> But yes, I gather that it should be possible to start the debugger on the 
> build result without running Maven again. But NetBeans does not seem to
> offer the full flexibility to specify all command-line arguments to some 
> executable. The whole reason why I am using an IDE like NetBeans is that I
> wanted to just point and click! O8-)
>
>
> > Do you have a branch I can look at with your maven build and I'll look
> > it at when free to see if i can spot anything obvious, or push you maven 
> > wip.
>
> Yes, sorry that I forgot to push the changes. I have done it now:
>
> https://sourceforge.net/p/filereadtest/code/ci/master/tree/
>
> Thanks in advance for your help,
>rdiez

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



Re: Build with dependencies + debug in NetBeans in a single Maven invocation

2020-10-20 Thread John Patrick
Going to be rusty on NetBeans specific bits as not used for maybe 10+
years because it was slow and bugging from memory, switched to Eclipse
and then IntelliJ and not looked back.

So execute [1] I believe is because you have checked "Build With
Dependencies" so it does a force rebuild of all projects and execute
[2] is running your application.

Why do you feel you need to do a forced rebuild? I'm sure NetBeans has
a compile on depend option. Did you have issues and then checking
"Build With Dependencies" fix that issue?

Do you have custom plugins or code generation running on your project
as that would be the only reason I would force a rebuild.

Maven can execute the same command line goals to all projects in a
single innovation, but it can't execute different command line goals
to different projects in a single innovation. So you might need to use
a profile or something and push the exec into that profile and then
run the profile. So after it does the build, it then does the exec.

Might sound a strange question but why do you have to use exec to run
your application. If it's loaded into NetBeans as a maven project can
you just run the main class manually instead of via exec?

If you were using IntelliJ you would just need to do the exec as
everything would have been rebuild automatically as required. The only
limitation is if you have plugins or some kind of code generation
which wouldn't have been execute. I would also just execute the main
class or what ever exec is doing instead of going via a maven wrapper
for exec.

Do you have a branch I can look at with your maven build and I'll look
it at when free to see if i can spot anything obvious, or push you
maven wip.

John







On Tue, 20 Oct 2020 at 00:37, R. Diez  wrote:
>
> Hi all:
>
> I am migrating the following 2 Java applications and 1 "shared" library from 
> NetBeans Ant-based projects to Maven:
>
> https://sourceforge.net/p/filereadtest/code/ci/master/tree/
>
> I have noticed that Maven is rather slow, which bugs me (I am very impatient 
> for a part-time
> Java developer). I suspect the start-up costs are a big factor, and GraalVM 
> is probably not
> quite ready yet to replace the standard JVM.
>
> When I am writing code, I want to press a key in order to immediately start 
> the application
> under the debugger. All modified code, whether in the application or in the 
> common library,
> should be recompiled (if necessary). This is standard in most development 
> environments for
> most computer languages.
>
> So, after starting NetBeans, I went to the project settings, "Actions", 
> "Debug project" and ticked "Build With Dependencies".
>
> I then noticed in the output window that Maven actually runs twice:
>
> 1) [...] mvn -DskipTests=true --also-make --projects QuickDiskTest install
>
> 2) [...] mvn [...] process-classes 
> org.codehaus.mojo:exec-maven-plugin:1.5.0:exec
>
> Is there a way to run Maven just once? Or does Maven not support building and 
> running (under a debugger) in a single invocation?
>
> Inside NetBeans, I could experiment with a new custom 
> BuildWithDependenciesAndDebug action,
> but there does not seem to be a way to fully control the command-line 
> arguments for an action. There are fields for goals, profiles and properties,
> but that is probably not enough. Or am I mistaken here?
>
> I am hoping that someone here could help me. I already posted this question 
> in the NetBeans mailing list, but nobody answered:
>
> http://mail-archives.apache.org/mod_mbox/netbeans-users/202009.mbox/%3C1652543010.678234.1601497297309%40mail.yahoo.com%3E
>
> I cannot migrate this project away from NetBeans yet, because I am using the 
> NetBeans GUI builder (Matisse) for the forms (see the .form files), which
> I guess is only available inside NetBeans.
>
> Thanks in advance,
>rdiez
>
> -
> 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: Need help with maven deploy plugin.

2020-08-19 Thread John Patrick
Which pom are properties beans.version and rest.version defined?

com.blah.nw.libraries:libraries:1.0.0 or it's parent?

Technically what you're deploying and using looks valid, the consumed
using them should resolve those dependencies and pick up your custom
version property and work it out dynamically.

I've just created a mini project and mine seems to be working how you
want it to do, but i'm deploying to a local directory and not into
artifactory/nexus.

Normally in a multi module project, I collate all dependency version
details into the root multi module parent pom under the
dependencyManagement section. So multi module children only define use
x but never use version y of x.

John

On Wed, 19 Aug 2020 at 08:01, Jai Sharma  wrote:
>
> I am trying to upload multiple jar files to artifactory using "mvn deploy" 
> command for a multi module project. Problem I am facing is generated pom 
> files uploaded with jar files to artifactory contains only property name as 
> version.
>
> Example - This is the part of jar file uploaded to artifactory for module 
> "configuration-entity".
> When i am using this as dependency in another project I am getting error 
> cannot resolve dependencies
> com.blah.infra.libraries:rest:jar:${rest.version}
> com.blah.infra.libraries:beans:jar:${beans.version}
>
> 
> 
>
> 4.0.0
>
> 
> com.blah.nw.libraries
> libraries
> 1.0.0
> 
>
> configuration-entity
>
> 
> 
> com.blah.infra.libraries
> rest
> ${rest.version}
> 
> 
> com.blah.infra.libraries
> beans
> ${beans.version}
> 
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

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



Re: How to disable certain enforcer rules in a child module in a multi-module maven project?

2020-08-14 Thread John Patrick
So something like the following if all configuration is managed via a
pluginMangement section;


  
org.apache.maven.plugins
maven-enforcer-plugin
3.0.0-M2

  
alpha


  enforce


  


  [1.8,)
  *** This project requires
JDK 1.8/J2SE 8 or later. ***

  
  true

  
  
bravo


  enforce


  

  [1.8,)
  *** This project requires
JDK 1.8/J2SE 8 or later. ***

  
  true

  

  

  
org.apache.maven.plugins
maven-enforcer-plugin

  
alpha
validate
  

  


query/pom.xml


  
org.apache.maven.plugins
maven-enforcer-plugin

  
alpha

  
  
bravo
validate
  

  

  


you might also be able to do it via a property and in query define the
bravo execution instead of the alpha. I've used a similar technique
with maven-surefire-plugin, where i define the plugin version using a
property and have a default in the root/parent pom, and in one
specific child pom i define a different surefire version. so this
might work...


  
org.apache.maven.plugins
maven-enforcer-plugin
3.0.0-M2

  
alpha


  enforce


  


  [1.8,)
  *** This project requires
JDK 1.8/J2SE 8 or later. ***

  
  true

  
  
bravo


  enforce


  

  [1.8,)
  *** This project requires
JDK 1.8/J2SE 8 or later. ***

  
  true

  

  

  
org.apache.maven.plugins
maven-enforcer-plugin

  
${which-enforcer-id}
validate
  

  


  alpha


query/pom.xml


  bravo


John


On Fri, 14 Aug 2020 at 11:23, Falko Modler  wrote:
>
> I agree that John's solution is more how Maven is expecting you to do things 
> in this case.
> But it is also more verbose in the submodules and it forces you to repeat 
> yourself (I really like the DRY principle), since you basically have to 
> redefine rules.
>
> For me it depends how much you want to manage/maintain centrally (in a root 
> parent or so) and how much you want override or redefine in the submodules.
>
> Sure, if the rule config is simple, redefinition won't hurt much but if you 
> have complex stuff, it can become painful to have those configs scattered 
> over multiple modules.
>
> Just my 2 cents.
>
> PS: Haven't checked, but theoretically you should also be able to prepare all 
> executions in pluginManagement, but set each phase to none. Then in each 
> concrete build plugins section you should then be able to bind the executions 
> you want/need to the right phase.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

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



Re: How to disable certain enforcer rules in a child module in a multi-module maven project?

2020-08-14 Thread John Patrick
I would do the following snippet, not sure if phase is needed, not
sure if it should be pluginManagement, but i tend to put all
configuration in pluginManagement then only the usage in plugins.

For the query, from what I'm aware I used the same id of default, it
will override that execution from main and use the updated execution
in the query.

I've not had to do this override with enforcer before, but have had to
do something similar with the compiler plugin when building a project
in java 1.8 and 11 and 14.

What my pom's might look like, i've not tested this setup and it might
need some tweaking;

main/pom.xml


  
org.apache.maven.plugins
maven-enforcer-plugin
3.0.0-M2

  
default
validate

  enforce


  


  [1.8,)
  *** This project requires
JDK 1.8/J2SE 8 or later. ***

  
  true

  

  

  
org.apache.maven.plugins
maven-enforcer-plugin
  


query/pom.xml


  
org.apache.maven.plugins
maven-enforcer-plugin

  
default
validate

  enforce


  

  [1.8,)
  *** This project requires
JDK 1.8/J2SE 8 or later. ***

  
  true

  

  


John

On Thu, 13 Aug 2020 at 11:13, Falko Modler  wrote:
>
> You could split your config into multiple executions and define a custom skip 
> property for each execution.
> In a submodule you could then skip the executions you don't want (or vice 
> versa) by adding the respective properties.
> Skipping all enforcer rules (e.g. for a "quick" local run) is more 
> complicated, but could be achieved if everything ia put in a profile that is 
> activated by default. You could then opt-out of it via -P!my-profile or 
> introduce yet another property for that.
>
> -
> 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 maven repositories are resolved?

2020-07-29 Thread John Patrick
The answer depends on the following;

1) is it a release version or snapshot version. As if the release
version is in local repo then no remote repo's are checked.
2) order your pom's are executed

I've simplified your profiles with central repo and company repo, and
Aa, Ab and Ac are the same GAV but it's just so in the explanation
it's easier to know what A i'm talking about.

settings
- central repo (contains Aa)
- company repo (contains Ab)

parent-pom
- alpha
-- A
- bravo (has extra R repository like your cloudera, contains Ac)
-- A
- charlie
-- A

For release version assuming empty local repo.
- Build order this time alpha, bravo, charlie
- Alpha needs A, and Aa is downloaded as it's in central repo and that
was 1st repo in the order list
- Bravo needs A, it sees Aa in local repo and uses it
- Charlie needs A, it sees Aa in local repo and uses it

Same as before but maven believe build order is bravo, alpha, charlie,
i.e. you've changed an internal dependency or reorder you modules
section.
- Bravo needs A, and Ac is downloaded as it's in R repo and that was
1st repo in the order list, which i think it's pom repo's then parent
pom's then settings file.
- Alpha needs A, it sees Ac in local repo and uses it
- Charlie needs A, it sees Ac in local repo and uses it

Next is if A is a -SNAPSHOT dependency assuming empty local repo, Aa
is v 1-1, Ab is v1-1 and Ac is v1-1
- Build order this time alpha, bravo, charlie
- Alpha needs A, and Aa is downloaded as it's in central repo and that
was 1st repo in the order list, but it has a cache of Ab existing
- Bravo needs A, it sees it doesn't have a cache of A from R repo, so
looks up A from R repo, and if Ac in R repo is newer it is downloaded
and used. in this case Aa is newer so Aa is used.
- Charlie needs A, it sees all repo's have caches of A, and just uses
the A in the local repo, in this case Aa is used.

Next is if A is a -SNAPSHOT dependency assuming empty local repo, Aa
is v 1-1, Ab is v1-1 and Ac is v1-2
- Build order this time alpha, bravo, charlie
- Alpha needs A, and Aa is downloaded as it's in central repo and that
was 1st repo in the order list, but it has a cache of Ab existing
- Bravo needs A, it sees it doesn't have a cache of A from R repo, so
looks up A from R repo, and if Ac in R repo is newer it is downloaded
and used. in this case Ac is newer so Ac is used.
- Charlie needs A, it sees all repo's have caches of A, and just uses
the A in the local repo, in this case Ac is used.



As you can see it can get very messy when -SNAPSHOT's are being used
and different pom's have repo. This is my hands-on experience of trial
and error, debugging and troubleshooting of build processes.

Hope it was helpful.

John

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



Re: Maven Versions Plugin scans whole Maven repository

2020-07-11 Thread John Patrick
The maven project doesn't have a code maven versions plugin, mojohaus
formally codehaus has a versions-maven-plugin. Is that the plugin
you're talking about? And I've just noticed they point their users
mailing list to this maven users list.

1) What is the exact command line you are executing? something like this?

$ mvn org.codehaus.mojo:versions-maven-plugin:2.7:display-dependency-updates

2) How many repo's do you point to? via your pom.xml or settings.xml
As each repo will be checked separately which might be why the high
execution time. The maven central calls might be say 10 mins but due
to slow 'snapshots' it might take 50 mins.

3) Is the project public on github or similar? i.e. can i clone it
myself and run the same command to see how long it takes for me?

4) Do you have a slow or high latency internet connection? As your
email implices you might be in the Czech Republic. You might have a
25Mbps connection but if you have multiple users streaming 4K video
and saturating the bandwidth it won't help you.

5) What location does repo1.maven.org resolve to? e.g. ping
repo1.maven.org or nslookup repo1.maven.org. Then put the ip address
into say https://ipinfo.io/ and see if that host is local to you...
mine is resoling to a UK Data Center, yours might be going somewhere
silly and non local

6) Maybe setup a nexus oss on your home/office/work network to cache
this data closer.

7) See where the time is wasted,
https://github.com/khmarbaise/maven-buildtime-profiler would help
confirm where phases/goal/plugin is taking all the time, it might just
show you what you know, which is the versions plugin is taking all the
time.

Hope some of the above is helpful or points towards the problem.
Without knowing the exact command line you're using it is a little
hard to help more. Also without seeing your pom or settings.xml as
your output shows central and something called snapshots being polled.

John

On Sat, 11 Jul 2020 at 07:39, Lukáš Satin  wrote:
>
> Hi,
>
> Maven Versions Plugin scans whole Maven repository.
>
> It takes about 1 hour and scans everything from com.google.* and
> org.springframework.* plus other packages while they are nowhere in the
> pom.xml! There is only org.springbootframework.boot, org.apache.commons,
> com.oracle!
>
> I read all articles, FAQ.
>
> Why is this behavior? How to make it update only actual dependencies
> present in pom.xml and not some transitive stuff?
>
> [INFO] artifact com.google.api.grpc:proto-google-cloud-bigtable-v2:
> checking for updates from snapshots
> [INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:proto-google-cloud-billing-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-billing-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.cloud:google-cloud-billing: checking for updates
> from central
> [INFO] artifact com.google.cloud:google-cloud-billing: checking for updates
> from snapshots
> [INFO] artifact
> com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking for
> updates from central
> [INFO] artifact
> com.google.api.grpc:grpc-google-cloud-billingbudgets-v1beta1: checking for
> updates from snapshots
> [INFO] artifact
> com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking for
> updates from central
> [INFO] artifact
> com.google.api.grpc:proto-google-cloud-billingbudgets-v1beta1: checking for
> updates from snapshots
> [INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking for
> updates from central
> [INFO] artifact com.google.cloud:google-cloud-billingbudgets: checking for
> updates from snapshots
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:grpc-google-cloud-build-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
> for updates from central
> [INFO] artifact com.google.api.grpc:proto-google-cloud-build-v1: checking
> for updates from snapshots
> [INFO] artifact com.google.cloud:google-cloud-build: checking for updates
> from central

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



Re: How to download zip instead of jar from maven repo...

2020-07-09 Thread John Patrick
I meant Java 9 was 2017 not 2019.

The main reason I thought it was a Java 9 issue, was seeing this in
your stacktrace "java.base/java.lang.reflect.Constructor." so it was
showing module/classname.

I've come across lots of plugins that have had issues with Java 9 or
newer, so if something fails, I try it with Java 1.8, or see if a
newer version is available.

John


On Thu, 9 Jul 2020 at 19:55, John Patrick  wrote:
>
> Use Java 1.8 or older.
>
> Because the plugin was last released in 2015, and Java 9 was released
> in 2019, I suspect it doesn't support or handle modules correctly.
>
> I've just tried a simple project and I get the same stacktrace using
> Java 11, but it passes on Java 1.8.
>
> I tried this command line;
> $ mvn compile org.codehaus.mojo:codenarc-maven-plugin:0.22-1:codenarc
>
> Using these files;
> $ cat pom.xml
> 
> 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;>
> 4.0.0
> groupId
> artifactId
> 1
> 
>
> $ cat src/main/java/Example.groovy
> Console console=System.console();
> def name=console.readLine("What is your name? ")
> println "Welcome to Groovy, $name!"
>
> John
>
> On Thu, 9 Jul 2020 at 05:44, LINUS FERNANDES  
> wrote:
> >
> > Does anyone have a working Maven configuration for CodeNarc for groovy
> > scripts static analysis?
> > Much appreciated if you share the same.
> >
> > Else, I'll just have to forget about it.
> >
> > On Wed, 8 Jul 2020, 12:58 LINUS FERNANDES, 
> > wrote:
> >
> > > I tried adding the following dependencies to the plugin :
> > >
> > >org.codehaus.groovy
> > > groovy
> > > 3.0.4
> > > 
> > >   org.codehaus.groovy > > groupId>groovy-all > > artifactId>3.0.4
> > >   
> > >
> > > The first doesn't resolve it and the second fails because :
> > >
> > > plugin org.codehaus.mojo:codenarc-maven-plugin:0.22-1 or one of its
> > > dependencies could not be resolved: Could not find artifact
> > > org.testng:testng:jar:7.2.0 in central (
> > > https://repo.maven.apache.org/maven2)
> > >
> > > On Wed, 8 Jul 2020, 12:43 LINUS FERNANDES, 
> > > wrote:
> > >
> > >> I'm using Jdk 11.
> > >>
> > >> On Wed, 8 Jul 2020, 07:11 LINUS FERNANDES, 
> > >> wrote:
> > >>
> > >>> I get the following error for code narc version 0.16 and 0.17 as set in
> > >>> the configuration.
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> ERROR: Unable to make
> > >>> jdk.internal.loader.ClassLoaders$AppClassLoader(jdk.internal.loader.ClassLoaders$PlatformClassLoader,jdk.internal.loader.URLClassPath)
> > >>> accessible: module java.base does not "opens jdk.internal.loader" to
> > >>> unnamed module @7085bdee
> > >>>  [java] java.lang.reflect.InaccessibleObjectException: Unable to
> > >>> make
> > >>> jdk.internal.loader.ClassLoaders$AppClassLoader(jdk.internal.loader.ClassLoaders$PlatformClassLoader,jdk.internal.loader.URLClassPath)
> > >>> accessible: module java.base does not "opens jdk.internal.loader" to
> > >>> unnamed module @7085bdee   [java] at
> > >>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:340)
> > >>>[java] at
> > >>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:280)
> > >>>[java] at
> > >>> java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:189)
> > >>>  [java] at
> > >>> java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:182)
> > >>>  [java] at
> > >>> org.codehaus.groovy.reflection.CachedConstructor$1.run(CachedConstructor.java:41)
> > >>>[java] at
> > >>> java.base/java.security.AccessController.doPrivileged(Native Method)
> > >>> [java] at
> > >>> org.codehaus.groovy.reflecti

Re: How to download zip instead of jar from maven repo...

2020-07-09 Thread John Patrick
Use Java 1.8 or older.

Because the plugin was last released in 2015, and Java 9 was released
in 2019, I suspect it doesn't support or handle modules correctly.

I've just tried a simple project and I get the same stacktrace using
Java 11, but it passes on Java 1.8.

I tried this command line;
$ mvn compile org.codehaus.mojo:codenarc-maven-plugin:0.22-1:codenarc

Using these files;
$ cat pom.xml

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;>
4.0.0
groupId
artifactId
1


$ cat src/main/java/Example.groovy
Console console=System.console();
def name=console.readLine("What is your name? ")
println "Welcome to Groovy, $name!"

John

On Thu, 9 Jul 2020 at 05:44, LINUS FERNANDES  wrote:
>
> Does anyone have a working Maven configuration for CodeNarc for groovy
> scripts static analysis?
> Much appreciated if you share the same.
>
> Else, I'll just have to forget about it.
>
> On Wed, 8 Jul 2020, 12:58 LINUS FERNANDES, 
> wrote:
>
> > I tried adding the following dependencies to the plugin :
> >
> >org.codehaus.groovy
> > groovy
> > 3.0.4
> > 
> >   org.codehaus.groovy > groupId>groovy-all > artifactId>3.0.4
> >   
> >
> > The first doesn't resolve it and the second fails because :
> >
> > plugin org.codehaus.mojo:codenarc-maven-plugin:0.22-1 or one of its
> > dependencies could not be resolved: Could not find artifact
> > org.testng:testng:jar:7.2.0 in central (
> > https://repo.maven.apache.org/maven2)
> >
> > On Wed, 8 Jul 2020, 12:43 LINUS FERNANDES, 
> > wrote:
> >
> >> I'm using Jdk 11.
> >>
> >> On Wed, 8 Jul 2020, 07:11 LINUS FERNANDES, 
> >> wrote:
> >>
> >>> I get the following error for code narc version 0.16 and 0.17 as set in
> >>> the configuration.
> >>>
> >>>
> >>>
> >>>
> >>> ERROR: Unable to make
> >>> jdk.internal.loader.ClassLoaders$AppClassLoader(jdk.internal.loader.ClassLoaders$PlatformClassLoader,jdk.internal.loader.URLClassPath)
> >>> accessible: module java.base does not "opens jdk.internal.loader" to
> >>> unnamed module @7085bdee
> >>>  [java] java.lang.reflect.InaccessibleObjectException: Unable to
> >>> make
> >>> jdk.internal.loader.ClassLoaders$AppClassLoader(jdk.internal.loader.ClassLoaders$PlatformClassLoader,jdk.internal.loader.URLClassPath)
> >>> accessible: module java.base does not "opens jdk.internal.loader" to
> >>> unnamed module @7085bdee   [java] at
> >>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:340)
> >>>[java] at
> >>> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:280)
> >>>[java] at
> >>> java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:189)
> >>>  [java] at
> >>> java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:182)
> >>>  [java] at
> >>> org.codehaus.groovy.reflection.CachedConstructor$1.run(CachedConstructor.java:41)
> >>>[java] at
> >>> java.base/java.security.AccessController.doPrivileged(Native Method)
> >>> [java] at
> >>> org.codehaus.groovy.reflection.CachedConstructor.(CachedConstructor.java:39)
> >>>   [java] at
> >>> org.codehaus.groovy.reflection.CachedClass$2.initValue(CachedClass.java:73)
> >>>  [java] at
> >>> org.codehaus.groovy.reflection.CachedClass$2.initValue(CachedClass.java:63)
> >>>  [java] at
> >>> org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
> >>>[java] at
> >>> org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
> >>>  [java] at
> >>> org.codehaus.groovy.reflection.CachedClass.getConstructors(CachedClass.java:257)
> >>> [java] at
> >>> groovy.lang.MetaClassImpl.(MetaClassImpl.java:192)
> >>> [java] at groovy.lang.MetaClassImpl.(MetaClassImpl.java:196)
> >>> [java] at
> >>> groovy.lang.MetaClassRegistry$MetaClassCreationHandle.createNormalMetaClass(MetaClassRegistry.java:149)
> >>>  [java] at
> >>> groovy.lang.MetaClassRegistry$MetaClassCreationHandle.createWithCustomLookup(MetaClassRegistry.java:139)
> >>> [java] at
> >>> groovy.lang.MetaClassRegistry$MetaClassCreationHandle.create(MetaClassRegistry.java:122)
> >>> [java] at
> >>> org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:165)
> >>>   [java] at
> >>> 

Re: shade plugin modifying string constants

2020-06-27 Thread John Patrick
>From the views of a another user, relocation should be dumb and should
be exact case sensitive for both pattern and shadedPattern. So I would
not expect PKG to be altered. Yes the output is what your pattern
match lists but but so does; System.out.println ("org.example" +
".pkg."); and I wouldn't expect that to be changed.

Based on your example would you have expect it to be replaced with
either A or B;
a) org.example.shaded.PKG
b) org.example.shaded.pkg

John

On Fri, 26 Jun 2020 at 07:30, Anurag Shekhar
 wrote:
>
> Hi
>
> I am trying to shade a package with following tags
>
> 
>  org.example.pkg
> org.example.shaded.pkg
> 
>
> I also have a string in one of my class which matches the pattern gets
>
> modified during shading
>
>  public static void main (String [] args) {
>  System.out.println ("org.example.pkg."); //prints
> org.example.shaded.pkg.
>  System.out.println ("org.example.PKG.".toLowerCase()); //prints
> org.example.pkg.
>  }
>
> Is this expected behavior ?
>
> I was thinking about making use of this behavior. Will it be safe to do so ?
>
> Or its something undocumented so might change without prior notice ?
>
>
> thanks
>
> Anurag
>
>
> -
> 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: My maven is trying to download artifacts from an incorrect repository

2020-06-04 Thread John Patrick
I would try building with a temporary local maven repo to see if
something got corrupt/wrong/incorrect in your user's repo, so i would
do;

$ mvn -Dmaven.repo.local=./mvn-repo clean install

that would for that execution download everything into a local
mvn-repo directory

if that works then your project and settings are fine and something is
corrupt/wrong/incorrect in your user's repo, and i would search for
central.maven.org in your users repo to see if i could spot the issue
and maybe then delete those files

if that fails i would create a dummy empty settings.xml so rule out
your users settings file so;

$ mvn -Dmaven.repo.local=./mvn-repo-local-settings -s ./settings.xml
clean install

if that works then something in the settings file picked up by default
is the issue

if that still fails then it's something in your project

or it's a dependency your downloading that has a repo hard coded

too many options to debug, hope some of the above helps

John


On Thu, 4 Jun 2020 at 00:24, Debashish Ghosh
 wrote:
>
> Hi,
>I am trying to run mvn install on a git hub project 
> https://github.com/hapifhir/org.hl7.fhir.core.git .
> I am using maven version 3.6.3 . The gist of the issue is that it tries to 
> download  maven-bundle-plugin  artifact from   
> http://central.maven.org/maven2/ . This repository doesn't exist so it keeps 
> giving error since the artifacts downloaded are empty error files.
>
> I tried changing the settings.xml to use repository 
> https://repo.maven.apache.org/maven2/ but it still keeps trying to get the 
> artifact from  http://central.maven.org/maven2/ . I don't even understand how 
> it gets a reference to that url.
> It keeps giving me the following error :
> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for 
> C:\Users\debashish.ghosh\.m2\repository
> [INFO] Scanning for projects...
> [DEBUG] Using mirror remote-repos (https://repo.maven.apache.org/maven2) for 
> central (https://repo.maven.apache.org/maven2).
> [DEBUG] Using transporter WagonTransporter with priority -1.0 for 
> https://oss.sonatype.org/content/repositories/snapshots
> [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for 
> https://oss.sonatype.org/content/repositories/snapshots
> Downloading from ossrh: 
> https://oss.sonatype.org/content/repositories/snapshots/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
> [DEBUG] Writing tracking file 
> C:\Users\debashish.ghosh\.m2\repository\org\apache\felix\maven-bundle-plugin\4.2.1\maven-bundle-plugin-4.2.1.pom.lastUpdated
> [DEBUG] Using transporter WagonTransporter with priority -1.0 for 
> http://central.maven.org/maven2/
> [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for 
> http://central.maven.org/maven2/
> Downloading from maven2: 
> http://central.maven.org/maven2/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
> [WARNING] Checksum validation failed, expected  ef60c65b1b81b55cf3acd6ae57c9ff70e4c22583 from maven2 for 
> http://central.maven.org/maven2/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1.pom
> [WARNING] Could not validate integrity of download from 
> http://central.maven.org
>
> I am also attaching the project's pom.xml and my maven's setting.xml
> I am stuck up with this issue for a while now . Any help is greatly 
> appreciated !
>
> Regards
> Debashish
>
> -
> 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: Pd: inteliJ 2020 + maven error

2020-05-25 Thread John Patrick
you don't need a settings.xml in your users home .m2 directory, that is optional

does the project build from the command line? yes / no
when you import into intellij do you select it is a maven project?
in your browser do you have a proxy set? as this might need to be
configured for intellij and also maven
in intell under project structure, has a "Project SDK" been set and is
it the java version you expect?
in intelij settings under "Build, Execution, Development" -> "Build
Tools" -> "Maven" -> "Ignored Files" uncheck files you want to import
as this has caused me issues?

can't see the screenshot you mentioned


On Mon, 25 May 2020 at 21:02, Grzegorz Goleniowski  wrote:
>
> Hello,   I have problem with my clean inteliJ 2020 and maven plugin 
> (uninstalled inteliJ 2019, cleaned registry and fles and installed new 2020 
> version).  I tried many of solutions from internet but none of them helped.  
> I dont have settings.xml file in user/.m2/ folder.  Please help me with 
> running maven - I need it to do my exercises at school, but any of teachers 
> knows solution.  I attached some screens with WeTransfer, maybe them help.  
> we.tl we.tl  error_connection file is when i tried to connect  
> repo.maven.apache.org repo.maven.apache.org  I can connct with this page in 
> my browser (Firefox)   --  Best regards  Grzegorz

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



Re: Profile not being activated by default

2020-05-13 Thread John Patrick
Running `mvn help:active-profiles` does it list your
build-dist-archives profile in the output?
Also `mvn help:all-profiles' is it listed their and does it show the
correct source? so pom or settings

If you add duplicate the executions section into your plugin defined
in the profiles, do you see the plugin executed twice?

Also what version of maven are you using? 3.6.3? or something older?

Sorry not an answer, just things i would do to try and work out if the
config is being seen, seen but ignored, or ignored.

On Wed, 13 May 2020 at 10:37, Adam Retter
 wrote:
>
> I have a build plugin configured like so:
>
> 
> org.apache.maven.plugins
> maven-assembly-plugin
> 
> 
> assemble-archives
> package
> 
> single
> 
> 
> 
> 
> true  
> 
> 
>
>
> I am trying to override its configuration in a profile that I would
> like enabled by default:
>
> 
> 
> build-dist-archives
> 
> true
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-assembly-plugin
> 
> false  
> false
> gnu
> 
>
> src/assembly/dist-assembly-unix.xml
>
> src/assembly/dist-assembly-win.xml
> 
> 
> 
> 
> 
> 
>
>
> I would expect that when I run `mvn package`, the
> `build-dist-archives` profile is active and therefore the
> maven-assembly-plugin SHOULD have skipAssembly=false. In the output
> from Maven I see:
>
> [INFO] --- maven-assembly-plugin:3.3.0:single (assemble-archives) @
> exist-distribution ---
> [INFO] Assemblies have been skipped per configuration of the
> skipAssembly parameter.
>
> This implies that skipAssembly was true.
>
>
> However... if I manually enable the profile by running `mvn package -P
> build-dist-archives`, then the maven-assembly-plugin does indeed have
> skipAssembly=false, and the assembly is correctly built.
>
> Can anyone tell me why the ` true`
> on the profile is being ignored?
>
>
> --
> Adam Retter
>
> skype: adam.retter
> tweet: adamretter
> http://www.adamretter.org.uk
>
> -
> 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: Build Failed

2020-03-19 Thread John Patrick
Did it previously work from this machine?
Are you being a firewall or proxy server?
What version of maven are you using?
What version of Java are you using?

I've just deleted org/apache/maven from my local repository and it
downloaded fine.

If you go to other websites do they work? i.e. are you on a public wifi and
it's doing captive portal before allowing you to access the internet...

John



On Thu, 19 Mar 2020 at 11:53, Robert Manikonda 
wrote:

> Hi
>  Please check the attached error and im unable to build maven project
>
> Thanks
>
> Br//
> Robert M
> --
>
>
>
>
> Thanks & Regards
> Robert Manikonda
> 7013207511
>


Re: java 1.8 and java 11 using toolchains plus compiler and surefire

2019-12-04 Thread John Patrick
Have decided to raise as issue so potential fixes/solutions can move
to their. https://issues.apache.org/jira/browse/SUREFIRE-1731

John

On Wed, 4 Dec 2019 at 10:55, John Patrick  wrote:
>
> So I've created a sample project for Java 1.8 and Java 11, in a Multi
> Release jar setup and with tests that should be run to confirm the
> multi release classes are being loads in the correct jvm.
>
> https://github.com/nhojpatrick/issue-maven-multi-release-jar-testing
>
> The README.md should have all the information needed for execution.
>
> Once the setup for surefire is tweaks, which i've no idea what to do,
> to get it working properly. I've tried looking at;
> https://maven.apache.org/guides/mini/guide-using-toolchains.html
> https://maven.apache.org/surefire/maven-surefire-plugin/java9.html
>
> The surefire java9 setup only executes all tests as that java version
> using toolchains, it doesn't let you do multiple tests executions each
> with a different java version, like the compile plugin allows.
>
> I would expected 3 tests to be executed, 1 test in a Java 1.8 JVM and
> 2 tests in a Java 11 JVM.
>
> Hope this helps you understand what issues i'm having with multi
> release jars and specifically testing when with surefire/failsafe.
>
> I can raise as a defect if needed, it might purely be the
> documentation needs to be made clearer, as things like
> compileSourceRoots within the compile plugin configuration i can't
> find that in the compile plugin documentation e.g. these links;
> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html
> https://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html
> https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html
>
> John
>
>
> On Thu, 21 Nov 2019 at 21:14, Tibor Digana  wrote:
> >
> > Hi John,
> >
> > Have you used the version 3.0.0-M4?
> > There were important fixes for Java 11/Linux (alt. Docker).
> > The message "The forked VM terminated without properly saying goodbye." is
> > too general error message.
> > Can you post the configuration of the plugin with the latest version in
> > your POM including the test summary? What provider you use?
> >
> > Cheers
> > Tibor17
> >
> >
> >
> > On Sat, Aug 31, 2019 at 7:53 PM John Patrick  wrote:
> >
> > > evening,
> > >
> > > i'm having trouble testing a multi-release jar project using
> > > toolchains. i want to test it using both java 1.8 and java 11.
> > >
> > > i've the following structure;
> > > src/main/java
> > > src/main/java11
> > > src/test/java
> > > src/test/java11
> > >
> > > tried both maven-surefire-plugin v 2.22.2 and 3.0.0-M3
> > >
> > > if i set java to 1.8 and do mvn clean install, everything works but it
> > > uses java 1.8 for the testing.
> > >
> > > if i set java to 11 and do maven clean install, it fails starting 
> > > surefire.
> > >
> > > [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException:
> > > The forked VM terminated without properly saying goodbye. VM crash or
> > > System.exit called?
> > > [ERROR] Error occurred in starting fork, check output in log
> > > [ERROR] Process Exit Code: 1
> > > [ERROR] at
> > > org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
> > >
> > > How can I test using java 1.8 then execute tests again using java 11.
> > >
> > > What profile or toolchain settings can i configure so for a surefire
> > > execution it uses the java version i choose?
> > >
> > > John
> > >
> > > -
> > > 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: java 1.8 and java 11 using toolchains plus compiler and surefire

2019-12-04 Thread John Patrick
So I've created a sample project for Java 1.8 and Java 11, in a Multi
Release jar setup and with tests that should be run to confirm the
multi release classes are being loads in the correct jvm.

https://github.com/nhojpatrick/issue-maven-multi-release-jar-testing

The README.md should have all the information needed for execution.

Once the setup for surefire is tweaks, which i've no idea what to do,
to get it working properly. I've tried looking at;
https://maven.apache.org/guides/mini/guide-using-toolchains.html
https://maven.apache.org/surefire/maven-surefire-plugin/java9.html

The surefire java9 setup only executes all tests as that java version
using toolchains, it doesn't let you do multiple tests executions each
with a different java version, like the compile plugin allows.

I would expected 3 tests to be executed, 1 test in a Java 1.8 JVM and
2 tests in a Java 11 JVM.

Hope this helps you understand what issues i'm having with multi
release jars and specifically testing when with surefire/failsafe.

I can raise as a defect if needed, it might purely be the
documentation needs to be made clearer, as things like
compileSourceRoots within the compile plugin configuration i can't
find that in the compile plugin documentation e.g. these links;
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html
https://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html
https://maven.apache.org/plugins/maven-compiler-plugin/multirelease.html

John


On Thu, 21 Nov 2019 at 21:14, Tibor Digana  wrote:
>
> Hi John,
>
> Have you used the version 3.0.0-M4?
> There were important fixes for Java 11/Linux (alt. Docker).
> The message "The forked VM terminated without properly saying goodbye." is
> too general error message.
> Can you post the configuration of the plugin with the latest version in
> your POM including the test summary? What provider you use?
>
> Cheers
> Tibor17
>
>
>
> On Sat, Aug 31, 2019 at 7:53 PM John Patrick  wrote:
>
> > evening,
> >
> > i'm having trouble testing a multi-release jar project using
> > toolchains. i want to test it using both java 1.8 and java 11.
> >
> > i've the following structure;
> > src/main/java
> > src/main/java11
> > src/test/java
> > src/test/java11
> >
> > tried both maven-surefire-plugin v 2.22.2 and 3.0.0-M3
> >
> > if i set java to 1.8 and do mvn clean install, everything works but it
> > uses java 1.8 for the testing.
> >
> > if i set java to 11 and do maven clean install, it fails starting surefire.
> >
> > [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException:
> > The forked VM terminated without properly saying goodbye. VM crash or
> > System.exit called?
> > [ERROR] Error occurred in starting fork, check output in log
> > [ERROR] Process Exit Code: 1
> > [ERROR] at
> > org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
> >
> > How can I test using java 1.8 then execute tests again using java 11.
> >
> > What profile or toolchain settings can i configure so for a surefire
> > execution it uses the java version i choose?
> >
> > John
> >
> > -
> > 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: 2 issues with maven version range

2019-11-26 Thread John Patrick
cheers for the information.

I expect this might be asking space vs tabs, but do others feel the
version range of "[4,5)" should exclude anything starting 5, include
5-SNAPSHOT and any 5...-RC* or 5...-alpha

It seams wrong to have to use "[4,4.999)".

I understand from a maths point of view and from a order point of view
the ordering is correct but from an ease of use, end developers point
of view, i should just be able to use "[4,5)"

thoughts?

On Mon, 25 Nov 2019 at 20:40, Tomo Suzuki  wrote:
>
> I believe your cases do not work with version ranges. Version ranges depend
> on the order of the versions, and thus you cannot filter "-guava".
>
> The ordering of version is defined in
> org.eclipse.aether.util.version.GenericVersion in maven-resolver-util.
>
> Example code to check:
>
> // GenericVersionScheme is in
> org.apache.maven.resolver:maven-resolver-util:1.3.3
> GenericVersionScheme scheme = new GenericVersionScheme();
> List list = new ArrayList<>();
> list.add(scheme.parseVersion("4.7.0"));
> list.add(scheme.parseVersion("4.9.0"));
> list.add(scheme.parseVersion("5"));
> list.add(scheme.parseVersion("5.0.0"));
> list.add(scheme.parseVersion("5.0.0-RC1"));
> list.add(scheme.parseVersion("5.0.0-SNAPSHOT"));
> Collections.sort(list);
> System.out.println(list); // [4.7.0, 4.9.0, 5.0.0-RC1,
> 5.0.0-SNAPSHOT, 5, 5.0.0]
>
> So version "5.0.0-RC1" is smaller than version "5"; you can use [4.7.0,
> 4.999]".
>
> Regards,
> Tomo
>
> On Sun, Nov 24, 2019 at 2:46 PM John Patrick  wrote:
>
> > i'm trying to start using maven version range more but having issues
> > with things like guava and also it not excluding version i believe
> > should be excluded.
> >
> > 1) i don't think this is possible but it might be, take a look a
> > google guava, it has a jre and a android version. using maven version
> > range how can i say any newer jre version, or any newer android
> > version?
> >
> > https://search.maven.org/artifact/com.google.guava/guava
> >
> > something like [25,) but only the jre maybe [25*-jre,)
> >
> > 2) i'm trying to use the version range "[4.7.0,5) "for
> > io.cucumber:cucumber-core. So i'm expecting it to use 4.8.0, not
> > 5.0.0-RC1 which is being picked up, i.e. mvn dependency:tree -Dverbose
> > -Dincludes=io.cucumber
> >
> > https://search.maven.org/artifact/io.cucumber/cucumber-core
> >
> > what do i need to change "[4.7.0,5)" to do it excludes anything starting 5?
> >
> > or are other people having similar issue so gave using trying to use
> > maven version ranges when declaring dependencies?
> >
> > John
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>
> --
> Regards,
> Tomo

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



2 issues with maven version range

2019-11-24 Thread John Patrick
i'm trying to start using maven version range more but having issues
with things like guava and also it not excluding version i believe
should be excluded.

1) i don't think this is possible but it might be, take a look a
google guava, it has a jre and a android version. using maven version
range how can i say any newer jre version, or any newer android
version?

https://search.maven.org/artifact/com.google.guava/guava

something like [25,) but only the jre maybe [25*-jre,)

2) i'm trying to use the version range "[4.7.0,5) "for
io.cucumber:cucumber-core. So i'm expecting it to use 4.8.0, not
5.0.0-RC1 which is being picked up, i.e. mvn dependency:tree -Dverbose
-Dincludes=io.cucumber

https://search.maven.org/artifact/io.cucumber/cucumber-core

what do i need to change "[4.7.0,5)" to do it excludes anything starting 5?

or are other people having similar issue so gave using trying to use
maven version ranges when declaring dependencies?

John

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



Re: mvn versions:display-plugin-updates says I can update from 3 to 2

2019-09-07 Thread John Patrick
Technically you didn't do anything wrong...
If you don't configure what version of java and maven your project
requires, then versions will tell you about all options available.

So that is saying if you want users to build using maven 2.0.1 then
the maven-war-plugin needs to be 2.0.2.

If you add something like below which says I can run on maven 3.6.0 or
newer, I can also only run on java 1.8, or java 11 or newer, e.g. not
java 9 and not java 10. Then when you re-run versions older versions
of maven won't be shown. Also check your using versions 2.7

  org.apache.maven.plugins
  maven-enforcer-plugin
  3.0.0-M2
  

  enforce-requirements
  
enforce
  
  

  
[1.8,9),[11,)
  
  
[3.6.0,)
  

  

  


Hope that helps.

John

On Fri, 6 Sep 2019 at 16:37, Jason Young  wrote:
>
> Did I do something wrong?
>
> $ mvn versions:display-plugin-updates
> ...
> [INFO] Require Maven 2.0.1 to use the following plugin updates:
> [INFO]   maven-war-plugin ... 3.2.3 -> 2.0.2
>
> --
>
> Jason Young

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



java 1.8 and java 11 using toolchains plus compiler and surefire

2019-08-31 Thread John Patrick
evening,

i'm having trouble testing a multi-release jar project using
toolchains. i want to test it using both java 1.8 and java 11.

i've the following structure;
src/main/java
src/main/java11
src/test/java
src/test/java11

tried both maven-surefire-plugin v 2.22.2 and 3.0.0-M3

if i set java to 1.8 and do mvn clean install, everything works but it
uses java 1.8 for the testing.

if i set java to 11 and do maven clean install, it fails starting surefire.

[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException:
The forked VM terminated without properly saying goodbye. VM crash or
System.exit called?
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)

How can I test using java 1.8 then execute tests again using java 11.

What profile or toolchain settings can i configure so for a surefire
execution it uses the java version i choose?

John

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



Re: OS

2019-04-18 Thread John Patrick
>From my experience maven modules don't care about the operating
system, some might, your code and tests might but what is your issue
with hard coding to a specific OS not a surefire issue.

Modules care about the version of maven being used and the version of
java being used.

Does the version of maven your using and the version of java your
using install correctly on windows 2019?


On Thu, 18 Apr 2019 at 11:17, Tibor Digana  wrote:
>
> I don't have access in the second link, but you can report a bug in our
> Jira https://issues.apache.org/jira/projects/SUREFIRE.
> We won't like to have issues from users in the Jira regarding making the
> on-site support but still you can utilize this user mailing list for
> questions.
>
> On Thu, Apr 18, 2019 at 5:59 AM liname...@outlook.com 
> wrote:
>
> > The previously written project wants to run it on Windows 2019, so
> > investigate whether Windows 2019 supports these modules.
> >
> >
> >
> >
> > 发送自 Windows 10 版邮件应用
> >
> >
> >
> > 
> > 差出人: Tibor Digana 
> > 送信日時: Thursday, April 18, 2019 11:38:37 AM
> > 宛先: Maven Users List
> > 件名: Re: OS
> >
> > It is, Surefire on Windows.
> > Why you are asking?
> >
> > T
> >
> >
> > On Thu, Apr 18, 2019 at 3:50 AM liname...@outlook.com <
> > liname...@outlook.com>
> > wrote:
> >
> > >
> > > Hello, I am doing an investigation.
> > > Does Windows Server 2019 support the following products:
> > >
> > > maven-surefire-plugin  2.17
> > >
> > > Is the other version supported?
> > > Can you tell me, thank you very much.
> > >
> > >
> >

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



Re: How to specify to make use of the latest version of hibernate jars using maven?

2018-10-04 Thread John Patrick
I would...
1) Look at the dependency tree and see how it's being included.
2) Add an exclude for hibernate for how it's being included.
3) Add a dependency for hibernate to the version you want to use.

I might not do step 2.


On Wed, 3 Oct 2018 at 09:17, Karl Heinz Marbaise  wrote:
>
> Hi,
>
> first do no crosspost into dev list, cause this is a question for the
> users list...
>
> furthermore do not add image links into a mail cause more or less all
> mail clients filter them out..
>
> Best would be two things.
>
> text copied/pasted and description and more helpful a link to a real
> project or an example project which shows the behaviour?...
>
> Kind regards
> Karl Heinz Marbaise
>
> On 02/10/18 10:14, Senthilkumar Jayakumar wrote:
> > Hi There,
> >
> > In my project Spring (4.3.3) and Hibernate (5.0.11.Final) and JPA (2.1)
> > is currently used and I would like to upgrade the Hibernate version from
> > 5.0.11.Final to 5.3.6.Final. There is no specific version of hibernate
> > mentioned in pom.xml but still 5.0.11 version is being downloaded and
> > used.  Also, I tried explicitly specifying the version in the pom.xml
> > but still executing “make clean install “ I could still see both
> > 5.0.11.Final & 5.3.6.Final  version jars are being downloaded, but still
> >   5.0.11.Final version is being used/packaged along with the application
> > jar.
> >
> > It is still unclear to me as to how the hibernate version is chosen as
> > 5.0.11 and how I can specify to start using 5.3.6. I have shared the
> > details of jar’s and repositories being used below.
> >
> > Appreciate your help in this regard.
> >
> > Hibernate related jar used:
> >
> > Spring related jar used:
> >
> > Following repositories are being used:
> >
> > Thanks,
> >
> > Senthil Jayakumar
>
> -
> 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-failsafe-plugin and JPMS module

2018-09-17 Thread John Patrick
surefire and failsafe plugins appear to work the same

I've had to use the 2.22.0 versions

I defined my plugin in a pluginManagement section and had to add this

${project.custom.failsafe.argLine.jpms}


then in each project I add properties as required like this for
surefire or failsafe depending what they need;
--add-opens 
${project.Automatic-Module-Name}/${project.Automatic-Module-Name}.tests=ALL-UNNAMED
--add-opens 
${project.Automatic-Module-Name}/${project.Automatic-Module-Name}.transform=ALL-UNNAMED
--add-opens 
${project.Automatic-Module-Name}/${project.Automatic-Module-Name}.transform.transformations=ALL-UNNAMED
--add-opens 
${project.Automatic-Module-Name}/${project.Automatic-Module-Name}.testing=com.fasterxml.jackson.databind

project.Automatic-Module-Name is a property in the same pom which
defines it's module name

fyi I'm still trying to get a few differently things working and their
might be other ways of getting it work, but i'm in a multi project
setup and I'm also trying to get the project to work in Java 8, 9, 10
as main development is Java 8 but want to get everything working on
the new releases without denting releases into live.

not sure about OSGi

On Sat, 15 Sep 2018 at 12:17, Alex Sviridov  wrote:
>
> Hi all,
>
> Could anyone of maven-failsafe-plugin give answers to the following short 
> questions:
>
> 1) Does maven-failsafe-plugin support module path and testing JPMS modules?
> 2) When the plugin is used for testing a JPMS module are integration tests 
> executed from another JPMS module? For example pax-exam (for OSGi) creates 
> another temp bundle.
> 3) Is there an example which shows how to use the plugin for integration 
> testing of JPMS module?
>
> I would be helpful for any help.
>
> Best regards, Alex Sviridov
>

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



Re: Is there another alternative to using maven plug-in ?

2018-01-26 Thread John Patrick
Change your pom to something like this;

Hi5S
Hi5S
0.0.1-SNAPSHOT
war


UTF-8
1.8
1.8





   org.apache.maven.plugins
   maven-war-plugin
   3.1.0




war, tell maven your wanting to create a war
not a jar, using maven-war-plugin as a plugin as show above tells
maven your wanting to use a specific version of the maven plugin.
there are pros and cons to hard coding a maven plugin version. i
always do because i've been burnt on projects where they needed a
specific version but didn't define what version they needed and whilst
that version was the latest things worked correctly. But then you come
back to bug fixing that project 2-4 years later and the latest maven
plugin works differently.

dependencies are for external code that your java code depends upon




On 26 January 2018 at 11:08, Karen Goh  wrote:
> Hi expert,
>
> I have been running into alot of issue lately and I suspect if it is because 
> I have using Maven plug-in?
>
> Here's how I do the maven-war-plugin:
>
> Hi5S
> Hi5S
> 0.0.1-SNAPSHOT
> war
> 
> 
> UTF-8
> 1.8
> 1.8
> 
>
> 
> 
> org.apache.maven.plugins
> maven-war-plugin
> 3.1.0
> provided
> 
>
> I'd like to know if it is ok I don't use maven to do the compile but used 
> Eclipse to do it instead ?
>
> If it is so, how should I change the maven-war-plugin to ?
>
> I feel that this is the cause that Eclipse is not able to do proper debugging 
> as in showing the stackover of what's happening when I run debug on server.
>
> Correct me if I am wrong..but I am at my wits end and this is the strongest 
> suspect.
>
> Hope someone can tell me how to make pom as simple as possible...I just want 
> to add the relevant dependencies...that's all.
>
> Tks & regards,
> Karen
>
> -
> 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: When time do we need to delete .m2/repository

2017-09-12 Thread John Patrick
I do similar to Eric for jenkins.

But also for both developer builds and jenkins, I've got all projects
setup to use the
http://www.mojohaus.org/build-helper-maven-plugin/remove-project-artifact-mojo.html
plugin. With both a default and clean phase execution. So when either
jenkins or a developer does a clean, old artifacts are removed. This I
find stops the need to intervention of having to manually clean up the
local repo.

I've also got a local artifactory instance running inside a vagrant
vm, so i can safely delete my local repo if I've trouble and it can
download what i needs to again. It also helps when working offline or
over a slow internet connection as most things I've already download
previously.

John




On 12 September 2017 at 12:56, Eric B  wrote:
> I have my jenkins jobs designed to use private m2 repos per job.  I dont
> find the need to delete them since the only transient changes are the
> snapshots, which get reevaluated at every build anyhow.
>
> Thanks
>
> Eric
>
>
> On Sep 11, 2017 2:43 PM, "Stephen Connolly" 
> wrote:
>
> On Fri 8 Sep 2017 at 11:22, Baptiste Mathus  wrote:
>
>> Le 7 sept. 2017 17:00, "Tushar Kapila"  a écrit :
>>
>> I had to delete a directory once as i had pressed Ctrl-C while it was
>> downloading jars and a 0kb jar was created. This was in 2013, maybe it
>> downloads to a temp file and then create the final file? It took sometime
>> to debug. Builds were failing for no reason only on that test box, but
>> working fine on my dev box, lots of fun.
>>
>> > If you don't, and
>> > you have static (persistent) agents, very bad things will happen at some
>> point.
>>
>> Can you explain this? What agents?
>>
>>
>> Hehe, I was talking about Jenkins agents, sorry just realized I mixed my
>> MLs. I thought I was reading Jenkinsci-users one :).
>
>
> Bad Ba(p)tiste™
>
> ;-)
>
>
>>
>>
>> On Thu, Sep 7, 2017 at 1:59 PM, Baptiste Mathus  wrote:
>>
>> > 2017-09-07 9:17 GMT+02:00 Guang Chao :
>> >
>> > > On Fri, Sep 1, 2017 at 11:31 AM, mingleizhang 
>> > > wrote:
>> > >
>> > > > Hello friends here.
>> > > >
>> > > >
>> > > >  I would like ask a question ,it probably looks silly, but I
>> still
>> > > > want to know. As the subject said, when time do we need to delete
>> > > > .m2/repository files ? Does anyone improve my mind ? Thank you very
>> > much!
>> > > >
>> > > >
>> > > >
>> > > There is no need to do this unless you are out of disk space. It will
>> > cause
>> > > no harm, but maven will redownload all dependencies again. So that
> will
>> > > slow you down a bit.
>> > >
>> >
>> > I am actually going to say the contrary. You should, at I'd even say,
> you
>> > *must* wipe out Maven repositories on a regular basis. If you don't, and
>> > you have static (persistent) agents, very bad things will happen at some
>> > point.
>> >
>> > So, yeah, redownloading it is going to add some time to build, but this
>> is
>> > a matter of speed vs. reproducibility, so better target
>> reproduciblity/non
>> > flakiness then see how to optimize, not the contrary.
>> >
>> > And obviously, *NEVER, EVER share that .m2/repository between running
>> > builds*.
>> >
>> >
>> > >
>> > >
>> > > > Thanks
>> > > > Rice.
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > > Guang 
>> > >
>> >
>>
>>
>>
>> --
>> Regards
>> Tushar Kapila
>>
> --
> Sent from my phone

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



Re: When time do we need to delete .m2/repository

2017-09-01 Thread John Patrick
when every your running out of disk space

you can also use this plugin
http://www.mojohaus.org/build-helper-maven-plugin/remove-project-artifact-mojo.html
so when you do a clean or a install, it will also remove that project
from your local repo.

e.g. if your building a JEE project or other war project, then it will
mean you only have the currently build version in your local repo.
which is probably what you actually need. as your build server should
be publishing released versions and putting them into a central
server. so if you need a released version then you can simply download
it.


On 1 September 2017 at 04:31, mingleizhang  wrote:
> Hello friends here.
>
>
>  I would like ask a question ,it probably looks silly, but I still want 
> to know. As the subject said, when time do we need to delete .m2/repository 
> files ? Does anyone improve my mind ? Thank you very much!
>
>
> Thanks
> Rice.

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



Re: How to up date a property in a POM to a specific value

2017-08-26 Thread John Patrick
If your talking about the codehaus version plugin which is now hosted
at mojohaus, it's a different mailing list i think...

http://www.mojohaus.org/versions-maven-plugin/mail-lists.html



On 23 August 2017 at 21:07, Sandra Parsick <spars...@web.de> wrote:
> Thanks for your answers.
>
> Passing the property value from command line don't meet my condition,
> because the new value has to be stored in the POM.
>
> I found out that a new mojo called "set-property" was implemented in the
> current master branch of versions maven plugin. This mojo would meet my
> use cases.
>
> Does it exist a target date for the next release of version maven plugin?
>
> Best regards,
>
> Sandra
>
>
> Am 22.08.2017 um 11:07 schrieb Anders Hammar:
>> Specifying property values from command line when doing a release could be
>> bad practice, as the pom deployed would not contain the value from command
>> line. It all depends on what the property is used for.
>>
>> /Anders
>>
>> On Tue, Aug 22, 2017 at 10:34 AM, John Patrick <nhoj.patr...@gmail.com>
>> wrote:
>>
>>> I think I do similar and I simply use
>>> -DpropertyName=newValueForProperty on the command line when executing
>>> the maven command, or via a profile and then activate the required
>>> profile.
>>>
>>> Just checking the property is already defined in a pom e.g.
>>> ..oldValueForProperty>> propertyName>
>>>
>>> At build time I would simply change the command line I'm using to
>>> build. I do this type of thing all the line when testing new
>>> dependencies, different external systems, loading different
>>> properties/config via a different dependency.
>>>
>>> John
>>>
>>>
>>> On 21 August 2017 at 08:50,  <spars...@web.de> wrote:
>>>> Hello mailing,
>>>>
>>>> I use property values, defined in a POM, during resource filtering. I'd
>>> like to change this properties during my release process. I know that the
>>> Maven Version Plugin has a goal named update-properties. But it requires
>>> that the properties are used in the dependency definition. I search for
>>> something like 'set-property -Dname=propertyName
>>> -Dvalue=newValueForProperty'. Do you know a Maven Plugin that supports this
>>> use case?
>>>>
>>>> Thank you and best regards,
>>>>
>>>> Sandra Parsick
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>
>>
>

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



Re: How to up date a property in a POM to a specific value

2017-08-22 Thread John Patrick
I think I do similar and I simply use
-DpropertyName=newValueForProperty on the command line when executing
the maven command, or via a profile and then activate the required
profile.

Just checking the property is already defined in a pom e.g.
..oldValueForProperty

At build time I would simply change the command line I'm using to
build. I do this type of thing all the line when testing new
dependencies, different external systems, loading different
properties/config via a different dependency.

John


On 21 August 2017 at 08:50,   wrote:
> Hello mailing,
>
> I use property values, defined in a POM, during resource filtering. I'd like 
> to change this properties during my release process. I know that the Maven 
> Version Plugin has a goal named update-properties. But it requires that the 
> properties are used in the dependency definition. I search for something like 
> 'set-property -Dname=propertyName -Dvalue=newValueForProperty'. Do you know a 
> Maven Plugin that supports this use case?
>
> Thank you and best regards,
>
> Sandra Parsick
>
> -
> 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: rat:check bad default?

2017-07-21 Thread John Patrick
Does this help?
https://maven.apache.org/settings.html#Plugin_Groups

Maybe something like this...


org.apache.maven.plugins
org.apache.rat
org.mojohaus.mojo
org.codehaus.mojo


With codehaus dead, either moved to github or mojohaus, the scan
ordering might need to be changed for future releases.

Not sure if you can do it within the pom.xml, or it's purely a
settings.xml change needed.

John


On 21 July 2017 at 18:48, Jason Kuster  wrote:
> Hi,
>
> I had a problem which I was fighting with for a few hours before figuring
> out. I was trying to run the rat plugin manually against my project by
> invoking `mvn rat:check`. It was failing to pick up the configuration I was
> putting in my pom no matter what I did.
>
> I finally noticed after a while that I was configuring
> org.apache.rat:apache-rat-plugin in my pom, but that mvn rat:check was
> executing the `rat-maven-plugin` instead. It appears that the codehaus rat
> maven plugin (last developed in 2007) is what is resolved by invoking
> `rat`, and that running the modern rat plugin requires fully qualifying the
> name on the command line. I have two questions.
>
> First, is it possible to set an override in my project's pom to clarify
> that when I or another developer execute `mvn rat:check` I mean
> org.apache.rat:apache-rat-plugin instead of
> org.codehaus.mojo:rat-maven-plugin?
>
> Second, is it possible to fix this on a more global scale so that other
> folks don't run into the same problem in the future?
>
> Best,
>
> Jason

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



Re: Is there a way to make mvn default to Java 8?

2017-01-13 Thread John Patrick
If you only have Java 8 installed, would that work? Or does target
still default to something older? I've got Java 7, 8 and 9 on my
machine so can't easily test myself.


On 13 January 2017 at 17:04, Chris Barlock  wrote:
> Most projects I've been on have a notion of a "parent" or "common" script
> (whether Ant, Maven or just about anything else).  With Maven, you could
> define a  POM that contains all the common stuff.  Of course, you
> would have to add the parent element to all child POMs, but if you ever
> want to change something in the parent (such as this Java version), you
> would only have to do it once.
>
> Chris
>
>
>
>
> From:   Dean Schulze 
> To: users@maven.apache.org
> Date:   01/13/2017 11:51 AM
> Subject:Is there a way to make mvn default to Java 8?
>
>
>
> I would like to avoid having to add
>
> 
> 1.8
> 1.8
> 
>
> to every pom.xml.  Is there a global setting I can set in mvn to make Java
> 8 the default so I don't have to add this to every pom.xml?
>
>
>
>

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



Re: Structuring bigger Maven projects

2016-11-30 Thread John Patrick
I've worked on several large 'enterprise' projects, several could have
been 4-6 projects in their own right so maybe 12 ear's, one had 120
pom files. Lucky it got refactored and split into I think 40 repos.

I would suggest;
) branching, using git flow method.

) jgit-flow plugin (https://bitbucket.org/atlassian/jgit-flow), not
maven-release-plugin

) deployment, now only using Ansible as finding easier to use than chef/puppet

) versioning, using
http://www.mojohaus.org/build-helper-maven-plugin/parse-version-mojo.html
have a release profile in the companies parent pom

) for code quality, using atlassian stash which is forcing 1
successful build and 1 approver before for code to be merged into
develop, successful build also means code, test, findbugs etc.

) cim, still using jenkins v1, not upgraded to v2 yet. have a mix of
jobs, most deployable artifacts have a pipelines checking develop and
waiting for 15 mins before kicking off a build to allow multiple
merges, then automatically building, deploying and configuring using
ansible to the development environment, running qa step(s) either
cucumber or selenium, if they all pass then automatically creating a
release candidate and closing the release branch and merging into
master

) 1 git repo for each deployable artifact
) git repo for shared code/framework, logically group so not all in 1
repo but not all with their own repo.

) each logical cucumber project was it's own git repo, so if it
changed it was easier to automatically trigger it's execution

) jenkins or what every cim you pick, use multiple slaves to run the
tasks, yes you could get everything running on the master jenkins node
but it will quickly become overload.

) this is how I do release, with the mvn -Pdo-release -N validate, it
will bump the version numbers create the release branch, automatically
finish it, tag it, so develop branch always see -SNAPSHOT's and master
never sees -SNAPSHOT's http://pastebin.com/DbAGACk7


John


On 30 November 2016 at 18:44, Karl Heinz Marbaise  wrote:
> Hi,
>
>
>
> On 30/11/16 19:18, Florian Schätz wrote:
>>>
>>> A library project to be
>>> shared between multiple applications each having its own release-cycle
>>> should not be part of a multi-module project used to build such an
>>> application and should be an independent project with its own
>>> release-cycle.
>>
>>
>> While this is of course a good idea, especially when starting to create
>> new applications, the library projects will grow with the applications
>> and not independently of them. We cannot start by first investing months
>> to create the perfect will-work-for-ten-years library and only then
>> start coding the application that will, in the first months, only use
>> 10% of all these features. So, realistically, during a development
>> cycle, both the application and the library will grow... (which doesn't
>> mean that we cannot separate them)
>>
>> Which leads me, for example, to the problem that I still want to
>> automate as much as possible. I would like, for example, to click one
>> button in my build server, perhaps enter some parameters and get a new
>> release candidate of the libraries from the current release branch,
>> update the dependency version of the application to this rc version,
>> make the application an rc (from the application's release branch),
>> install them both into the repository, tag the current status on git and
>> deploy the rc application onto the server.
>>
>> Especially for bigger projects, I want to keep the amount of manual work
>> needed as small as possible. As much building should be done
>> automatically, if possible. And I would like not having to code a
>> jenkins or maven plugin for that purpose (but of course, I would, if
>> needed, no problem there).
>
>
>
> You can simply use maven-release-plugin (in Maven itself) which you can used
> to  fully automatically create releases of your project...This will need
> only a plugin in Jenkins which handles all those stuff...correctly
> configured things like scm entries in your pom file tagging in Git will be
> done as well
>
> Sometimes you might need to improve that using the versions-maven-plugin in
> combination with some pipeline steps in Jenkins...which prevents some
> drawbacks of the maven-release-plugin
>
>
> May be you need to think about using the Maven integration in Jenkins or
> using freestyle projects or better start using pipelines ...(I often
> observed performance drawbacks in relationship with Maven integration in
> Jenkins)...
>
>
> https://wiki.jenkins-ci.org/display/JENKINS/M2+Release+Plugin
> https://wiki.jenkins-ci.org/display/JENKINS/Release+Plugin
>
>
> Kind regards
> Karl Heinz Marbaise
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>


Re: Maven Compiler Plugin 3.5.1 bug

2016-10-22 Thread John Patrick
hi robert,

what is the plugin that creates files and puts them into the
generated-sources/annotations directory

as from how i understand it works, the plugin should on execution
dynamically register that new extra directory into the list of source
directories that the maven-compiler-plugin will look at.

as if i manually create
${project.build.directory}/generated-sources/annotations i would not
expect maven-compiler-plugin to know about it, and so compile files
from that directory. if that is how maven-compiler-plugin works then
it would need to be preloaded with all possible generated source
directories of all plugins that generate source.

do you explicit state all plugins your using within your pom? could
the source generation plugin have been updated???

John


On 22 October 2016 at 22:17, Robert Patrick  wrote:
> Periodically, I update the versions of the Maven plugins for my projects.  
> Today was one of those days.  What I found is that the maven-compiler-plugin 
> 3.5.1's compile goal no longer seems to not be including the 
> ${project.build.directory}/generated-sources/annotations
>
> directory in the compile.
>
>
>
> My project generates a Java file in the process-resources phase and puts the 
> file in this directory.  Other files in the normal src/main/java location 
> include/depend on this generated file.  When I run my build with 3.5, it 
> works perfectly.  When I run the exact same build with 3.5.1, it fails.
>
>
>
> I logged into my Apache Jira account but the compiler plugin project does not 
> seem to want to let me create an issue for this.   Is there some sort of 
> special permission required to create an issue on the maven-compiler-plugin?
>
>
>
>
>
>

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



Re: Cobertura Maven Plugin works locally, but not in Jenkins

2016-07-12 Thread John Patrick
I've had similar, where versions between locally and jenkins where
different. Question to ask yourself to see if you have checked;
) maven version used locally vs jenkins
) java version used locally vs jenkins
) operating system? same? both 32bit or 64bit?
) does your jenkins project have a private repo?
) do you define all plugins used within your pom?

I've had issues so now I always define all plugins used in the pom, I also
use the prerequisites to define maven version, plus the following
properties, maven.compiler.source, maven.compiler.target,
project.build.sourceEncoding, project.build.outputEncoding,
project.reporting.outputEncoding.

If your able to log into the jenkins box, if you manually execute the same
command as you do locally does it work?

Try deleting the jenkins repo.

After several issues, I always setup each jenkins project to use a separate
maven repo i.e. per workspace. Always define exact plugin version to use,
checking with versions:display-plugin-updates to make sure non are being
pulled in from the super pom. I've not had anymore issues, but saying that
I don't know if things have got better or not.

John


On 12 July 2016 at 15:48, Hohl, Gerrit  wrote:

> Hello everyone,
>
>
>
> I faced an odd problem today:
>
> We have a Maven Build which also includes the creation of a
> documentation.
>
> One of the plugins creating the reports is the Cobertura Maven Plugin.
>
> If I execute it on my local machine it works perfectly.
>
> Also the project has no code at all (it's more an Ant and aggregation
> project) it creates the documentation and also deploys it.
>
>
>
> But if I try to build the same project in our Jenkins build service the
> Maven jobs just days while trying to execute the Cobertura Maven Plugin.
>
> I added --debug, but also if the debug messages are enabled I don't see
> an error, stack trace or whatever in the log.
>
> On my local machine the output looks like this:
>
>
>
> [...]
>
> [DEBUG] resolving version for org.codehaus.mojo:cobertura-maven-plugin
>
> [DEBUG] resolved org.codehaus.mojo:cobertura-maven-plugin version from
> the reporting.plugins section: 2.7
>
> [INFO] configuring report plugin
> org.codehaus.mojo:cobertura-maven-plugin:2.7
>
> [...]
>
> [DEBUG] org.codehaus.mojo:cobertura-maven-plugin:jar:2.7:
>
> [DEBUG]net.sourceforge.cobertura:cobertura:jar:2.1.1:compile
>
> [DEBUG]   org.ow2.asm:asm:jar:5.0.1:compile
>
> [DEBUG]   org.ow2.asm:asm-tree:jar:5.0.1:compile
>
> [DEBUG]   org.ow2.asm:asm-commons:jar:5.0.1:compile
>
> [...]
>
> [DEBUG]org.apache.maven.shared:maven-invoker:jar:2.0.11:compile
>
> [DEBUG] Created new class realm
> plugin>org.codehaus.mojo:cobertura-maven-plugin:2.7
>
> [DEBUG] Importing foreign packages into class realm
> plugin>org.codehaus.mojo:cobertura-maven-plugin:2.7
>
> [DEBUG]   Imported:  < maven.api
>
> [DEBUG]   Imported: org.apache.maven.doxia.logging.Log <
> plugin>org.apache.maven.plugins:maven-site-plugin:3.5.1
>
> [DEBUG]   Imported: org.apache.maven.doxia.logging.LogEnabled <
> plugin>org.apache.maven.plugins:maven-site-plugin:3.5.1
>
> [...]
>
>
>
> The output with the Jenkins server looks like this:
>
>
>
> [...]
>
> [DEBUG] resolving version for org.codehaus.mojo:cobertura-maven-plugin
>
> [DEBUG] resolved org.codehaus.mojo:cobertura-maven-plugin version from
> the reporting.plugins section: 2.7
>
> [INFO] configuring report plugin
> org.codehaus.mojo:cobertura-maven-plugin:2.7
>
> [...]
>
> [DEBUG] org.codehaus.mojo:cobertura-maven-plugin:jar:2.7:
>
> [DEBUG]net.sourceforge.cobertura:cobertura:jar:2.1.1:compile
>
> [DEBUG]   org.ow2.asm:asm:jar:5.0.1:compile
>
> [DEBUG]   org.ow2.asm:asm-tree:jar:5.0.1:compile
>
> [DEBUG]   org.ow2.asm:asm-commons:jar:5.0.1:compile
>
> [...]
>
> [DEBUG]org.apache.maven.shared:maven-invoker:jar:2.0.11:compile
>
> [JENKINS] Archiving site from c:\jenkins_data\workspace\target\site to
> C:\.jenkins\jobs\xxx\site
>
>
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logResult
>
> INFORMATION:
> 
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logResult
>
> INFORMATION: BUILD FAILURE
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logStats
>
> INFORMATION:
> 
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logStats
>
> INFORMATION: Total time: 35.284s
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logStats
>
> INFORMATION: Finished at: Tue Jul 12 15:43:15 CEST 2016
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logStats
>
> INFORMATION: Final Memory: 24M/174M
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> sessionEnded
>
> INFORMATION:
> 

Re: Is there any way to have archetype:generate fill in "boilerplate" fields?

2016-07-05 Thread John Patrick
What about creating a company/personal pom, publish that to your local repo
or company repo, then simply have that as the parent of all the projects
you work on. You can version it and update it as things develop.

It's what I do, if you have a standard setup you can even use parameters
for scm urls i.e. HOST/${project.groupdId}-${project.artifactId}.

John


On 5 July 2016 at 19:30, Mark H. Wood  wrote:

> It's a small thing, but it would be handy if I could stash some
> settings somewhere that would cause the archetype generator to fill in
> my  and  and the like.
>
> --
> Mark H. Wood
> Lead Technology Analyst
>
> University Library
> Indiana University - Purdue University Indianapolis
> 755 W. Michigan Street
> Indianapolis, IN 46202
> 317-274-0749
> www.ulib.iupui.edu
>


Re: How does maven choose which plugin version to use?

2016-07-04 Thread John Patrick
The lifecycle defines the version to use, but if you edit your pom to
use a different version it will take precedence from what I've
experienced.

Editing the pom I believe this is a better solution as otherwise
different developers or different machines might behave differently.
Where as if the pom in source control has the version specified it
will be the same version of all builds.

John


On 04/07/2016, alexd92  wrote:
> Thank you for the info. I'll set the version in the parent pom (I believe
> is
> the simplest solution).
> I've read about
> https://maven.apache.org/ref/3.3.9/maven-core/default-bindings.html and now
> I realized it is packed in maven-core.jar (I thought it is editable..).
>
> Is there another way to upgrade a plugin version instead of editing the
> pom?
> Is not possible to specify this at global level (somewhere in maven
> installation folder)?
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/How-does-maven-choose-which-plugin-version-to-use-tp5874198p5874202.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
>
>

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



Re: How do I separate UTs and ITs directory?

2016-06-24 Thread John Patrick
I've also used the separate module for integration tests before.

I've also used junit categories and testng groups before.

Some places I've worked prefer seperate modules over categories/groups.

Usually I put selenium or cucumber tests in separate modules and also have
groups groups as well.

John


On 24 June 2016 at 17:02, Karl Heinz Marbaise  wrote:

> Hi,
>
> On 6/24/16 10:58 AM, zuxiong lin wrote:
>
>> Hi. maven devs.
>> According to
>>
>> http://maven.apache.org/surefire/maven-failsafe-plugin/examples/inclusion-exclusion.html
>> , the Failsafe Plugin will automatically identify the wildcard patterns :
>> "**/IT*.java" .. "**/*IT.java"
>>
>>
>> But how do I separate UTs and ITs directory with
>>
>> https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
>> ?
>>
>> +Project
>>
>> +src/it/java
>>
>
> If you take a look into the default layout there is stated:
>
> Integration Tests (primarily for plugins)
>
>
> If you need integration tests it's best having a complete different module
> which contains the IT's...
> See also
> http://stackoverflow.com/questions/37998040/where-should-the-integration-tests-be-stored-when-using-the-maven-failsafe-plugi
>
> Kind regards
> Karl Heinz Marbaise
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Maybe a lack of specification ?

2016-04-13 Thread John Patrick
Nice spot, just tried to work that one out myself.

My guess is... the documentation generation plugin has been updated and it
now skips/ignores required properties.

If you compare those two plugins, you can see resources was last published
1.5 years ago;

maven-resources-plugin is 2.7, last updated 2014-09-29
maven-compiler-plugin is 3.5.1, last updated 2016-02-06

If a new resources plugin occurs and it's updated to use new
dependencies/plugins, I would bet it doesn't have the required properties
section.

Anyway, my view would be this is a bug/defect with the documenation plugin
skipping/ignoring required properties. As you have highlighted the compiler
doesn't document it uses of ${project.build.outputDirectory}, and if you
look at latest file you can see more required properties are also not
listed.

https://github.com/apache/maven-plugins/blob/cb254e434a40b7ff58c936abbb3f823029a0e466/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java

John




On 13 April 2016 at 22:26, Raffaele Esposito  wrote:

> Hi all,
>
> In the Maven super-pom.xml definition (4.0.0)
> in the build section are defined some configuration parameters,
> such as:
>
> 
>
> ${project.basedir}/target
>
> ${project.build.directory}/classes
> ${project.basedir}/target
>
> ${project.build.directory}/classes
> ${project.artifactId}-${project.version}
>
> ${project.build.directory}/test-classes
> ${project.basedir}/src/main/java
> ...
>
> Now let's take for example :
> ${project.build.directory}/classes
>
> *resources:resources* plugin goal uses it, as described in the
> documentation:
>
> Name Type Since Description outputDirectory File - The output
> directory into which to copy the resources. Default value is:
> ${project.build.outputDirectory}.
>
> *compiler:compile* plugin goal uses it as well (I guess),
> but it is nowhere defined in the documentation of that plugin. Why is that
> ? is it a lack in the specification or what ?
> am I missing something ?
>


Re: How to move the directory of a multi-module project?

2014-05-30 Thread John Patrick
You can't do exactly what you are aiming to do dynamically but you could
hard code that structure into your pom's.

Look into the property;

project.build.directory

If you defined that in the respective pom's as below;

project.build.directory=/tmp/grandfarther/target
project.build.directory=/tmp/grandfarther/farther/target
project.build.directory=/tmp/grandfarther/farther/son/target

in the respective pom's you could create the structure your after.

Because grandfarther, farther, son are arbitrary directory names and maven
doesn't care what it's currently directory name is and only modules
configuration only needs to point to a directory with a pom in.

Another question is why do you want/need this structure as i often find the
answer to that the real root cause.

John





On 30 May 2014 04:28, Thai Dang Vu dx...@yahoo.com wrote:

 Hi All,

 I have a multi-module project in the /home/me/projects/grandfather like
 this:

 grandfather
  |
  | pom.xml
  |
  | father
   |
   | pom.xml
   |
   | son
  |
  | pom.xml

 If I build that project, I will have these target directories:
 /home/me/projects/grandfather/target,
 /home/me/projects/grandfather/father/target and
 /home/me/projects/grandfather/father/son/target.


 Is there anyway to modify only 1 pom.xml (it doesn't matter if it is
 grandfather's or father's or son's) so that the target directories are
 /tmp/grandfather/target, /tmp/grandfather/father/target and
 /tmp/grandfather/father/son/target?

 Regards.


Re: How to move the directory of a multi-module project?

2014-05-30 Thread John Patrick
So I'm guessing you then have mapped tmp to a ram drive, otherwise tmp will
still be on your SSD unless you also have a non-SSD too which is mapped to
tmp.

Honestly as long as it's a new ish SSD, your not writing GB and GB per hour
constantly 24/7, your SSD is under about 60% full then I would not worry
that much.

They are designed to wear the drive evenly which is an issue if you want to
get ride of the SSD as dban won't correctly scrub the disk as the disk lies
about which sector is being written too.

My development laptop is 12 months old with a 512GB SSD, about 50% full and
I'm doing several builds an hour, with one full clean install per hour and
I'm expecting it to last lots more years before it dies.

John



On 30 May 2014 10:48, Thai Dang Vu dx...@yahoo.com wrote:


 Thanks, John, for answering my question. There's no special reason, I have
 the project on a SSD drive and don't want to write to that so often.



 On Friday, May 30, 2014 5:28 AM, Karl Heinz Marbaise khmarba...@gmx.de
 wrote:



 Hi,


 
  grandfather
|
| pom.xml
|
| father
 |
 | pom.xml
 |
 | son
|
| pom.xml
 
  If I build that project, I will have these target directories:
 /home/me/projects/grandfather/target,
 /home/me/projects/grandfather/father/target and
 /home/me/projects/grandfather/father/son/target.
 
 
  Is there anyway to modify only 1 pom.xml (it doesn't matter if it is
 grandfather's or father's or son's) so that the target directories are
 /tmp/grandfather/target, /tmp/grandfather/father/target and
 /tmp/grandfather/father/son/target?

 So my question to this is: Why do want to do this? What's the reason to
 use a folder outside the modules ? Can you explain your use case and why
 you need it such that way and can't stuck with the conventions
 project/target ?

 Kind regards
 Karl-Heinz Marbaise


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



Re: Maven and JPA/EclipseLink Configuration...

2013-07-10 Thread John Patrick
On 10 Jul 2013, at 06:05, Baptiste MATHUS bmat...@batmat.net wrote:

 If those properties are specific to eclipselink, then I think it's ok and
 simpler to just leave them in the persistence.xml even if they're actually
 not used when EclipseLink isn't the provider. Then package only one ear.

 Cheers


 2013/7/9 John Patrick nhoj.patr...@gmail.com

 I'm working on a project that uses JPA EclipseLink, everything started of
 fine with Jetty for developers development and WebLogic and Oracle proper
 ear deployments.

 EclipseLink has two values that need to be set in persistence.xml depending
 upon your Application Server and Database;
 eclipselink.target-server
 eclipselink.target-database

 This mean we have two profiles, Jetty and Release.

 Now we support WebSphere and DB2, so have gone to 5 profiles and the need
 to rebuild the ear 4 times which each profile.

 Profiles
 Jetty
 WLSOracle
 WLSDB2
 WASOracle
 WASDB2

 I feel I'm doing something wrong...

 Does someone have any suggestions on what to look at so i could potentially
 build it once and get all the 4 ears build in one command? I've thought
 about types or classifiers but unsure if that is just another hack...

 Thoughts? As we soon might also need to support MySQL and Glassfish so
 their is another 5 profiles and 5 more builds for a release.

 John



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

Mathus I think you miss understood my point. I need to build 4
different ears currently as eclipselink auto detections fails about
once a week and we can reproduce on demand.

each ear has a different combination of values.

ear 1 = WebLogic / Oracle
ear 2 = WebLogic / DB2
ear 3 = WebSphere / Oracle
ear 4 = WebSphere / DB2

I can't build one ear, say ear 1 as the value for the database setting
would be wrong when DB2 is the backend. Also the value for the
application server would be wrong when deployed to WebSphere.

If eclipselink auto detect worked 100% I could create one ear but a
few issues in production which we can't reproduce in test on demand
mean we need to explicitly define application server and database
server.

From the off list replies it looks like others are having similar
issues and doing similar things.

cheers,
John

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



Maven and JPA/EclipseLink Configuration...

2013-07-09 Thread John Patrick
I'm working on a project that uses JPA EclipseLink, everything started of
fine with Jetty for developers development and WebLogic and Oracle proper
ear deployments.

EclipseLink has two values that need to be set in persistence.xml depending
upon your Application Server and Database;
eclipselink.target-server
eclipselink.target-database

This mean we have two profiles, Jetty and Release.

Now we support WebSphere and DB2, so have gone to 5 profiles and the need
to rebuild the ear 4 times which each profile.

Profiles
Jetty
WLSOracle
WLSDB2
WASOracle
WASDB2

I feel I'm doing something wrong...

Does someone have any suggestions on what to look at so i could potentially
build it once and get all the 4 ears build in one command? I've thought
about types or classifiers but unsure if that is just another hack...

Thoughts? As we soon might also need to support MySQL and Glassfish so
their is another 5 profiles and 5 more builds for a release.

John


Re: Remove and Rename Files in MAven

2012-12-14 Thread John Patrick
Quick answer,

If you want to do exactly what you asking, then I would use the antrun
plugin to do that.

Personally settings like this are always external, so the projects I'm
working on create a zip with this files in, one for each environment
and allow each environment to be altered without repackaging the
war/ear/jar.

Silly just to repackage and redeploy if you want different logging
values. Our check log4j for changes and automatically pick that up.


On 14 December 2012 15:49, godisone rajan.j...@verizonwireless.com wrote:
 Hi

 I have very simple question. I have the files like

 1.)log4j_dev.properties for dev
 2.)log4j_uat.properties for uat

 So i just want to

 1.rename the file when the packagins is done and
 2.How to pass the variable like

 Denv=DEV

 so that i can take decison based on the enviroemnt variable.

 Thanks
 Raj




 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Remove-and-Rename-Files-in-MAven-tp5738251.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


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



Re: Why does mvn compiile using java 1.3?

2012-11-16 Thread John Patrick
Jasper,

I also experience similar issues, it comes down to what version of
java you have installed, what version of the plugin you use and what
their respective defaults are. To avoid this I would explicitly state
version's of plugins and also a few other useful properties. I always
but at the least the following in every new project pom;

project ...
[...]
   build
[...]
  pluginManagement
[...]
 plugins
[...]
plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
   version2.5.1/version
/plugin
[...]
 /plugins
[...]
  /pluginManagement
[...]
   /build
[...]
   properties
[...]
  project.custom.encodingUTF-8/project.custom.encoding
  project.custom.java.version1.6/project.custom.java.version
  
maven.compiler.source${project.custom.java.version}/maven.compiler.source
  
maven.compiler.target${project.custom.java.version}/maven.compiler.target
  
project.build.sourceEncoding${project.custom.encoding}/project.build.sourceEncoding
  
project.build.outputEncoding${project.custom.encoding}/project.build.outputEncoding
  
project.reporting.outputEncoding${project.custom.encoding}/project.reporting.outputEncoding
[...]
   /properties
/project

John

On 16 November 2012 09:50, Olivier Lamy ol...@apache.org wrote:
 Hi,
 Which maven-compiler-plugin version are you using ?
 Does your colleague set JAVA_HOME env var on windows ?

 2012/11/16 Jasper Floor j.fl...@onehippo.com:
 Hi,

 For some reason mvn is compiling using java 1.3. I do not understand this
 behavior. I have never seen this before and it doesn't do this on my
 colleagues machine with the same project. The big difference is he is a
 windows use and I am a linux user.

 Apache Maven 3.0.4
 Maven home: /usr/share/maven
 Java version: 1.6.0_33, vendor: Sun Microsystems Inc.
 Java home: /opt/jdk/jdk1.6.0_33/jre
 Default locale: en_US, platform encoding: UTF-8
 OS name: linux, version: 3.2.0-29-generic, arch: amd64, family: unix

 Its a Mint distro, but with my own java installed as I required the 1.6
  jdk.


 mvg,
 Jasper



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

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


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



Re: Overriding a property from a profile

2012-10-30 Thread John Patrick
If you try switching the parameter and profile the other way around,
does that then work?

-Dbletch=false -Pa

On 29 October 2012 21:52, Benson Margulies bimargul...@gmail.com wrote:
 On Mon, Oct 29, 2012 at 4:26 PM, Anders Hammar and...@hammar.net wrote:
 With two profiles that disagreed, the order of the profiles names
 after -Pa,b (or b,a) did not matter.

 Correct. The declared order in the pom or settings.xml is the one that 
 counts.

 -Pa -Dbletch=false

 respected the 'true' in a, not the false from the command line.

 I think this surprises me. Did you verify with Maven 2?

 No, all my projects now require M3. I guess I need to build a test
 case and JIRA.


 /Anders



 On Mon, Oct 29, 2012 at 12:47 PM, John Patrick nhoj.patr...@gmail.com 
 wrote:
 How are the profiles being activated? Command line -P or via
 activations, or a mix?

 About 6 months ago I had issues using -P and -D and fix it by getting
 all -D options we might need to use into profiles and then just
 remembering specific orders of profiles.

 John

 On 29 October 2012 16:33, Anders Hammar and...@hammar.net wrote:
 Yes (I think). Did you test with both Maven 3 and 2?

 /Anders

 On Mon, Oct 29, 2012 at 4:22 PM, Benson Margulies bimargul...@gmail.com 
 wrote:
 If a profile has a property value set, -D from the command-line does
 not win, the profile wins. Does this surprise anyone else?

 -
 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


 -
 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: Overriding a property from a profile

2012-10-30 Thread John Patrick
From memory I think it did fix an issue, should have raised a bug but
I am thinking 18-24 months ago. Will look into it again and raise
defect if still an issue.

On 30 October 2012 13:09, Anders Hammar and...@hammar.net wrote:
 I very much hope this doesn't make a difference. If it does, I'd say
 it's a bug that needs to be fixed.

 /Anders

 On Tue, Oct 30, 2012 at 10:19 AM, John Patrick nhoj.patr...@gmail.com wrote:
 If you try switching the parameter and profile the other way around,
 does that then work?

 -Dbletch=false -Pa

 On 29 October 2012 21:52, Benson Margulies bimargul...@gmail.com wrote:
 On Mon, Oct 29, 2012 at 4:26 PM, Anders Hammar and...@hammar.net wrote:
 With two profiles that disagreed, the order of the profiles names
 after -Pa,b (or b,a) did not matter.

 Correct. The declared order in the pom or settings.xml is the one that 
 counts.

 -Pa -Dbletch=false

 respected the 'true' in a, not the false from the command line.

 I think this surprises me. Did you verify with Maven 2?

 No, all my projects now require M3. I guess I need to build a test
 case and JIRA.


 /Anders



 On Mon, Oct 29, 2012 at 12:47 PM, John Patrick nhoj.patr...@gmail.com 
 wrote:
 How are the profiles being activated? Command line -P or via
 activations, or a mix?

 About 6 months ago I had issues using -P and -D and fix it by getting
 all -D options we might need to use into profiles and then just
 remembering specific orders of profiles.

 John

 On 29 October 2012 16:33, Anders Hammar and...@hammar.net wrote:
 Yes (I think). Did you test with both Maven 3 and 2?

 /Anders

 On Mon, Oct 29, 2012 at 4:22 PM, Benson Margulies 
 bimargul...@gmail.com wrote:
 If a profile has a property value set, -D from the command-line does
 not win, the profile wins. Does this surprise anyone else?

 -
 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


 -
 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: Overriding a property from a profile

2012-10-29 Thread John Patrick
How are the profiles being activated? Command line -P or via
activations, or a mix?

About 6 months ago I had issues using -P and -D and fix it by getting
all -D options we might need to use into profiles and then just
remembering specific orders of profiles.

John

On 29 October 2012 16:33, Anders Hammar and...@hammar.net wrote:
 Yes (I think). Did you test with both Maven 3 and 2?

 /Anders

 On Mon, Oct 29, 2012 at 4:22 PM, Benson Margulies bimargul...@gmail.com 
 wrote:
 If a profile has a property value set, -D from the command-line does
 not win, the profile wins. Does this surprise anyone else?

 -
 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: modules, dependencies, whatelse?

2012-10-16 Thread John Patrick
Step By Step will get you though this, once you understand Maven more
it will become a lot clearer. Nexus is a good idea and i should
probably do that myself but it's probably step 2 after getting this
working.

1) Create pom for myLib1, packaging type jar
2) myPom/myLib1$ mvn clean install
3) Create pom for myLib2 and add dependency for myLib1, packaging type jar
4) myPom/myLib2$ mvn clean install
5) Create pom for myLib3 and add dependency for myLib1, packaging type jar
6) myPom/myLib3$ mvn clean install
7) Create pom for myPom in parent directory of myLib1, myLib2 and
myLib3, packaging type pom
8) Add 
modulesmodulemyLib1/modulemodulemyLib2/modulemodulemyLib3/module/modules
into the myPom pom
9) myPom$ mvn clean install
10) Based upon the groupId you have used, delete it manually from your
own maven repository e.g. ~/.m2/repository/x/y/z
11) Manually delete myLib1/target myLib2/target myLib3/target
12) myPom$ mvn clean install

Steps 10 and 11 remove your locally built version and followed by step
12 proves that all the dependencies work correctly and dependencies
your in control of all build in the right order and installed into
your local repository.

After that look into SNAPSHOTS and Nexus, once your project is building.

Hope this helps,
John

On 15 October 2012 20:04, Ron Wheeler rwhee...@artifact-software.com wrote:
 On 15/10/2012 12:36 PM, Lucio Crusca wrote:

 In data lunedì 15 ottobre 2012 16:16:44, Ron Wheeler ha scritto:

 Set up a Maven repo like Nexus. This is worth the small effort for the
 improvement in your life with Maven.

 I feared this reply and badly hoped not receiving it...

 Even if you are a 1 man shop, it is worthwhile.

 This is reassuring (I actually am a 1 man shop).

 Set it up on your workstation if you have to or put it on a small server
 in the cloud.

 I'm often on the move and I often work with slow internet connections, I
 suppose my notebook is the best choice. Have you got any pointers to
 howtos
 for this?

 If you are using Nexus, I would just follow the installation instructions.

 Read the Nexus instructions carefully.
 The setup is a bit out of the ordinary so be careful about making
 assumptions about how normal webapps work.
 If you run into trouble, the Nexus forum is very active and a lot of the
 really bright lights of Maven are also involved in Nexus support so you
 should get very consistent advice between the 2 forums.
 Please post questions in the right forum.
 Maven supports at least 3 different repositories and there is sensitivity on
 the part of some people about the Maven forum leaning towards one repository
 package or another.

 I am not involved in either project or any repo project so I tend to be a
 bit more outspoken in my praise of Nexus but I am not an expert in
 repositories and have no experience with the other repos. From the traffic
 here, I gather that the other solutions are also very good.

 The one thing that having a repo will do for you is to make you much more
 aware of proper release practices and to a certain extent force you into
 using SNAPSHOTs correctly.
 We ran for 2 years without a repo and I feel that we lost a lot of time
 because of that. It took us a lot longer to understand Maven's best
 practices and the Maven way without the repo.

 You should also take a quick look at the Maven project team
 http://maven.apache.org/plugins/maven-project-info-reports-plugin/team-list.html
 so that you recognize the people who are giving you advice.

 Key thing to keep in mind. Unless you are building something really, really
 out of the ordinary, bordering on bizarre, thousands of people have already
 built something similar to your project and there is a simple Maven Best
 Practice already available.

 Ron



 -
 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: modules, dependencies, whatelse?

2012-10-15 Thread John Patrick
If this was me I would create a new pom, which would be the parent for
the 3 libraries, I would then also build at that level.

e.g.
~/mavenprojects/pom.xml (packaging pom)
~/mavenprojects/myLib1/pom.xml (packaging jar)
~/mavenprojects/myLib2/pom.xml (packaging jar)
~/mavenprojects/myLib3/pom.xml (packaging jar)

Basically that is how every project I've worked on works. You have to
define the parent and relative Path correctly in the lib projects, and
add modules into the parent pom. Basically one pom per thing,
sometimes over kill but often easier then scaling projects up or
moving between projects.

We have ~65 pom on my main project, ~15 are pom's to logically group
functionaility, some are simply a single wsdl or xsd, others are the
jpa layer.

Others might have different views but that is how I'd do it.

On 15 October 2012 12:51, Lucio Crusca lu...@sulweb.org wrote:
 Hello *,

 I'm new to maven. I'd like to mavenize three projects of mine. Let's say they
 are myLib1, myLib2 and myLib3. My directory structure is

 ~/mavenprojects/myLib1
 ~/mavenprojects/myLib2
 ~/mavenprojects/myLib3

 myLib3 depends on myLib1 and myLib2; myLib2 depends only on myLib1. The three
 libraries are in development stage, so I change their code very often. I need
 a maven setup that, when compiling myLib3, automatically compiles myLib1 and
 myLib2 also, if their source code has been changed, and recreates respective
 jars. The same goes for myLib2 in respect to its myLib1 dependency.

 I've tried adding myLib1 as a module of myLib2 in myLib2 pom file, but then I
 had to change the packaging to pom, which stopped maven from compiling and
 packaging myLib2.

 Then I considered adding the compiled jars as dependencies, but in this case I
 don't have a maven repository to query, and I don't want to manually install
 myLib1 and myLib2 jars, since that would keep maven from recompiling the
 respective sources.

 What's the correct solution in my case?

 -
 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: Feel Maven is not intuitive

2012-05-23 Thread John Patrick
Do you specifically want to know about the compile plugin or plugin's
in general.

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
might be a useful site to read.

When helping a new developer understand maven, below is what I go
though with them.

1) Understand maven's lifecycle
2) Understand maven's convention over configuration
3) Check the project package, to understand what lifecycle steps are
activated/used and what plugin's are enabled at each step.
4) Check what properties are active, check parent pom, properties
section, profiles section. I don't configure the compile plugin as the
example you have it just a longer version of setting the properties
maven.compiler.source and maven.compiler.target.
5) Check what plugins are activated, check plugins and
pluginManagement to see what plugin's are configured and what phase
they are configured to execute at. You will need to check the
currently pom and all parent pom's. i.e. our root project pom contains
all version numbers for dependencies, all plugin configuration, so a
sub pom just say use this dependency or plugin and overwrite any
properties as required.

Knowing what each plugin does and how to configure, does rely on those
developers producing accurate documentation and website.

Hope that helps, been using maven since feb 2005, so most things are
habbit now and trained/converted around a 100 developers now to see
the light...

Like Stephen said, the compiler example is just a way of passing the
right flags to javac. Instead of doing javac -source 1.5 -target 1.6


The plugin naming conversion should help you understand what the
plugin does, that is true for all org.apache.maven.plugins and also I
believe from codehaus, but the wider community can name it anything
they want

Take a made up plugin name called, worktidywrapper. I might have to do
one or more of the following to get it working as required, check the
plugin website if it exists, opening the jar, decompiling the code,
basic repeat execution till it doesn't fail. I might find out a better
name might be, maven-clear-old-snapshots-plugin. It might be a plugin
that removes old snapshots from your local repository because your
work laptop only has a 40GB hard disk and it keeps running out of
space, so they automated the process.

John

On 23 May 2012 01:25, Stephen Connolly stephen.alan.conno...@gmail.com wrote:
 On Wednesday, 23 May 2012, hujirong wrote:

 Hi

 After working with Maven for a month, I am still not quite understand how
 Maven works. Maybe just like Microsoft technologies, encapsulate too much.
 One key issue is to understand the plugin.

 For example, the following example, how can I see this thing allows JDK 5.0
 source. There is nowhere it says allow. How do I know if it's not asking
 the compiler to use JDK 5.0?!


 It is saying that the source code obeys 5.0 syntax and to generate byte
 code using 5.0 format.

 You can use any JDK = 5.0 to build... But if using a JDK  5.0 you will
 likely want to use animal sniffer to enforce the use of only JRE 5.0
 methods if you must be runtime compatible with 5.0 (which is EOL btw)

 Not really a Maven thing, more of a java thing


 So what shall I do to make me clearly understand how plugin in Maven work?

 Thanks
 Jirong

 http://maven.apache.org/guides/getting-started/index.html

 For this example, we will configure the Java compiler to allow JDK 5.0
 sources. This is as simple as adding this to your POM:

 ...
 build
  plugins
    plugin
      groupIdorg.apache.maven.plugins/groupId
      artifactIdmaven-compiler-plugin/artifactId
      version2.0.2/version
      configuration
        source1.5/source
        target1.5/target
      /configuration
    /plugin
  /plugins
 /build
 ...


 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Feel-Maven-is-not-intuitive-tp5709506.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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



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



Re: Maven using eclipse

2012-05-22 Thread John Patrick
With the latest version of the eclipse maven plugin, you can import a
pom directly into eclipse without the command line step.

If you then just close the eclipse project your not using, the
dependencies will automatically change from the eclipse project to the
last published version in your repository.

Hope that helps.
John

On 22 May 2012 10:57, josipj jos...@hotmail.com wrote:
 Hi,

 I was wondering if there is a feature in maven which helps with the
 following.

 Suppose I have 20 projects in eclipse. The projects I'm not using I delete
 from eclipse. But every now and then I need to import them and it's
 dependencies.

 Does maven have a feature in which you can say with mvn eclipse:eclipse I'm
 working in this project create the dependencies for me automatically. When
 I'm importing the project I want to work on and only import those projects
 which are needed.

 Josip

 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Maven-using-eclipse-tp5709408.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


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



Re: convert Ant script to Maven

2012-05-10 Thread John Patrick
Alternatively you can use maven-antrun-plugin and just have that
execute your ant script.
http://maven.apache.org/plugins/maven-antrun-plugin/

On 10 May 2012 13:29, Antonio Petrelli antonio.petre...@gmail.com wrote:
 2012/5/10 chavanmukeshp mukesh.cha...@igate.com

 Hello Friends,

 Can you please suggest me how to convert below ant target into maven,

 target name=InitialiseContext

              java classname=quot;com.exceptions.ExceptionHandlerquot;

              lt;arg value=”initializeContext”lt;/

 arg value=${bldReqPath}/

 /java

  /target


 No straight conversion, but I suppose you need the Exec Maven plugin:
 http://mojo.codehaus.org/exec-maven-plugin/

 Antonio

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



Re: convert Ant script to Maven

2012-05-10 Thread John Patrick
Have you used maven before or are you totally new to maven?

Do you have to get your ant code snippet into an existing maven
project or a new project just for this snippet?

On 10 May 2012 15:58, Ron Wheeler rwhee...@artifact-software.com wrote:
 Did you look at the Ant plug-in?

 Ron


 On 10/05/2012 7:52 AM, chavanmukeshp wrote:

 Hello Friends,

 Can you please Suggest me how to convert below ant target into maven?

  target name=InitialiseContext

               java classname=quot;com.rsa.poc.SigningStationClientquot;

               lt;arg value=”initializeContext”lt;/

 arg value=${bldReqPath}/

 /java

  /target

 Is there any plugin required for this conversion?

 Thanks in advance!!

 --
 View this message in context:
 http://maven.40175.n5.nabble.com/convert-Ant-script-to-Maven-tp5699981.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: Compilation failure: interface com.ibm.websphere.sibx.smobo.ServiceMessageObject

2012-04-20 Thread John Patrick
Create a new eclipse/netbeans project, add all jar's under the
websphere installation.

Search for that interface and/or look at the inheritance tree to see
which object contains that methord.

Blunt approach but usually works for classes/jar that are not in a
maven repository.

Once you find the jar, add it using mvn install:install-file. Then
you'll probably need to repeat a few times whilst other compile issues
are fixed. Remember to add as scope provided as I'll expect they will
be on the classpath by default when deployed to WebSphere.

I usually create a 3rd-party-libraries pom so it's easier to install,
cross os and not a manual process.
[..]
   build
  plugins
 plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-install-plugin/artifactId
version2.3.1/version
inheritedfalse/inherited
executions
   execution
  idinstall:groupId:artifactId:version/id
  phasevalidate/phase
  goals
 goalinstall-file/goal
  /goals
  configuration
 file${project.basedir}/artifact/file
 groupIdxxx/groupId
 artifactIdxxx/artifactId
 versionxxx/version
 packagingjar/packaging
 createChecksumtrue/createChecksum
 generatePomtrue|false/generatePom
 pomFile${project.basedir}/pom/pomFile
  /configuration
   /execution
[...]

John

On 20 April 2012 16:51, hujirong jirong...@gmail.com wrote:
 I am having a hard time to locate the class implement this .getRootObject()
 method. It's not in this interface
 com.ibm.websphere.sibx.smobo.ServiceMessageObject.

 Anyone has any idea?

 Jirong

 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Compilation-failure-interface-com-ibm-websphere-sibx-smobo-ServiceMessageObject-tp5652928p5654598.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


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



Re: Selective Parallel Builds with maven 3

2012-04-17 Thread John Patrick
Out of interest...
How many modules is that?
How many java files?
Any code generation happening like XMLBeans etc?
Also does that half day include or exclude test execution time?

I worked somewhere, where the build was 3 hours not including tests,
by simply upgrading from maven 2.x to 3 and splitting some of the code
into smaller modules I managed to drop the build to 20 minutes.
Compiling 10 modules each with 200 java files is much quicker than
compiling 2,000 java files at once.

On 17 April 2012 15:24, Srinath C srinat...@gmail.com wrote:
 Wow! Half a day sounds like a huge code base!

 Anyways, yes you can do this in Maven 3 but maven takes the call on how the
 modules get build. You can enforce a build order among modules using
 dependencies (if A depends on B, maven will build B before A) but I'm not
 aware of any other ways to enforce the order.

 Another notable point is to check if your plugins are compatible with
 parallel builds - either check their documentation or simply build with -T
 N option and watch for warnings (N is the number of threads to build in
 parallel).

 Regards,
 Srinath.


 On Tue, Apr 17, 2012 at 5:04 PM, Ramith Jayasinghe 
 ramithro...@yahoo.comwrote:


 Greetings Everyone,
 I'm trying to build my project in parallel using Maven 3, so I can
 reduce the time taken (Currently it takes around better half of a day to
 completely build it).
 May be this sounds stupid, but the way I want to do is to build
 some of the modules in project serially while others in parallel.

 So ideally, when I do a 'mvn clean install', I want maven to
 parallel build parts of the project that are marked/configured for
 that and others sequentially.

 Is this possibe with current
 capabilities of maven 3?

 Thanks in advance,
 - Ramith
 Jayasinghe

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



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



Re: How to pass a custom jar file to maven jarsigner plugin for signing

2012-04-13 Thread John Patrick
If you don't need ABC.jar a work around hack until you find the proper
solution might be to use antrun at the right phase and move
ABC-small.jar to ABC.jar.

On 13 April 2012 15:42, Shyamsundar Purkayastha
s.purkayas...@airtelmail.in wrote:
 I have a maven build configuration where I do the following steps

 1) Compile and build the jar file (ABC.jar) using the maven assembly plugin

 2) Run proguard using maven-proguard plugin to shrink and obfuscate the jar
 file to get a resultant file as ABC-small.jar

 3) Run the maven jarsigner plugin to sign the final jar ABC-small.jar

 The problem is that the jarsigner plugin always picks the initial ABC.jar
 file generated from maven-assembly instead of ABC-small.jar generated from
 maven-proguard plugin.

 How do I tell jarsigner plugin to pick the ABC-small.jar ?

 Here is my maven-jarsigner config in pom file

 plugin

    artifactIdmaven-jarsigner-plugin/artifactId

    version1.2/version

    executions

        execution

            idsign/id

            goals

                goalsign/goal



            /goals

        /execution

    /executions

    configuration

        !--  storetypepkcs12/storetype --

        keystorecert\keystore/keystore

        aliasapplet/alias

        storepassapplet/storepass

        keypassapplet/keypass

    /configuration

 /plugin



 Thanks in advance


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



Re: Which in-container test framework do you use?

2012-04-13 Thread John Patrick
I moved from Cactus and testing the running container, to using dependency
injection type patterns and testing them independently and/or with mock
objects.

i.e. Servlet is just a wrapper to a pojo of business logic, ejb get helpers
and other pojo injected, so everything can be tested separately.

Then use selenium hq to test the web tier, but still not found something
for testing jms or other jee components within a running container.

On 13 April 2012 16:03, Lucas Persson lucas.pers...@oracle.com wrote:

 **
 Hi

 I am about to migrate some Ant build system to Maven and have run into the
 JUnitEE ant task. I can not really find any up to date corresponding plugin
 for Maven.

 So what do people use now days  to test servlets, ejb, JMS etc in the JEE
 containers?

 - JUnitEE  - seems to be dead
 - Cactus  - seems also to be dead
 - Arquillian - the rising star?
 - Jeeunit - only embedded containers
 ??

 Requirement wise I really only need a JUnit runner on the server. The
 simple web GUI that JUnitEE has is also really nice and simple to use.

 Any input appreciated.

 Thanks
 Lucas

 --
 [image: Oracle] http://www.oracle.com
 Lucas Persson | Principal Member of Technical Staff
 Phone: +4684773644 | | | Mobile: +46730946656
 Oracle Communications Platform
 ORACLE Sweden | Söder Mälarstrand 29, 6 tr | 118 25 Stockholm

 Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
 [image: Green Oracle] http://www.oracle.com/commitment Oracle is
 committed to developing practices and products that help protect the
 environment



Re: DependencyResolutionException when upgrading from Maven 2.2.1 to Maven 3.0.4

2012-04-11 Thread John Patrick
If you add

relativePath../pom.xml/relativePath

Into the parent section of child-alpha, does it resolve any issue your
having? Specifically with having to do mvn -N install on the parent
1st.

On 11 April 2012 16:14, Brain Dump braindump2...@gmail.com wrote:
 I was able to compile with no problems on 2.2.1. The only pom.xml changes I
 had to make to get this (almost) working on 3.0.4 was to add version
 numbers for plugins that didn't have them specified, move plugins under
 reporting/reporting into build/build, and run mvn -N install on the
 parent pom -- although that's what I'm trying to avoid.

 I don't know if the issues you're running into are related, or caused by
 something else.

 Any thoughts from anyone about either Mike's issues, or mine?

 Thanks!

 On Tue, Apr 10, 2012 at 12:37 PM, mike digioia mpd...@gmail.com wrote:

 Hi,

 I just posted a similar issue I am having with the same kind of errors. Did
 you ever get this to compile on the 2.2.1? I have built two machines, one
 with 2.2.1 and the other one with 3.0.4. I have different problems with
 each. Main issue with 3.0.4 is it could not locate some of my dependency
 jars. So I copied them from the 2.2.1 release system. But still issues.

 The other main issue is using extension to java/javax with the jmdns.jar.
 So I modified the classes inside this jar to avoid the problem but still
 have issues. On the 2.2.1 system it does not see my jar, even though it is
 inside the pom and was successful with the mvn install-file command.

 On Tue, Apr 10, 2012 at 12:19 PM, Brain Dump braindump2...@gmail.com
 wrote:

  Hi everyone,
 
  I'm trying to upgrade my project from Maven 2.2.1 to Maven 3.0.4 but am
  running into problems with a dependency resolution. I spent a full day
  trying to research this by looking through Maven documentation and
 similar
  posts, but I'm still stuck. I posted on stackoverflow (
  http://stackoverflow.com/q/10092772/1324379) but realized that this
 Maven
  User List might be a better place to ask for help. Hope that's okay, and
  thanks in advance for your help.
 
  My project structure is as follows:
 
     pom.xml (acme-parent)
     child-alpha
     +- pom.xml
 
  In addition, I have the following files in my own repository:
 
 
 
 http://maven.my-own-repo.com/acme/child-dep-jdk15/maven-metadata-local.xml
 
 
 
 http://maven.my-own-repo.com/acme/child-dep-jdk15/1.0/child-dep-jdk15-1.0.jar
 
 
 
 http://maven.my-own-repo.com/acme/child-dep-jdk15/1.0/child-dep-jdk15-1.0.pom
 
  child-alpha/pom.xml in turn has a profile dependency on my own
  acme:child-dep-jdk15, which has been separately built into a jar file and
  has its own .pom file specifying a parent that is the same acme-parent
  parent as child-alpha.
 
  Here are excerpts from the relevant files:
 
  acme-parent pom.xml:
 
     ?xml version=1.0 encoding=UTF-8?
     project
         modelVersion4.0.0/modelVersion
         groupIdacme/groupId
         artifactIdacme-parent/artifactId
         nameAcme Parent Project/name
         version1/version
         packagingpom/packaging
 
         properties.../properties
 
         modules
             modulechild-alpha/module
         /modules
 
         repositories
             repository
                 idacme-repo/id
                 urlhttp://maven.my-own-repo.com/url
             /repository
             repository
                 idcentral/id
                 urlhttp://repo1.maven.org/maven2/url
             /repository
         /repositories
 
         pluginRepositories.../pluginRepositories
 
         build
           plugins.../plugins
         /build
 
         dependencies.../dependencies
     /project
 
 
  child-alpha pom.xml:
 
     project
         modelVersion4.0.0/modelVersion
         parent
             groupIdacme/groupId
             artifactIdacme-parent/artifactId
             version1/version
         /parent
         artifactIdchild-alpha/artifactId
         nameChild Alpha Project/name
         version1.0/version
         packagingjar/packaging
 
         scm.../scm
 
         properties.../properties
 
         build
           resources.../resources
           plugins.../plugins
         /build
 
         profiles
             profile
                 idjdk15/id
                 activation
                     activeByDefaulttrue/activeByDefault
                     jdk1.5/jdk
                 /activation
                 dependencies
                     dependency
                         groupIdacme/groupId
                         artifactIdchild-dep-jdk15/artifactId
                         version1.0/version
                     /dependency
                 /dependencies
             /profile
         /profiles
 
         dependencies.../dependencies
     /project
 
 
  child-dep-jdk15-1.0.pom:
 
     project
         modelVersion4.0.0/modelVersion
         parent
             groupIdacme/groupId
             artifactIdacme-parent/artifactId
             version1/version
    

Re: DependencyResolutionException when upgrading from Maven 2.2.1 to Maven 3.0.4

2012-04-11 Thread John Patrick
Or start from scratch with simple pom.xml and nothing in src, then add
src and fix dependencies, build up slowly then diff the resulting pom
and see what's different.

On 11 April 2012 16:25, John Patrick nhoj.patr...@gmail.com wrote:
 If you add

 relativePath../pom.xml/relativePath

 Into the parent section of child-alpha, does it resolve any issue your
 having? Specifically with having to do mvn -N install on the parent
 1st.

 On 11 April 2012 16:14, Brain Dump braindump2...@gmail.com wrote:
 I was able to compile with no problems on 2.2.1. The only pom.xml changes I
 had to make to get this (almost) working on 3.0.4 was to add version
 numbers for plugins that didn't have them specified, move plugins under
 reporting/reporting into build/build, and run mvn -N install on the
 parent pom -- although that's what I'm trying to avoid.

 I don't know if the issues you're running into are related, or caused by
 something else.

 Any thoughts from anyone about either Mike's issues, or mine?

 Thanks!

 On Tue, Apr 10, 2012 at 12:37 PM, mike digioia mpd...@gmail.com wrote:

 Hi,

 I just posted a similar issue I am having with the same kind of errors. Did
 you ever get this to compile on the 2.2.1? I have built two machines, one
 with 2.2.1 and the other one with 3.0.4. I have different problems with
 each. Main issue with 3.0.4 is it could not locate some of my dependency
 jars. So I copied them from the 2.2.1 release system. But still issues.

 The other main issue is using extension to java/javax with the jmdns.jar.
 So I modified the classes inside this jar to avoid the problem but still
 have issues. On the 2.2.1 system it does not see my jar, even though it is
 inside the pom and was successful with the mvn install-file command.

 On Tue, Apr 10, 2012 at 12:19 PM, Brain Dump braindump2...@gmail.com
 wrote:

  Hi everyone,
 
  I'm trying to upgrade my project from Maven 2.2.1 to Maven 3.0.4 but am
  running into problems with a dependency resolution. I spent a full day
  trying to research this by looking through Maven documentation and
 similar
  posts, but I'm still stuck. I posted on stackoverflow (
  http://stackoverflow.com/q/10092772/1324379) but realized that this
 Maven
  User List might be a better place to ask for help. Hope that's okay, and
  thanks in advance for your help.
 
  My project structure is as follows:
 
     pom.xml (acme-parent)
     child-alpha
     +- pom.xml
 
  In addition, I have the following files in my own repository:
 
 
 
 http://maven.my-own-repo.com/acme/child-dep-jdk15/maven-metadata-local.xml
 
 
 
 http://maven.my-own-repo.com/acme/child-dep-jdk15/1.0/child-dep-jdk15-1.0.jar
 
 
 
 http://maven.my-own-repo.com/acme/child-dep-jdk15/1.0/child-dep-jdk15-1.0.pom
 
  child-alpha/pom.xml in turn has a profile dependency on my own
  acme:child-dep-jdk15, which has been separately built into a jar file and
  has its own .pom file specifying a parent that is the same acme-parent
  parent as child-alpha.
 
  Here are excerpts from the relevant files:
 
  acme-parent pom.xml:
 
     ?xml version=1.0 encoding=UTF-8?
     project
         modelVersion4.0.0/modelVersion
         groupIdacme/groupId
         artifactIdacme-parent/artifactId
         nameAcme Parent Project/name
         version1/version
         packagingpom/packaging
 
         properties.../properties
 
         modules
             modulechild-alpha/module
         /modules
 
         repositories
             repository
                 idacme-repo/id
                 urlhttp://maven.my-own-repo.com/url
             /repository
             repository
                 idcentral/id
                 urlhttp://repo1.maven.org/maven2/url
             /repository
         /repositories
 
         pluginRepositories.../pluginRepositories
 
         build
           plugins.../plugins
         /build
 
         dependencies.../dependencies
     /project
 
 
  child-alpha pom.xml:
 
     project
         modelVersion4.0.0/modelVersion
         parent
             groupIdacme/groupId
             artifactIdacme-parent/artifactId
             version1/version
         /parent
         artifactIdchild-alpha/artifactId
         nameChild Alpha Project/name
         version1.0/version
         packagingjar/packaging
 
         scm.../scm
 
         properties.../properties
 
         build
           resources.../resources
           plugins.../plugins
         /build
 
         profiles
             profile
                 idjdk15/id
                 activation
                     activeByDefaulttrue/activeByDefault
                     jdk1.5/jdk
                 /activation
                 dependencies
                     dependency
                         groupIdacme/groupId
                         artifactIdchild-dep-jdk15/artifactId
                         version1.0/version
                     /dependency
                 /dependencies
             /profile
         /profiles
 
         dependencies

Re: Filename too long while compiling a project

2012-04-01 Thread John Patrick
Mikhail,

I assume you have got it work yourself then.

John

On 28 March 2012 23:09, Jeff MAURY jeffma...@jeffmaury.com wrote:
 On which platform are you running ? There is a limit of Windows file
 systems (http://en.wikipedia.org/wiki/NTFS#Limitations) that you may have
 reached which is not of Maven concern ?

 Jeff

 On Tue, Mar 27, 2012 at 1:59 PM, John Patrick nhoj.patr...@gmail.comwrote:

 Is this a Unix* or Windows filesystem?

 What plugin is doing the code generation?

 Have you executed the plugin with any debugging enabled, i.e. mvn -X ...

 If you move the project to say /tmp/ or c:/tmp/ and build their does
 the same error occur? I'm thinking is it filename or directory name,
 or directory depth.

 John

 On 13 March 2012 08:08, Mikhail Tsaplin tsmis...@gmail.com wrote:
  Hi all.
  I'm trying to compile source code with maven. It falls with an error:
 filename is too long ... However file system allows me to create the
 problem class file, and also this project was successful compiled with
 eclipse. Is there any configuration tweaks to avoid this problem. The code
 that I'm trying to compile is autogenerated and I can't modify it to reduce
 class'es names length.
 

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




 --
 Jeff MAURY

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

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

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



Re: Filename too long while compiling a project

2012-03-27 Thread John Patrick
Is this a Unix* or Windows filesystem?

What plugin is doing the code generation?

Have you executed the plugin with any debugging enabled, i.e. mvn -X ...

If you move the project to say /tmp/ or c:/tmp/ and build their does
the same error occur? I'm thinking is it filename or directory name,
or directory depth.

John

On 13 March 2012 08:08, Mikhail Tsaplin tsmis...@gmail.com wrote:
 Hi all.
 I'm trying to compile source code with maven. It falls with an error: 
 filename is too long ... However file system allows me to create the problem 
 class file, and also this project was successful compiled with eclipse. Is 
 there any configuration tweaks to avoid this problem. The code that I'm 
 trying to compile is autogenerated and I can't modify it to reduce class'es 
 names length.


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



Re: Compile all projects respectively

2012-03-23 Thread John Patrick
Look into pom packages, then that maven project has your jar, war and
ear as modules.

./pom.xml (i.e project-pom package type pom)
project...
   [...]
   packagepom/package
   [...]
   modules
  modulejar/module
  modulewar/module
  moduleear/module
   /modules
   [...]
/project

./jar/pom.xml (i.e. project-jar package type jar)
./war/pom.xml (i.e. project-war package type war)
./ear/pom.xml (i.e. project-ear package type ear)

then in ./ execute your maven command and it will build your
dependencies in order.

John

On 23 March 2012 21:24, sarmahdi sarma...@hotmail.com wrote:
 Hello All!

 I have three projects. an EAR, a WAR and a JAR project. and they are all
 depended on each other. Like Jar is compiled and deployed in maven repo,
 from there it is added into the WAR and war is deployed in the repo and from
 there the WAR is added into the EAR.

 For each project I have to do mvn.bat scm:update clean install one by one
 and in that order Jar then war and then the EAR. Is there a way I can just
 do : mvn.bat scm:update clean install in the ear project and it will start
 with the jar (update the files then clean the target and then install) then
 the war (add the first jar in it) and then do it for the ear. (the jar can
 be added here as well doesnt matter, it works both ways: inside the
 war/WEB-INF/lib and inside the EAR side by side the war) so i have to run
 the command only once

 Thanks and I will appreciate the tips.

 Syed...



 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Compile-all-projects-respectively-tp5590742p5590742.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


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



Re: Dependency in the local repository is ignored

2012-03-06 Thread John Patrick
When you say ignored, do you mean that it isn't appearing on the
classpath in eclipse.

Have you tried:
1) mvn -X eclipse:eclipse and seeing if any of the debug reports
removing or ignoring it
2) backup .classpath .project and .settings then recreating
3) Checking and older version in source control
4) New instance of Eclipse

On 6 March 2012 15:27, Alex zeita...@googlemail.com wrote:
 Dear All,
 I am looking for a solution since several days already. The problem:
 All of a sudden one of my dependencies is ignored.
 I am installing it using
 mvn install
 And when I am running
 mvn eclipse:eclipse
 It is not listed in the Referenced Libriries node although it is present in
 the local repository.
 I installed the newest releases of maven, eclipse, m2eclipse.
 Please, please help
 Alex

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



Re: mvn install (Access is denied) problem

2012-03-05 Thread John Patrick
Looks like a client side issue with your local environment.

Double check the -Dfile option as it looks like your referring to a
directory, instead of a file. Can you confirm the following is what
you are executing:

mvn
install:install-file
-DgroupId=com.google.gdata
-DartifactId=gdata-docs
-Dversion=3.0
-Dpackaging=jar
-Dfile=C:\Users\admin\rsmart-gdoc\gdata\java\lib
-DgeneratePom=true

John

On 5 March 2012 08:32, jehan jehan.bads...@nu.edu.pk wrote:
 Dear All

 I am using windows 7,
 when installing a library using command
 *mvn install:install-file -DgroupId=com.google.gdata -DartifactId=gdata-docs
 -Dversion=3.0 -Dpackaging=jar
 -Dfile=C:\Users\admin\rsmart-gdoc\gdata\java\lib -DgeneratePom=true*


 then getting following error

 [INFO] Scanning for projects...
 [INFO] Searching repository for plugin with prefix: 'install'.
 [INFO]
 
 [INFO] Building Maven Default Project
 [INFO]    task-segment: [install:install-file] (aggregator-style)
 [INFO]
 
 [INFO] [install:install-file {execution: default-cli}]
 [INFO] Installing C:\Users\admin\rsmart-gdoc\gdata\java\lib to
 C:\Users\admin\.m2\repository\com\google\gdata\gdata-docs\3.0\gdata-docs-3.0.jar
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Error installing artifact 'com.google.gdata:gdata-docs:jar': Error
 installing artifact: C:\Users\admin\rsmart-gdoc\gdata\java\lib (Access is
 denied)

 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 
 [INFO] Total time:  1 second
 [INFO] Finished at: Mon Mar 05 13:31:25 PKT 2012
 [INFO] Final Memory: 3M/15M
 [INFO]
 

 I think it is permission problem, but I checked current user have full right
 on .m repository
 please resolve it


 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/mvn-install-Access-is-denied-problem-tp5536889p5536889.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Execute maven-assembly-plugin twice during package phase

2012-02-23 Thread John Patrick
If you want them to execute at the same phase, then you will need to
explicitly add the jar plugin and add it before the assembly plugin to
get the order correct.

Yep help:effective-pom will how you what the maven understands.

On 23 February 2012 06:40, Anders Hammar and...@hammar.net wrote:
 Nabble strips attached files.

 Do you have the executions of the plugin in the right order in the
 pom? First the jar and then the zip. Also, check the effective-pom
 (mvn help:effective-pom) to see what Maven is working on. What's the
 order of the executions there?

 /Anders

 On Wed, Feb 22, 2012 at 18:15, pierre46 pierreyves@gmail.com wrote:
 Hi,
 I would like to create a jar file with all the dependencies and then create
 a zip file which would contain the jar file.
 The problem is that maven creates the zip file before the jar file and then
 ... I'm a little bit lost.

 I enclosed my POM file in this post.

 Thanks,
 PY

 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Execute-maven-assembly-plugin-twice-during-package-phase-tp5505700p5505700.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


 -
 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: axistools:wsdl2java

2012-02-22 Thread John Patrick
I believe to fix your issue you need to add them as a dependency of
the plugin, so similar to below.

   [...]
   build
  [...]
  plugins
 [...]
 plugin
groupIdorg.apache.axis2/groupId
artifactIdaxis2-wsdl2code-maven-plugin/artifactId
[...]
dependencies
!-- * add dependencies here * --
/dependencies
 /plugin
[...]

John

On 22 February 2012 16:38, jgruber john.t.gru...@gmail.com wrote:
 Whenever I try to run the axistoos:wsdl2java action I get the following:


 Feb 22, 2012 10:31:52 AM org.apache.axis.utils.JavaUtils
 isAttachmentSupported
 WARNING: Unable to find required classes (javax.activation.DataHandler and
 javax.mail.internet.MimeMultipart). Attachment support is disabled.


 In real-life I just needed to have javax.mail and javax.activation in my
 class path when I generated my sources and I don't get this.  In my pom.xml
 I have:

    dependency
      groupIdjavax.activation/groupId
      artifactIdactivation/artifactId
      version1.1.1/version
      scopegenerate-sources/scope
    /dependency
    dependency
       groupIdjavax.mail/groupId
       artifactIdmail/artifactId
       version1.4.4/version
       scopegenerate-sources/scope
    /dependency

 I've tried every scope I can think of to get these dependencies to be part
 of the class path for the axistool:wsdl2java action, but can't seem to make
 it work.

 Anyone have any advice why these dependencies are not showing up to the
 axistool module action?

 Help...

 Thanks,

 John


 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/axistools-wsdl2java-tp5505592p5505592.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


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



Looking for Web Services Best Practices Views

2012-02-21 Thread John Patrick
How would people structure the following example... with a view on the
following tools/plugin/integration...
a) maven packaging types
b) maven plugin's used
c) ide integration

Simple Echo Java Enterprise Application Scenario
One Request XSD
One Response XSD
One Stateless EJB, using Request and Response XSD
One WSDL, using Request and Response XSD
i.e.
1) User calls Web Service, which uses my-request.xsd
2) Web Service calls Stateless EJB, which uses my-request.xsd
3) Stateless EJB constructs response, which uses my-response.xsd
4) Web Service returns response, which uses my-response.xsd

Most people I speak to suggest Axis2 with XML Beans for data binding,
but that solutions seams to result in file duplication or messy
copying of xsd's around. I see the simple scenario as 5 pom's but am
unsure where to put axis2 wsdl 2 code generation and if it should have
it's own pom.

./pom.xml (Packaging POM)
./schema/pom.xml (Packing JAR, using xmlbeans plugin)
./service/pom.xml (Packing EJB)
./web/pom.xml (Packing WAR)
./app/pom.xml (Packing EAR)

Thoughts?

John

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



search.maven.org working for you

2011-05-06 Thread John Patrick
Just wondering anyone else using a Mac, if so does
http://search.maven.org/ display anything for you when you click
Search, or Advanced Search, or Browse or Quick Stats.

Is it just my MacBook Pro, Mac's or everyone. Also
http://www.downforeveryoneorjustme.com/search.maven.org reports the
site as down, is that n purpose its blocked.

I've tried the follow all on my MacBook Pro, everything has latest patches...
Firefox 4
Chrome
Safari

Cheers,
John

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



Re: search.maven.org working for you

2011-05-06 Thread John Patrick
Cheers, it was just me.

It's due to Cookies, on all browsers I've selected, 'only allow
cookies from site I visit'.

So the 3rd party cookies it appears to rely on where being block.

Site is now working now.

John

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



Re: Missing goal eclipse:m2eclipse in version 2.8 of the Maven Eclipse plugin

2011-01-16 Thread John Patrick
On 18 December 2010 05:08, Barrie Treloar baerr...@gmail.com wrote:
 On Thu, Dec 16, 2010 at 9:39 PM, Stefan Eder stefan.e...@ebuconnect.de 
 wrote:
  Hi,

 since quite a while I am using Maven and Eclipse together with the Eclipse
 plugin for Maven and the Maven plugin for Eclipse. And it is just great.

 But in the version 2.8 of the Eclipse plugin for Maven I am (hardly) missing
 the goal m2eclipse.

 How can I tell the version 2.8 of the Eclipse plugin to create .classpath
 files that refer to MAVEN2_CLASSPATH_CONTAINER and to add Maven nature and
 build command to the .project files without touching the corresponding poms?

 You don't, you use m2eclipse directly.
 If you are using m2eclipse, you *CAN NOT* use maven-eclipse-plugin,
 hence it being removed in 2.8

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



Just wondering why support for $ mvn eclipse:m2eclipse was dropped
from the maven-eclipse-plugin in version 2.8? I don't understand why
maven-eclipse-plugin and using m2eclipse are incompatible.

What command line should I now be using instead?

Or should I just stick with version 2.7?

As I don't want to store the eclipse project in source control, or
have to manually create the eclipse project. I just want a simple
command line to automatically create the project file so I can them
just import them, or re-execute and refresh the project.

John

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



Re: MacPorts Maven

2011-01-15 Thread John Patrick
On 13 January 2011 19:42, Anders Hammar and...@hammar.net wrote:
 No, ignore Maven 1.

 /Anders

 On Thu, Jan 13, 2011 at 17:24, John Patrick nhoj.patr...@gmail.com wrote:

 Does anyone install maven via macports???

 If so you might be interested in some tickets I've just submitted:

 #27944 - Upgrade maven3 to 3.0.2
 #27946 - maven_select (similar to python_select, so you can easly
 switch between maven2 and maven3)
 #27947 - maven3 update to use maven_select
 #27948 - maven2 update to use maven_select

 Do people still use maven 1.x? Just wondering if I should spend
 anytime on getting that to the latest version and integrated into
 maven_select.

 John

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




For those using maven via macports, my patches have been accepted and
applied, so you can now select between using maven2 or maven3 using
maven_select.

John

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



MacPorts Maven

2011-01-13 Thread John Patrick
Does anyone install maven via macports???

If so you might be interested in some tickets I've just submitted:

#27944 - Upgrade maven3 to 3.0.2
#27946 - maven_select (similar to python_select, so you can easly
switch between maven2 and maven3)
#27947 - maven3 update to use maven_select
#27948 - maven2 update to use maven_select

Do people still use maven 1.x? Just wondering if I should spend
anytime on getting that to the latest version and integrated into
maven_select.

John

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



License Help

2010-02-15 Thread John Patrick
I'm writting a maven plugin that wraps a solaris library that uses  
CDDL. I'm wondering what license I need to use for the plugin.


1) CDDL
2) LGPL
3) Apache
4) Dual CDDL  LGPL



Any help greatfully received.

John

Sent from my iPhone

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



Re: Patch releases using Maven

2009-12-22 Thread John Patrick
I don't see it as maven issue, I see it as a source control management or
people issue.

Getting a clear understanding of how version numbers will be increased, how
people should be using source control, once you know that maven can do what
ever you need it to do.

Issues you'll need to think about.
1) Source Control Management, does everyone work in trunk, or do you have
branches for trunk, development, releases, patches, bugs, refactoring?

2) What is the version number string, we use something like
major.minor.component.build.patch. This give us the ability to release
patches for specific component builds.

3) Do you have a internal company repo, project repo or per release repo.
This means when doing patches where do you get the other components for that
release.

The project I'm on went from ant to maven, speed of releases improved, we
are slow getting it to where developers on what ever branch only need to
build the xml schema's, war and ears plus the bits they are developing,
everything else comes from that release branch repo.

John


2009/12/16 svenkat.cm gn_ve...@yahoo.com


 Hi There

 I would like to understand how  effective you are doing  your patch
 releases
 on maven based projects

 Our scenario:
We have made the release to the customer.There might be
 requests from the customer(s) for some emergency fixes - say couple of jars
 to be replaced with the fixes etc., Also subsequent patches should be
 cumulative of all the patches to be released.

 Our plan or proposal is that:
 - since our build time is long, so we don't want to do full build every
 time we make patches
 - since patches are specific to components, is it ok to apply the code
 fix to the specific components and (re)build that particular component

 Questions:
Do you foresee any issues with approach?
what other better way you are handling in your projects?
do you use maven reactor plugin

 Thanks
 -Venkat


 --
 View this message in context:
 http://old.nabble.com/Patch-releases--using-Maven-tp26806933p26806933.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




Re: Use filter files from parent project

2009-12-22 Thread John Patrick
Something which might work for you.

parent
 | -- src/main/filters
 | -- pom.xml (pomP)
 | -- module-a
| -- src/main/resources
| -- pom.xml (pomA)
 | -- module-b
| -- src/main/resources
| -- pom.xml (pomB)

pomP
filters

filter${relpath-to-parent}\src\main\filters\${env}-filter.properties/filter
 /filters
properties
  relpath-to-parent./relpath-to-parent
/properties

pomA
properties
  relpath-to-parent../relpath-to-parent
/properties

pomB
properties
  relpath-to-parent../relpath-to-parent
/properties

This approache could also work for any level depth modules. I use a similar
technique for defining where modules, sub modules, sub-sub modules are
located in the SCM.

project parent pom
scm
  connection${scm-url}/connection
  developerConnection${scm-url}/developerConnection
  tagHEAD/tag
/scm
properties
  scm-usernamecruisecontrol/scm-username
  scm-hostperforce/scm-host
  scm-port1666/scm-port
  scm-baseurl//depot/project/trunk/scm-baseurl
  scm-relurl/scm-relurl
  scm-urlscm:perforce:${scm-username}@
${scm-host}:${scm-port}:${scm-baseurl}${scm-relurl}/scm-url
/properties

This then means in sub modules you simply define scm-relurl for that
specific project, plus the boiler plate scm details otherwise it doesn't
work:
scm
  connection${scm-url}/connection
  developerConnection${scm-url}/developerConnection
  tagHEAD/tag
/scm
properties
  scm-relurlsub-project/sub-module/scm-relurl
/properties


John

2009/12/15 Anders Hammar and...@hammar.net

 One way that springs to mind is to put the filter properties files in a
 separate project, then in each project use the dependency plugin to unpack
 that artifact and then use the properties files.
 However, using filtering in each and every one of your projects with the
 same properties files makes me wondering if there isn't a better option (a
 nice way of saying that there might be something wrong in your build
 design :-) ).

 /Anders

 On Tue, Dec 15, 2009 at 09:44, Michael Ebert micha.eb...@gmail.com
 wrote:

  Hi,
 
  i'm facing the following issue:
 
  I've got a multi module project and resources filtering is activated
  in every module:
 
 resources
   resource
 directorysrc/main/resources/directory
 filteringtrue/filtering
   /resource
 /resources
 
  The directory layout:
 
  parent
   | -- src/main/filters
   | -- pom.xml
   | -- module-a
  | -- src/main/resources
  | -- pom.xml
   | -- module-b
  | -- src/main/resources
  | -- pom.xml
 
  My filter files currently reside under src/main/filters in the parent
  project and are referenced from within the submodules via
 
 filters
   filter..\src\main\filters\${env}-filter.properties/filter
 /filters
 
  So far so good, that works. But I'm getting into troubles when I try
  to build the modules separately, precise when continuum does so.
  Continuum checks out the modules in a flat hierarchy and builds the
  modules --non-recursive (one can get around that but that's not my
  intention):
 
  parent
   | -- src/main/filters
   | -- pom.xml
  module-a
   | -- src/main/resources
   | -- pom.xml
  module-b
   | -- src/main/resources
   | -- pom.xml
 
  Obviously, the relative referenced
  ..\src\main\filters\${env}-filter.properties doesn't work any more.
 
  Is there any possibility for having my filter files at another common
  place, that is reachable for every module, regardless of the directory
  layout? That must be a common problem but I haven't found any solution
  so far.
 
  Thanks,
  micha.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 



Re: How to download every dependency we need at once?

2009-12-22 Thread John Patrick
I work in a sandbox network and have similar issues.

What I do:
1) Internet Connected Host
1.1) Create pom contain all dependencies and plugins used.
1.2) mvn -s settings.xml clean install site
1.3) find, grep -v, sort -u, echo, cat sort -u, echo (obtain list of group
id's downloaded)
1.4) rsync list generated in 1.3
1.5) diff latest rsync with representation of offline repo
1.6) generate diff file, usually a tar.gz
1.7) update representation of offline repo with contents of step 1.6
1.8) burn step 1.6 to disk

2) Standalone Network Host
2.1) same as step 1.7, update repo with contents contained in step 1.6
2.2) Do a full build from the repo updated in step 2.1 to confirm it still
works.

3) Handling updates
3.1) update pom created in step 1.1 or manually update list in step 1.3
3.2) repeat step 1 and 2 when required to download the latest update and
dependencies, sometimes it takes a few attempts to fix all dependencies.

I've worked with offline maven development for a few years and usually I'm
the one managing the repo and it my best solution at this moment.

If you want to commands i execute let me know and I'll post them.

John

2009/12/16 Anders Hammar and...@hammar.net

 Why not use a corporate repository manager like Nexus or Artifactory? All
 users would then configure their Maven to use that as the remote repo for
 all artifacts. This will give you a central point where you manage all
 artifacts, including both external and internal ones. His instance would
 then proxy any remote repos on Internet (if you allow it too).

 Any other solution is a hack.

 /Anders

 On Tue, Dec 15, 2009 at 14:19, Gajo Csaba csaba.g...@cosylab.com wrote:

  This seems to be almost perfect except it requires a project to exist.
 But
  I'll use it if there's nothing else :)
 
  Thanks, Csaba
 
 
 
  Jesse Farinacci wrote:
 
  Hi Gajo,
 
  2009/12/15 Gajo Csaba csaba.g...@cosylab.com:
 
 
  Is there some cleaner way to do this? I know exactly which dependencies
  are
  needed (it's a large list), so is there some maven command to not build
  anything, just download these dependencies into the local .m2
 directory?
 
 
 
 
  Check out the maven-dependency-plugin:go-offline goal:
 
 
 
 http://maven.apache.org/plugins/maven-dependency-plugin/go-offline-mojo.html
 
  -Jesse Farinacci
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 



Re: How to skip generating source jar files

2009-12-22 Thread John Patrick
I'ld suggest putting the source plugin in a release or full build profile.
That way your release manager or continuous build system and create the
source jar and developers can optionally include it if you want.

2009/12/16 Anders Hammar and...@hammar.net

 Sorry, I was a little bit too quite there. Didn't really see the skip
 word. :-)

 Why is the source jar being generated in the first place? Normally
 (standard
 Maven) it's only done when the release-profile profile is activated.

 /Anders

 On Wed, Dec 16, 2009 at 09:10, Anders Hammar and...@hammar.net wrote:

  http://maven.apache.org/plugins/maven-source-plugin/usage.html
 
  /Anders
 
 
  On Wed, Dec 16, 2009 at 06:38, Vikram Pyati vikrampy...@gmail.com
 wrote:
 
  Hi,
 
  While invoking the maven target 'package', I need to skip generation of
  source jars. Is there any way I can do this? It will save a lot of time.
 
  --
  Regards,
  Vikram
 
 
 



Re: Resources in source folder

2009-11-25 Thread John Patrick
Have you tried: mvn eclipse:m2eclipse.

Does it exibit the same behaviour.

John

2009/11/20 Martin Seebach martin.seeb...@assursoft.com

 Hi,

 I have an Eclipse-project that are managed with Maven2. This project
 depends
 on resource-files in the source-folders (HTML-files, it's a Wicket
 project),
 but recently Eclipse stopped copying those files to the target
 automatically. Project properties-build path-source folders for the
 relevant source folder is set to Included: **/*.java and Excluded:
 (None), and if I clear included to (all) it works -- however, this is
 overwritten when I run mvn eclipse:eclipse.

 The change corresponds to
 classpathentry kind=src path=src/main/java including=**/*.java/
 to
 classpathentry kind=src path=src/main/java/

 I've tried various manglings of the resources section of the pom.xml file,
 but I can't get it to do anything different. Also, mvn resources:resource
 works as expected, so I'm suspecting that I'm looking in the wrong place.

 How do I get Maven to output the right classpathentry ?

 Thanks,

 Martin Seebach



Mirroring Maven - mirrors.ibiblio.org down

2008-10-25 Thread John Patrick
I rsync the maven repository from mirrors.ibiblio.org about once a month and
find it is offline most times I try to use it, like now. Is their a better
rsync mirror than mirrors.ibiblio.org?

I've tried contacting ibiblio but have not received any response.

John


Re: Javadoc generation on Unix requiring /bin/bash???

2008-08-20 Thread John Patrick
Hi,

Looking at the documentation for the JavaDoc plugin it does not provide that
configuration at this stage. I might see if I'm able to create a patch
myself for maven-javadoc-plugin 2.5-SNAPSHOT but not sure if I'll be free
to.

Anyway I've raised improvement issue with maven javadoc.

http://jira.codehaus.org/browse/MJAVADOC-213

John


  1   2   >