Hehe Francesco :-) I understand and I did this earlier, aswell:
VIZ:
[nik@anvil syncope-archetype]$ diff ./core/pom.xml ./core/core_pom_ori.xml
110,114d109
< <dependency>
< <groupId>org.connid.bundles.db</groupId>
< <artifactId>org.connid.bundles.db.table</artifactId>
< <scope>test</scope>
< </dependency>
135,144d129
< <configuration>
< <artifactItems>
< <artifactItem>
< <groupId>org.connid.bundles.db</groupId>
< <artifactId>org.connid.bundles.db.table</artifactId>
< <version>2.5.1</version>
< <outputDirectory>/opt/syncope/bundles/</outputDirectory>
< </artifactItem>
< </artifactItems>
< </configuration>
[nik@anvil syncope-archetype]$
or
[nik@anvil syncope-archetype]$ diff ./core/pom.xml ./core/core_pom_ori.xml
110,114d109
< <dependency>
< <groupId>org.connid.bundles.db</groupId>
< <artifactId>org.connid.bundles.db.table</artifactId>
< <scope>test</scope>
< </dependency>
135,144d129
< <configuration>
< <artifactItems>
< <artifactItem>
< <groupId>org.connid.bundles.db</groupId>
< <artifactId>org.connid.bundles.db.table</artifactId>
< <version>2.5.1</version>
< <outputDirectory>${bundles.directory}</outputDirectory>
< </artifactItem>
< </artifactItems>
< </configuration>
[nik@anvil syncope-archetype]$
gives:
:
[INFO] Configured Artifact:
org.connid.bundles.db:org.connid.bundles.db.table:2.5.1:jar
Downloading:
https://repository.apache.org/content/repositories/snapshots/org/connid/bundles/db/org.connid.bundles.db.table/2.5.1/org.connid.bundles.db.table-2.5.1.jar
Downloading:
https://artifacts.alfresco.com/nexus/content/groups/public/org/connid/bundles/db/org.connid.bundles.db.table/2.5.1/org.connid.bundles.db.table-2.5.1.jar
Downloading:
http://repo.maven.apache.org/maven2/org/connid/bundles/db/org.connid.bundles.db.table/2.5.1/org.connid.bundles.db.table-2.5.1.jar
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Syncope sample project ..................... SUCCESS [1.974s]
[INFO] Apache Syncope sample project core ................ FAILURE [10.209s]
[INFO] Apache Syncope sample project console ............. SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 12.537s
[INFO] Finished at: Fri Jun 07 15:05:18 CEST 2013
[INFO] Final Memory: 27M/285M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-dependency-plugin:2.7:copy (set-bundles)
on project core: Unable to find artifact. Could not find artifact
org.connid.bundles.db:org.connid.bundles.db.table:jar:2.5.1 in ASF
(https://repository.apache.org/content/repositories/snapshots/)
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.connid.bundles.db
-DartifactId=org.connid.bundles.db.table -Dversion=2.5.1 -Dpackaging=jar
-Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy
the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.connid.bundles.db
-DartifactId=org.connid.bundles.db.table -Dversion=2.5.1 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] org.connid.bundles.db:org.connid.bundles.db.table:jar:2.5.1
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] ASF
(https://repository.apache.org/content/repositories/snapshots/,
releases=true, snapshots=true),
[ERROR] activiti
(https://artifacts.alfresco.com/nexus/content/groups/public/,
releases=true, snapshots=true),
[ERROR] sonatype
(https://oss.sonatype.org/content/repositories/snapshots,
releases=false, snapshots=true),
[ERROR] apache.snapshots (http://repository.apache.org/snapshots,
releases=false, snapshots=true),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true,
snapshots=false)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR] mvn <goals> -rf :core
or
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources
(default-testResources) @ core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-dependency-plugin:2.7:copy (set-bundles) @ core ---
[INFO] Configured Artifact:
org.connid.bundles.db:org.connid.bundles.db.table:2.5.1:jar
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Syncope sample project ..................... SUCCESS [2.160s]
[INFO] Apache Syncope sample project core ................ FAILURE [2.560s]
[INFO] Apache Syncope sample project console ............. SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 5.077s
[INFO] Finished at: Fri Jun 07 15:12:22 CEST 2013
[INFO] Final Memory: 26M/342M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-dependency-plugin:2.7:copy (set-bundles)
on project core: Unable to find artifact. Failure to find
org.connid.bundles.db:org.connid.bundles.db.table:jar:2.5.1 in
https://repository.apache.org/content/repositories/snapshots/ was cached
in the local repository, resolution will not be reattempted until the
update interval of ASF has elapsed or updates are forced
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.connid.bundles.db
-DartifactId=org.connid.bundles.db.table -Dversion=2.5.1 -Dpackaging=jar
-Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy
the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.connid.bundles.db
-DartifactId=org.connid.bundles.db.table -Dversion=2.5.1 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] org.connid.bundles.db:org.connid.bundles.db.table:jar:2.5.1
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] ASF
(https://repository.apache.org/content/repositories/snapshots/,
releases=true, snapshots=true),
[ERROR] activiti
(https://artifacts.alfresco.com/nexus/content/groups/public/,
releases=true, snapshots=true),
[ERROR] sonatype
(https://oss.sonatype.org/content/repositories/snapshots,
releases=false, snapshots=true),
[ERROR] apache.snapshots (http://repository.apache.org/snapshots,
releases=false, snapshots=true),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true,
snapshots=false)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR] mvn <goals> -rf :core
[nik@anvil syncope-archetype]$
So I need to change other stuff too I guess
Nik
On 07/06/2013 15:00, Nik wrote:
But I arrive back to the starting point. I don't get my db connector
jar :-(
Of course!
You simply need to adjust
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.connid.bundles</groupId>
<artifactId>${connid.bundle.name}</artifactId>
<version>${connid.bundle.version}</version>
<outputDirectory>${bundles.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
to
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.connid.bundles.db</groupId>
<artifactId>org.connid.bundles.db.table</artifactId>
<version>2.1.15</version>
<outputDirectory>${bundles.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
for the DB connector.
As I wrote earlier, "<groupId>org.connid.bundles.db</groupId>" needs
to be used everywhere: this is how Maven works.
Regards.
[nik@anvil syncope-archetype]$ find . -name
org.connid.bundles.db.table-2.1.5.jar
[nik@anvil syncope-archetype]$ ls -lrt /opt/syncope/bundles/
total 4924
-rw-rw-r--. 1 nik nik 3320691 Jun 7 14:49
org.connid.bundles.soap-1.2.6.jar
-rw-rw-r--. 1 nik nik 1515037 Jun 7 14:49
org.connid.bundles.csvdir-0.7.jar
-rw-rw-r--. 1 nik nik 204027 Jun 7 14:49
org.connid.bundles.ldap-1.3.5.jar
[nik@anvil syncope-archetype]$
But if I remove the xml wiki advicefor :
_QUOTE_
and adding the following rows to maven-dependency-plugin
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.connid.bundles</groupId>
<artifactId>${connid.bundle.name}</artifactId>
<version>${connid.bundle.version}</version>
<outputDirectory>${bundles.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
_UNQUOTE_
and life with maven becomes less complicated:-)
:
[INFO] Building war:
/home/nik/UShareSoft/WKS/syncopeOnGlassfish/syncope-archetype/console/target/syncope-console.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] --- maven-site-plugin:3.2:attach-descriptor
(attach-descriptor) @ console ---
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Syncope sample project ..................... SUCCESS
[1.944s]
[INFO] Apache Syncope sample project core ................ SUCCESS
[17.333s]
[INFO] Apache Syncope sample project console ............. SUCCESS
[48.293s]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1:07.913s
[INFO] Finished at: Fri Jun 07 14:50:00 CEST 2013
[INFO] Final Memory: 30M/467M
[INFO]
------------------------------------------------------------------------
[nik@anvil syncope-archetype]$
rgds,
Nik
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/