Re: opinion on obfuscator plugin default execution phase?
Hi Richard, I can see it both ways... If it runs at the packaging phase, it'll start (by default) by processing the packaged artifact created by the default packaging and either overwriting the artifact or creating a new one with a classifier (e.g. artifact-small). If it runs at the pre-packaging phase, I'd have it start processing on the output folder from the compile phase. without taking a stance on which of the two options is better/more Maven-like, I would also add an option 3: obfuscate the class files in the process-classes phase [1]. That way the unit tests run against the obfuscated classes, which may expose problems due to the obfuscation that would otherwise go unnoticed. Hope that helps. Andreas [1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Maven and JPA/EclipseLink Configuration...
You could have a look at my Wiki article about multiple persistence.xml files: https://dev.c-ware.de/confluence/display/PUBLIC/Multiple+persistence.xml+in+a+multi-module+application Here you could separate your JPA entities from the platform dependent Options. In your case you could create your persistence.xml files without any db and application-server specific Settings and then simply add an additional persistence.xml to your deployment ... the merging persistence unit Manager would then merge those properties in automatically without having to update all of the individual persistence.xml files. Don't quite know why my confluence is so slow at the Moment ... will have a look at this tonight. Chris Von: John Patrick [nhoj.patr...@gmail.com] Gesendet: Dienstag, 9. Juli 2013 18:50 An: Maven Users List Betreff: Maven and JPA/EclipseLink Configuration... 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 - 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...
That looks like a Spring only solution I wonder is there a pure JavaEE counterpart On 11 July 2013 09:56, christofer.d...@c-ware.de christofer.d...@c-ware.dewrote: You could have a look at my Wiki article about multiple persistence.xml files: https://dev.c-ware.de/confluence/display/PUBLIC/Multiple+persistence.xml+in+a+multi-module+application Here you could separate your JPA entities from the platform dependent Options. In your case you could create your persistence.xml files without any db and application-server specific Settings and then simply add an additional persistence.xml to your deployment ... the merging persistence unit Manager would then merge those properties in automatically without having to update all of the individual persistence.xml files. Don't quite know why my confluence is so slow at the Moment ... will have a look at this tonight. Chris Von: John Patrick [nhoj.patr...@gmail.com] Gesendet: Dienstag, 9. Juli 2013 18:50 An: Maven Users List Betreff: Maven and JPA/EclipseLink Configuration... 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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Maven and JPA/EclipseLink Configuration...
Well it should be possible as the PersistenceUnitManager is more a JPA Thing and not restricted to Spring. In my example it is just configured using Spring. Think it should be possible to do this an a JavaEE application (Perhaps I should find this out somehow and extend my tutorial). If someone here knows how to do so, I would be glad for some Input on this ;-) Chris Von: Stephen Connolly [stephen.alan.conno...@gmail.com] Gesendet: Donnerstag, 11. Juli 2013 11:14 An: Maven Users List Betreff: Re: Maven and JPA/EclipseLink Configuration... That looks like a Spring only solution I wonder is there a pure JavaEE counterpart On 11 July 2013 09:56, christofer.d...@c-ware.de christofer.d...@c-ware.dewrote: You could have a look at my Wiki article about multiple persistence.xml files: https://dev.c-ware.de/confluence/display/PUBLIC/Multiple+persistence.xml+in+a+multi-module+application Here you could separate your JPA entities from the platform dependent Options. In your case you could create your persistence.xml files without any db and application-server specific Settings and then simply add an additional persistence.xml to your deployment ... the merging persistence unit Manager would then merge those properties in automatically without having to update all of the individual persistence.xml files. Don't quite know why my confluence is so slow at the Moment ... will have a look at this tonight. Chris Von: John Patrick [nhoj.patr...@gmail.com] Gesendet: Dienstag, 9. Juli 2013 18:50 An: Maven Users List Betreff: Maven and JPA/EclipseLink Configuration... 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 - 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 and JPA/EclipseLink Configuration...
It's not an EJB 3.1 thing... checking the 3.2 spec now On 11 July 2013 10:22, christofer.d...@c-ware.de christofer.d...@c-ware.dewrote: Well it should be possible as the PersistenceUnitManager is more a JPA Thing and not restricted to Spring. In my example it is just configured using Spring. Think it should be possible to do this an a JavaEE application (Perhaps I should find this out somehow and extend my tutorial). If someone here knows how to do so, I would be glad for some Input on this ;-) Chris Von: Stephen Connolly [stephen.alan.conno...@gmail.com] Gesendet: Donnerstag, 11. Juli 2013 11:14 An: Maven Users List Betreff: Re: Maven and JPA/EclipseLink Configuration... That looks like a Spring only solution I wonder is there a pure JavaEE counterpart On 11 July 2013 09:56, christofer.d...@c-ware.de christofer.d...@c-ware.dewrote: You could have a look at my Wiki article about multiple persistence.xml files: https://dev.c-ware.de/confluence/display/PUBLIC/Multiple+persistence.xml+in+a+multi-module+application Here you could separate your JPA entities from the platform dependent Options. In your case you could create your persistence.xml files without any db and application-server specific Settings and then simply add an additional persistence.xml to your deployment ... the merging persistence unit Manager would then merge those properties in automatically without having to update all of the individual persistence.xml files. Don't quite know why my confluence is so slow at the Moment ... will have a look at this tonight. Chris Von: John Patrick [nhoj.patr...@gmail.com] Gesendet: Dienstag, 9. Juli 2013 18:50 An: Maven Users List Betreff: Maven and JPA/EclipseLink Configuration... 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 - 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 and JPA/EclipseLink Configuration...
Couldn't find it there either... Also the spec does not allow the use of an EL in the persistence.xml, so you can't even delegate to JNDI or system properties... only hope is container specific overriding via deployment descriptors OpenEJB (the good guy) supports this: http://tomee.apache.org/alternate-descriptors.html JBoss seems to have some way... but it is beyond what I can grok in 30sec Glassfish doesn't seem to let you do that... On 11 July 2013 10:29, Stephen Connolly stephen.alan.conno...@gmail.comwrote: It's not an EJB 3.1 thing... checking the 3.2 spec now On 11 July 2013 10:22, christofer.d...@c-ware.de christofer.d...@c-ware.de wrote: Well it should be possible as the PersistenceUnitManager is more a JPA Thing and not restricted to Spring. In my example it is just configured using Spring. Think it should be possible to do this an a JavaEE application (Perhaps I should find this out somehow and extend my tutorial). If someone here knows how to do so, I would be glad for some Input on this ;-) Chris Von: Stephen Connolly [stephen.alan.conno...@gmail.com] Gesendet: Donnerstag, 11. Juli 2013 11:14 An: Maven Users List Betreff: Re: Maven and JPA/EclipseLink Configuration... That looks like a Spring only solution I wonder is there a pure JavaEE counterpart On 11 July 2013 09:56, christofer.d...@c-ware.de christofer.d...@c-ware.dewrote: You could have a look at my Wiki article about multiple persistence.xml files: https://dev.c-ware.de/confluence/display/PUBLIC/Multiple+persistence.xml+in+a+multi-module+application Here you could separate your JPA entities from the platform dependent Options. In your case you could create your persistence.xml files without any db and application-server specific Settings and then simply add an additional persistence.xml to your deployment ... the merging persistence unit Manager would then merge those properties in automatically without having to update all of the individual persistence.xml files. Don't quite know why my confluence is so slow at the Moment ... will have a look at this tonight. Chris Von: John Patrick [nhoj.patr...@gmail.com] Gesendet: Dienstag, 9. Juli 2013 18:50 An: Maven Users List Betreff: Maven and JPA/EclipseLink Configuration... 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 - 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:Error of after running 'mvn package' command
I don't config repository and where can i see the repository configured? Thanks. At 2013-07-11 09:46:57,邹志勇 zouzhiyong0...@163.com wrote: Hi, After i run the command 'mvn package', then i get the following error message : Failed to execute goal org.kohsuke:access-modifier-checker:1.4:enforce (default-enforce) on project javaone-sample: Execution default-enforce of goal org.kohsuke:access-modifier-checker:1.4:enforce failed: Plugin org.kohsuke:access-modifier-checker:1.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.kohsuke:access-modifier-checker:jar:1.4 - org.kohsuke:access-modifier-annotation:jar:1.4 - org.jenkins-ci:annotation-indexer:jar:1.4: Failed to read artifact descriptor for org.jenkins-ci:annotation-indexer:jar:1.4: Could not transfer artifact org.jenkins-ci:annotation-indexer:pom:1.4 from/to m.g.o-public (http://maven.glassfish.org/content/groups/public/): hostname in certificate didn't match: maven.glassfish.org != maven.java.net OR maven.java.net - [Help 1] So, why, am i need to config in somewhere? Thanks.
Re: Error of after running 'mvn package' command
It could be configured either in your POM or your settings.xml. On Jul 11, 2013, at 6:04 AM, 邹志勇 zouzhiyong0...@163.com wrote: I don't config repository and where can i see the repository configured? Thanks. At 2013-07-11 09:46:57,邹志勇 zouzhiyong0...@163.com wrote: Hi, After i run the command 'mvn package', then i get the following error message : Failed to execute goal org.kohsuke:access-modifier-checker:1.4:enforce (default-enforce) on project javaone-sample: Execution default-enforce of goal org.kohsuke:access-modifier-checker:1.4:enforce failed: Plugin org.kohsuke:access-modifier-checker:1.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.kohsuke:access-modifier-checker:jar:1.4 - org.kohsuke:access-modifier-annotation:jar:1.4 - org.jenkins-ci:annotation-indexer:jar:1.4: Failed to read artifact descriptor for org.jenkins-ci:annotation-indexer:jar:1.4: Could not transfer artifact org.jenkins-ci:annotation-indexer:pom:1.4 from/to m.g.o-public (http://maven.glassfish.org/content/groups/public/): hostname in certificate didn't match: maven.glassfish.org != maven.java.net OR maven.java.net - [Help 1] So, why, am i need to config in somewhere? Thanks. - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html!
Re: simple questions - where to put unpackaged config files?
Hi Richard, You can use the property${basedir} to refer to root of the project, so the directory in question would be ${basedir}/src/main/config - Russ On Jul 11, 2013, at 1:24 AM, Richard Sand rs...@idfconnect.com wrote: I've several projects that were created before we began using maven and which we've added maven to subsequently. Obviously these projects were not created with an archetype. Is there a standard folder that is commonly used in archetypes for holding files such as application configuration files or templates? The types of files I'm thinking of would not be put into packaging (e.g. they wouldn't be placed into the jar, war etc. created by maven) but would potentially be used in the install or deploy lifecycles. A folder such as src/main/config? If such an animal exists, what property would I used to reference it in a plugin? e.g. the equivalent of ${project.build.sourceDirectory}. Is there such a property? If not, is there a property that references the src or src/main folder? ${project.build.sourceDirectory} references src/main/java - it would seem to be a hack to use ../config from there but it would work. Thanks! Richard Sand | CEO IDF Connect, Inc. 2207 Concord Ave, #359 Wilmington | Delaware 19803 | USA Office: +1 302 425 0516 | Fax: +1 856 866 1899 Mobile: +1 267 984 3651 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html!
Re: simple questions - where to put unpackaged config files?
Hi, src/main/config actually is the default/recommended place. See http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Not sure though it's a directory used by any plugin in general. But that might not be an issue for you. Cheers 2013/7/11 Russell Gold r...@gold-family.us Hi Richard, You can use the property${basedir} to refer to root of the project, so the directory in question would be ${basedir}/src/main/config - Russ On Jul 11, 2013, at 1:24 AM, Richard Sand rs...@idfconnect.com wrote: I've several projects that were created before we began using maven and which we've added maven to subsequently. Obviously these projects were not created with an archetype. Is there a standard folder that is commonly used in archetypes for holding files such as application configuration files or templates? The types of files I'm thinking of would not be put into packaging (e.g. they wouldn't be placed into the jar, war etc. created by maven) but would potentially be used in the install or deploy lifecycles. A folder such as src/main/config? If such an animal exists, what property would I used to reference it in a plugin? e.g. the equivalent of ${project.build.sourceDirectory}. Is there such a property? If not, is there a property that references the src or src/main folder? ${project.build.sourceDirectory} references src/main/java - it would seem to be a hack to use ../config from there but it would work. Thanks! Richard Sand | CEO IDF Connect, Inc. 2207 Concord Ave, #359 Wilmington | Delaware 19803 | USA Office: +1 302 425 0516 | Fax: +1 856 866 1899 Mobile: +1 267 984 3651 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - Come read my webnovel, Take a Lemon http://www.takealemon.com, and listen to the Misfile radio play http://www.gold-family.us/audio/misfile.html! -- Baptiste Batmat MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
Assemply plug-in: useProjectArtifact flag
I want to include just one artifact from the dependencies in the the result jar, so my assembly descriptor: dependencySet outputDirectory//outputDirectory includes includeorg.example:test:zip:1.0.0/include /includes /dependencySet In the result jar I am able to see only example-test.zip artifact, no project artifact. Looks like useProjectArtifact doesn't work (default value is true). Also I have tried to add project artifact in dependencySet but still have no success with it. Please share your throughs on this.
Re:Error of after running 'mvn package' command
From my observation, in POM file and settings.xml don't do any config about repository, the following are two files content : In the end, i pastes the more detail debug infor of running 'mvn '. 1.Project POM file content : project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion parent groupIdorg.jvnet.hudson.plugins/groupId artifactIdhudson-plugin-parent/artifactId version2.1.2/version!-- which version of Hudson is this plugin built against? -- /parent groupIdorg.sample.hudson/groupId artifactIdjavaone-sample/artifactId version1.0-SNAPSHOT/version packaginghpi/packaging nameMy New Plugin/name 2. Global settings.xml content : ?xml version=1.0 encoding=UTF-8? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- | This is the configuration file for Maven. It can be specified at two levels: | | 1. User Level. This settings.xml file provides configuration for a single user, | and is normally provided in ${user.home}/.m2/settings.xml. | | NOTE: This location can be overridden with the CLI option: | | -s /path/to/user/settings.xml | | 2. Global Level. This settings.xml file provides configuration for all Maven | users on a machine (assuming they're all using the same Maven | installation). It's normally provided in | ${maven.home}/conf/settings.xml. | | NOTE: This location can be overridden with the CLI option: | | -gs /path/to/global/settings.xml | | The sections in this sample file are intended to give you a running start at | getting the most out of your Maven installation. Where appropriate, the default | values (values used when the setting is not specified) are provided. | |-- settings xmlns=http://maven.apache.org/SETTINGS/1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd; !-- localRepository | The path to the local repository maven will use to store artifacts. | | Default: ~/.m2/repository localRepository/path/to/local/repo/localRepository -- !-- interactiveMode | This will determine whether maven prompts you when it needs input. If set to false, | maven will use a sensible default value, perhaps based on some other setting, for | the parameter in question. | | Default: true interactiveModetrue/interactiveMode -- !-- offline | Determines whether maven should attempt to connect to the network when executing a build. | This will have an effect on artifact downloads, artifact deployment, and others. | | Default: false offlinefalse/offline -- !-- pluginGroups | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e. | when invoking a command line like mvn prefix:goal. Maven will automatically add the group identifiers | org.apache.maven.plugins and org.codehaus.mojo if these are not already contained in the list. |-- pluginGroups !-- pluginGroup | Specifies a further group identifier to use for plugin lookup. pluginGroupcom.your.plugins/pluginGroup -- pluginGrouporg.jvnet.hudson.tools/pluginGroup /pluginGroups !-- proxies | This is a list of proxies which can be used on this machine to connect to the network. | Unless otherwise specified (by system property or command-line switch), the first proxy | specification in this list marked as active will be used. |-- proxies !-- proxy | Specification for one proxy, to be used in connecting to the network. | proxy idoptional/id activetrue/active protocolhttp/protocol usernameproxyuser/username passwordproxypass/password hostproxy.host.net/host port80/port nonProxyHostslocal.net|some.host.com/nonProxyHosts /proxy -- /proxies !-- servers | This is a list of authentication profiles, keyed by